miplevel++ / texture bug

miplevel++ / texture bug

Requests for features in the spring code.

Moderator: Moderators

User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

miplevel++ / texture bug

Post 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?
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Re: miplevel++ / texture bug

Post by Neddie »

Is there a console command? I'm pretty sure the top-down issue is a bug.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: miplevel++ / texture bug

Post 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
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: miplevel++ / texture bug

Post 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:
smfmiplevel.sd7
(1.96 MiB) Downloaded 13 times
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.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: miplevel++ / texture bug

Post 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)
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: miplevel++ / texture bug

Post by Beherith »

Read my post again, it not about map compiling. Or is it tldr for you?
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: miplevel++ / texture bug

Post 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.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: miplevel++ / texture bug

Post 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.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: miplevel++ / texture bug

Post 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...
Last edited by TradeMark on 17 Jan 2010, 03:10, edited 1 time in total.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: miplevel++ / texture bug

Post 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.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: miplevel++ / texture bug

Post 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...
Last edited by TradeMark on 17 Jan 2010, 03:12, edited 1 time in total.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: miplevel++ / texture bug

Post 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.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: miplevel++ / texture bug

Post by TradeMark »

yeah whatever, dont believe me then

i dont think you actually understood me either...
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Re: miplevel++ / texture bug

Post 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?
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: miplevel++ / texture bug

Post 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.
Umbra
Posts: 46
Joined: 29 Jul 2009, 14:23

Re: miplevel++ / texture bug

Post 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).
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: miplevel++ / texture bug

Post by TradeMark »

oh, what is the latest build... do i have it? been playing spring last week etc...
Master-Athmos
Posts: 916
Joined: 27 Jun 2009, 01:32

Re: miplevel++ / texture bug

Post 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
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: miplevel++ / texture bug

Post by TradeMark »

buildbot... forget about it
Master-Athmos
Posts: 916
Joined: 27 Jun 2009, 01:32

Re: miplevel++ / texture bug

Post by Master-Athmos »

Where is the big deal? Just go HERE, take the latest file and install it in a directory of its own...
Post Reply

Return to “Feature Requests”