Joined: 14 May 2006, 11:22 Location: san antonio, tx
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.
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.
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
Joined: 14 May 2006, 11:22 Location: san antonio, tx
jK 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
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.
Users browsing this forum: No registered users and 1 guest
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum