Page 1 of 2
miplevel++ / texture bug
Posted: 04 Nov 2009, 13:49
by TradeMark
my card sucks, and on miplevel 0 it lags a lot, but when the texture goes into miplevel 1, i get 60fps again, i dont much care about how the terrain looks when i play with shitty card
could we have some button to adjust the terrain detail by miplevel?
--
ive noticed that the miplevel doesnt change when you look the map directly from the sky no matter how far away you are looking at the map. but if you rotate it, then the miplevel changes... is this bug, or a normal behaviour? could it be fixed?
Re: miplevel++ / texture bug
Posted: 10 Nov 2009, 19:34
by Neddie
Is there a console command? I'm pretty sure the top-down issue is a bug.
Re: miplevel++ / texture bug
Posted: 16 Jan 2010, 23:32
by TradeMark
now when i was browsing this settings file...
TradeMark wrote:could we have some button to adjust the terrain detail by miplevel?
on windows go to:
"C:\Documents and Settings\***\Local Settings\Application Data\springsettings.cfg"
and edit this line:
TextureLODBias=0
higher value = less detail, set it to 1 to skip first level, should give nice boost on bad GFX cards.
havent tested that though... i think it should work
Re: miplevel++ / texture bug
Posted: 17 Jan 2010, 01:15
by Beherith
Ok, first off, are you using latest git build or normal 80.5.2 or earlier?
If you want to see which mip level is applied to each bigtexture square, you will have to compile a map with -z "nvdxt -dxt1a -fadecolor -custom_fade 5 1 0.75 0.5 0.25 0 -nmips 4 -file" parameter using my latest mapconv. This will show you perfectly well which mip levels are being shown on the map.
Now I actually had a patch committed this release, that chose the optimal miplevel by taking a look at the stretchiness of the specific map square and the height of the camera and the total height difference of the map square, based on the resolution of the screen. (map squares are 2x2 spring unit squares with each its own .dds texture)
The previous algorithm only took into account the x and z distance from the camera, so it would result in moire patterns under the center of the camera when zoomed out, and faded, very low mip levels on surrounding areas.
For further information, please check the related thread:
http://springrts.com/phpbb/viewtopic.php?f=12&t=21479
If there is demand for an option to force smaller mips, then I could incorporate that into the code as well, but it would be a hidden option only accessible through editing the springsettings.cfg
Also, here is a small testmap that shows you which mip level is being displayed:
EDIT: You got something very wrong there trademark, since texturelodbias has NO effect on smf map textures, check with the map i posted to prove it. It only effects unit textures.
Re: miplevel++ / texture bug
Posted: 17 Jan 2010, 01:40
by TradeMark
rofl, only unit textures? that sucks... useless piece of shit
the problem has nothing to do with map compiling... i just wanted to use less detailed map textures with my shitty gfx card because it gave me extra 30fps (noticed it when the mip level changed when rotating camera)
Re: miplevel++ / texture bug
Posted: 17 Jan 2010, 02:16
by Beherith
Read my post again, it not about map compiling. Or is it tldr for you?
Re: miplevel++ / texture bug
Posted: 17 Jan 2010, 02:25
by TradeMark
yes i dont read posts that are longer than 3 lines
you started talking about some patch which would do what opengl already can do by default.. so i stopped reading
my suggestion was to skip the first mip level of detail completely, so it would render much faster since it would use only half of the resolution... only for bad gfx cards i mean.
i dont know why spring sucks at mipmapping, opengl default mipmapping should be just fine but for some reason they start making own mip level selection code for nothing... just makes more problems and fucks up performance.
Re: miplevel++ / texture bug
Posted: 17 Jan 2010, 03:01
by Beherith
Because opengl doesnt do per fragment mipmap selection, so this new code is actually better than opengl defaults could be for smf maps.
Re: miplevel++ / texture bug
Posted: 17 Jan 2010, 03:07
by TradeMark
hmm? i dont see how its any better
i would like the original method more, now when i play it looks like theres no mipmapping almost at all... shitty looking
yes i play with top-down view...
Re: miplevel++ / texture bug
Posted: 17 Jan 2010, 03:10
by Beherith
Did you test latest git build?
now when i play it looks like theres no mipmapping almost at all
thats the whole point.
Re: miplevel++ / texture bug
Posted: 17 Jan 2010, 03:11
by TradeMark
why? and give link if i really have to
Beherith wrote:
now when i play it looks like theres no mipmapping almost at all
thats the whole point.
i want it to use less power in rendering textures when i use shitty gfx card. i get +50% more speed in rendering when the mipmap is working correctly. this would help a lot of shitty card owners...
Re: miplevel++ / texture bug
Posted: 17 Jan 2010, 03:12
by Beherith
Meh, I honestly dont know why I gave you the benefit of doubt in this thread. You didnt read nor comprehend anything I wrote.
/me out.
Re: miplevel++ / texture bug
Posted: 17 Jan 2010, 03:14
by TradeMark
yeah whatever, dont believe me then
i dont think you actually understood me either...
Re: miplevel++ / texture bug
Posted: 17 Jan 2010, 03:33
by Das Bruce
TradeMark wrote:hmm? i dont see how its any better
i would like the original method more, now when i play it looks like theres no mipmapping almost at all... shitty looking
How is it shitty looking? Can you post screenshots?
Re: miplevel++ / texture bug
Posted: 17 Jan 2010, 04:41
by TradeMark
do i need screenshots when i already told that changing the miplevel gives me +100% more fps? (on that crap card i had)
by shitty i mean i see the invidual pixels with high contrast from the surrounding pixels = not smooth
however, it looks smooth when i rotate my camera view just a little bit, thats when i also get the 100% fps boost on the crappy card. because it reads (3 times) less pixels from textures.
Re: miplevel++ / texture bug
Posted: 17 Jan 2010, 05:02
by Umbra
With the latest build the maps look absolutely better.
My performance sees no change however(this is on a very high end card).
Re: miplevel++ / texture bug
Posted: 17 Jan 2010, 05:07
by TradeMark
oh, what is the latest build... do i have it? been playing spring last week etc...
Re: miplevel++ / texture bug
Posted: 17 Jan 2010, 14:54
by Master-Athmos
You have to get the latest build from. e.g.
buildbot - it's not in the latest official release...
And just in case you missed it:
http://springrts.com/phpbb/viewtopic.php?f=12&t=21479
Re: miplevel++ / texture bug
Posted: 17 Jan 2010, 16:31
by TradeMark
buildbot... forget about it
Re: miplevel++ / texture bug
Posted: 18 Jan 2010, 01:11
by Master-Athmos
Where is the big deal? Just go
HERE, take the latest file and install it in a directory of its own...