View topic - More robust options for terrain detail textures



All times are UTC + 1 hour


Post new topic Reply to topic  [ 18 posts ] 
Author Message
PostPosted: 05 Jun 2008, 17:09 
Map Creator
User avatar

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.


Top
 Offline Profile  
 
PostPosted: 05 Jun 2008, 18:03 
AI Coder
User avatar

Joined: 14 Sep 2004, 10:32
Location: Cookieland
All possible using lua. You could draw the entire map using lua.


Top
 Offline Profile  
 
PostPosted: 05 Jun 2008, 19:11 
User avatar

Joined: 05 Jun 2005, 18:13
Location: NL
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


Top
 Offline Profile  
 
PostPosted: 05 Jun 2008, 20:22 
AI Coder
User avatar

Joined: 14 Sep 2004, 10:32
Location: Cookieland
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.


Top
 Offline Profile  
 
PostPosted: 06 Jun 2008, 02:36 
Imperial Winter Developer

Joined: 24 Aug 2004, 07:59
... It also doesn't help that there's all of about 5 people that can actually code LUA with any ability and regularity.


Top
 Offline Profile  
 
PostPosted: 06 Jun 2008, 08:15 
Spring Developer
User avatar

Joined: 28 Jun 2007, 06:30
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:
Image


Top
 Offline Profile  
 
PostPosted: 06 Jun 2008, 16:23 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: ModalitÃ
COOL!


Top
 Offline Profile  
 
PostPosted: 08 Jun 2008, 00:20 
Map Creator
User avatar

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

Edit:
Image


this post is win, i love learning things 8)


Top
 Offline Profile  
 
PostPosted: 06 Aug 2010, 14:05 
User avatar

Joined: 30 Jun 2008, 23:08
Location: Germany
dig dig dig, where is this widget, talked with vbs about it and he found this :)


Top
 Offline Profile  
 
PostPosted: 06 Aug 2010, 14:07 
Moderator
User avatar

Joined: 26 Oct 2007, 15:21
Dunno about the widget, but all of the points brought up by hunterw are addressed in SSMF :D


Top
 Online Profile  
 
PostPosted: 06 Aug 2010, 14:34 
User avatar

Joined: 30 Jun 2008, 23:08
Location: Germany
ssmf?


Top
 Offline Profile  
 
PostPosted: 06 Aug 2010, 14:42 
Lobby Developer
User avatar

Joined: 25 Sep 2006, 12:56
SSMF!


Top
 Offline Profile  
 
PostPosted: 07 Aug 2010, 18:46 
Modeler
User avatar

Joined: 02 Jan 2008, 21:55
Where can I get cloud shadows? :O


Top
 Offline Profile  
 
PostPosted: 09 Aug 2010, 09:56 
User avatar

Joined: 30 Jun 2008, 23:08
Location: Germany
so it will be stored in the mapfile (instead of a seperat widget?)


Top
 Offline Profile  
 
PostPosted: 09 Aug 2010, 11:40 
Lua Coder
User avatar

Joined: 20 Feb 2007, 01:10
I see manolo recompiling every spring map known to mankind.
(you could fix the pinstripes on older maps when you are at it)


Top
 Offline Profile  
 
PostPosted: 09 Aug 2010, 14:20 
User avatar

Joined: 30 Jun 2008, 23:08
Location: Germany
^^

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. :P


Top
 Offline Profile  
 
PostPosted: 09 Aug 2010, 15:23 
Map Creator
User avatar

Joined: 23 Jan 2008, 18:29
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)


Yea you should do that!
especially when SSMF actually does not need any recompiling. Just couple more files and repacking...


Top
 Offline Profile  
 
PostPosted: 09 Aug 2010, 15:25 
Moderator
User avatar

Joined: 26 Oct 2007, 15:21
Fixing scanlines needs recompiling.


Top
 Online Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ] 

All times are UTC + 1 hour


Who is online

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

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.