More robust options for terrain detail textures
Moderator: Moderators
More robust options for terrain detail textures
We could do some very cool things if we had more control over terrain detail textures.
First and foremost, there should be a .smd setting called DetailTextureScale. The current version of Spring scales the detail texture no matter what resolution to one size...we should be able to set that scale.
Now for the harder suggestions...imagine if we could render the detail texture as a normal map? Using the map's sundirection parameters as a base for setting the normal map's light, terrains would look unbelievably better. Since texture map resolution is rather limited, this would be the perfect way to make them look high-resolution when viewed up close.
The fun doesn't stop there - what about an option to use the detail texture as a specular map? Ice and snow maps could actually have a reflective sheen off of the snow and glaciers. This would also be great for metal maps.
Another simpler idea that occured to me was to be able to use just a normal detail texture but set a parameter for motion. We could use a cloud shadow texture, then set the texture to pan across the ground slowly. The cloud shadows would not show up on units, but they would sure look cool anyway.
First and foremost, there should be a .smd setting called DetailTextureScale. The current version of Spring scales the detail texture no matter what resolution to one size...we should be able to set that scale.
Now for the harder suggestions...imagine if we could render the detail texture as a normal map? Using the map's sundirection parameters as a base for setting the normal map's light, terrains would look unbelievably better. Since texture map resolution is rather limited, this would be the perfect way to make them look high-resolution when viewed up close.
The fun doesn't stop there - what about an option to use the detail texture as a specular map? Ice and snow maps could actually have a reflective sheen off of the snow and glaciers. This would also be great for metal maps.
Another simpler idea that occured to me was to be able to use just a normal detail texture but set a parameter for motion. We could use a cloud shadow texture, then set the texture to pan across the ground slowly. The cloud shadows would not show up on units, but they would sure look cool anyway.
Re: More robust options for terrain detail textures
All possible using lua. You could draw the entire map using lua.
Re: More robust options for terrain detail textures
Why not just start rebuilding spring in lua. It's all possible.
Does spring have MMORPG support? Yes, with lua
AFAIK trepans last lua map options addition does not allow modifying the map rendering algorithm itself, just the parameters
Does spring have MMORPG support? Yes, with lua
AFAIK trepans last lua map options addition does not allow modifying the map rendering algorithm itself, just the parameters
Re: More robust options for terrain detail textures
IIRC Jk said you can tell the engine not to render the ground, and since there're OpenGL calls available theres nothing stopping you from drawing the ground in its place. Or from drawing the map directly ontop of the existing map but several pixels higher up. which would work even though itd mean rendering the map twice which isnt exactly ideal.
-
Warlord Zsinj
- Imperial Winter Developer
- Posts: 3742
- Joined: 24 Aug 2004, 08:59
Re: More robust options for terrain detail textures
... It also doesn't help that there's all of about 5 people that can actually code LUA with any ability and regularity.
Re: More robust options for terrain detail textures
bad idea to draw (on) the ground with lua.
ground rendering takes MUCH time, that's why it is highly optimized in modern engines. Things you can't do with lua ...
See that startbox widget: at the start it renders on <50% of the map and it is _damn_ slow (30-50% fpsdrop), you only don't need those fps at the start, but it isn't usable ingame.
The only way to do it with lua is using the new float32 heightexture (only in svn), so you could use the vertex shader and a display list (with hardbounded LOD). But I wouldn't advise it to combine it with the engine algorithm, you will always get ugly glitches. That's what happens with ground decals atm they are rendered after the ground and have always full vertex detail -> ignore ground LOD (that's why they are soo slow), so they differ from the groundvertices, you try to solve it with a PolygonOffset and a small y-offset, but it still doesn't help, you always see those dead triangles ...
The only solutions are: redoing the whole ground rendering code (use a vertex shader + float32 heightmap) or modifying it the current code, so it supports multi-layers (it sounds easier than it is).
PS: cloud shadows are something different (you can use a different technique for those). I already have a demo widget :p
Edit:

ground rendering takes MUCH time, that's why it is highly optimized in modern engines. Things you can't do with lua ...
See that startbox widget: at the start it renders on <50% of the map and it is _damn_ slow (30-50% fpsdrop), you only don't need those fps at the start, but it isn't usable ingame.
The only way to do it with lua is using the new float32 heightexture (only in svn), so you could use the vertex shader and a display list (with hardbounded LOD). But I wouldn't advise it to combine it with the engine algorithm, you will always get ugly glitches. That's what happens with ground decals atm they are rendered after the ground and have always full vertex detail -> ignore ground LOD (that's why they are soo slow), so they differ from the groundvertices, you try to solve it with a PolygonOffset and a small y-offset, but it still doesn't help, you always see those dead triangles ...
The only solutions are: redoing the whole ground rendering code (use a vertex shader + float32 heightmap) or modifying it the current code, so it supports multi-layers (it sounds easier than it is).
PS: cloud shadows are something different (you can use a different technique for those). I already have a demo widget :p
Edit:

Re: More robust options for terrain detail textures
this post is win, i love learning thingsjK wrote:bad idea to draw (on) the ground with lua.
ground rendering takes MUCH time, that's why it is highly optimized in modern engines. Things you can't do with lua ...
See that startbox widget: at the start it renders on <50% of the map and it is _damn_ slow (30-50% fpsdrop), you only don't need those fps at the start, but it isn't usable ingame.
The only way to do it with lua is using the new float32 heightexture (only in svn), so you could use the vertex shader and a display list (with hardbounded LOD). But I wouldn't advise it to combine it with the engine algorithm, you will always get ugly glitches. That's what happens with ground decals atm they are rendered after the ground and have always full vertex detail -> ignore ground LOD (that's why they are soo slow), so they differ from the groundvertices, you try to solve it with a PolygonOffset and a small y-offset, but it still doesn't help, you always see those dead triangles ...
The only solutions are: redoing the whole ground rendering code (use a vertex shader + float32 heightmap) or modifying it the current code, so it supports multi-layers (it sounds easier than it is).
PS: cloud shadows are something different (you can use a different technique for those). I already have a demo widget :p
Edit:
Re: More robust options for terrain detail textures
dig dig dig, where is this widget, talked with vbs about it and he found this :)
Re: More robust options for terrain detail textures
Dunno about the widget, but all of the points brought up by hunterw are addressed in SSMF :D
- BrainDamage
- Lobby Developer
- Posts: 1164
- Joined: 25 Sep 2006, 13:56
Re: More robust options for terrain detail textures
Where can I get cloud shadows? :O
Re: More robust options for terrain detail textures
so it will be stored in the mapfile (instead of a seperat widget?)
- very_bad_soldier
- Posts: 1397
- Joined: 20 Feb 2007, 01:10
Re: More robust options for terrain detail textures
I see manolo recompiling every spring map known to mankind.
(you could fix the pinstripes on older maps when you are at it)
(you could fix the pinstripes on older maps when you are at it)
Re: More robust options for terrain detail textures
^^
i know nothing about mapping nor the configs. about them nor ssmf (i skip long textes with bla bla bla) - so i just looked at the pic and thought WWWWWOOOOOOOWAAAAWW.
i know nothing about mapping nor the configs. about them nor ssmf (i skip long textes with bla bla bla) - so i just looked at the pic and thought WWWWWOOOOOOOWAAAAWW.
- SirArtturi
- Posts: 1164
- Joined: 23 Jan 2008, 18:29
Re: More robust options for terrain detail textures
Yea you should do that!very_bad_soldier wrote:I see manolo recompiling every spring map known to mankind.
(you could fix the pinstripes on older maps when you are at it)
especially when SSMF actually does not need any recompiling. Just couple more files and repacking...
Re: More robust options for terrain detail textures
Fixing scanlines needs recompiling.
