I'd like to ask for a few opinions.

The problem: Vertex shader coordinates are continuous only within a terrain 
tile, so the noise distributions we use show discontinuities across terrain 
tiles - seen most prominently in snow or fog patches.

The solution: Emilian and Fred have figured out a way to transform vertex 
coordinates to global world coordinates - these are contiinuous across tiles, 
so we can use those.

The fine-print: The numerical accuracy of world-coordinates is limited and much 
worse than tile-internal coordinates - which means that, dependent on system 
and implementation details, they can't be used for noise below a 25 m - 5m 
scale, i.e. to generate fine-grained noise we still need the local 
tile-internal coordinates. In addition, there's no set of 2D coordinates which 
doesn't have distortions and covers Earth seamlessly, so noise lookup in world 
coordinates has either other discontinuities (i.e. is valid at startup only and 
noise 'jumps' every 1000 km of flight, or is valid at startup but looks weird 
after 8000 km,...) or it needs to be 3D noise.

Now, 3D noise is quite a bit more costly than 2D noise - if done by texture, 
memory consumption goes resolution ^3 instead of resolution ^2, if done by 
function it's a bit more than double the computational load of 2d noise (2d 
Perlin noise needs 4 random numbers and 3 interpolations, 3d Perlin noise needs 
8 random numbers and 7 interpolations).

The bill: In order to make this work, we'd need an additional varying vec3 to 
transport world coordinates in every shader in addition to the varying vec2 to 
transport local tile coordinates, and convert the low frequency noise to 3D 
computations, doubling their computational load. This has to be in every 
terrain shader to avoid fog discontinuities across different effects.

There's a lot of other eye candy that can be generated for this pricetag. So 
what I'd like to know is - what are the current concerns - performance, the 
seams, something else ...? I think based on my tests I could implement the 
seamless noise scheme as above, but it'd slow things down by probably 25% on 
many systems. Opinions - should we be doing this?

* Thorsten


------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_123012
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to