[prev in list] [next in list] [prev in thread] [next in thread] 

List:       flightgear-devel
Subject:    [Flightgear-devel] Procedural rock
From:       Renk Thorsten <thorsten.i.renk () jyu ! fi>
Date:       2014-10-29 12:05:54
Message-ID: E495A106FF5F31448739E79D34138C193D379568 () mbs1 ! ad ! jyu ! fi
[Download RAW message or body]

Since a few days, I have added a completely procedural rock shader to our effects \
library. This is, to my knowledge our first completely texture-less terrain effect \
and uses only various noise function to compute a pixel color value. As compared with \
a standard texture-overlay based terrain effect, it has a few pros and a few cons:

The biggest benefit (and my main motivation for introducing it) is that it never has \
any tiling artifacts. Any rock texture we have needs to be mapped onto a relatively \
small surface to look good from reasonably close, and inevitably this creates \
checkerboard patterns from farther away. Not so for the procedural rock which can \
render even pronounced crack patters which never generate tiling.

The second benefit is that it's very efficient in a number of ways. On my GPU, I get \
some 25% better performance than with the highest quality overlay texture scheme the \
effect replaces (of course, it is more expensive than just using a single rock \
texture...), it has no texture memory footprint at all, and it's completely \
xml-controlled and can generate a wide range of rock textures and colors to match \
different regions in the world with just a few bytes harddisk space.

The third benefit is that since the shader knows what the color values mean, one can \
do neat things like have snow cling to cracks in the surface.

The main disadvantage is that from really close-up, it doesn't look quite as \
compelling as a rock texture from a photograph.

Since it's experimental technology and still under modification and rough around some \
edges, I haven't really rolled it out officially by assigning the effect to a \
landclass in a material definition yet, but I'd like to invite anyone interested to \
play with the effect and the config options and let me know how it goes. If this in \
essence works, I could imagine that we replace also other 'simple' landclasses (sand \
comes to mind...) by texture-less effects.

The documentation for the effect and its options is in the Wiki (note - the effect is \
coded to kick in only to replace ALS at highest quality level, since it is \
computationally expensive):

http://wiki.flightgear.org/Procedural_Texturing#The_rock_effect

Forum thread with a gallery of some more results:

http://forum.flightgear.org/viewtopic.php?f=47&t=24347

I have to say that it's actually fun to play with all the available options (and get \
some rather silly results now and then - of course not every set of input parameters \
draws something resembling rock, so GIGO applies here).

* Thorsten
------------------------------------------------------------------------------
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic