Map Controlled Terrain Generating Technique

Started by PabloMack, August 16, 2010, 04:11:31 PM

Previous topic - Next topic

PabloMack

I have been thinking about a technique that would be extremely powerful and useful in TG2 if it were possible.  Is there a way to map an image to the whole planet and then input that signal into a terrain generator's displacement amplitude?  This might be easily mis-understood.  I do not mean that the map directly specifies altitude but it becomes the amplitude multiplier that scales the displacement output of say a fractal terrain generator.  In other words, the signal says how high to scale a mountain/valley when the segment of the mountain/valley is at the given rendering location.  Since the terrain generator is global, it builds mountains and valleys all over the planet but the map scales them so that they become flat where the map is black (multiplied by 0) and becomes maximized for mountains/valleys (multiplied by 1) where the map is white.  This would allow you to easily specify where you want mountains and where you want plains. You could also set this onto an altitude map that would determine how low the valleys were and raise the whole terrain differentially using another globally mapped image to specify the terrain's base (which I know you can do).  I have been assuming that when you connect the output of one terrain node into the input of another, the resulting ground level is the sum of the two displacement generators whether they be image maps or terrain generators.  Is this correct?

Come to think of it. You might even want to feed maps (or functions) into other parameters such as "feature scale" and other parameters.

Hetzen

Image map shader at the centre of your planet, with spherical mapping switched on. The problem? Resolution in your map to cover the sphere.

Hetzen

Even at continental scale, you'll run into resolution antialising issues.

Another thing to consider, is that a lot of Dem's/terrain needs to be 'amplified' at a planetry scale to make 'look interesting'.

Not saying it's impossible. I'm just pointing out your techniques limitations, which is already possible.

Kadri

This came to my mind :

http://en.wikipedia.org/wiki/MegaTexture

You can do maybe all things(nearly) without textures because of the nature of TG2.
But maybe it could come handy in some places. I don't know!

PabloMack

#4
I'm not sure that I am being understood. These image files would actually be masks that are (each) controlling a parameter within a fractal terrain generator. The Displacement Amplitude signal would be fed in here (instead of a constant):

[attach=#]

and the Feature Size signal would be fed in here (instead of a constant):

[attach=#]

I know that these masks would have rather low resolution on a planetary scale but they control fractal terrain generators that yield high resolution detail.  Sure, I understand that the transitions from high displacement amplitude to low displacement amplitude and high feature scale to low feature scale would be gradual but it is much better than just the constant settings for the whole planet which is what is apparent from looking at the menus. On the plus side, you could control how strong an effect the terrain generator would have at any one place on the planet but the specific landscape (arbitrarily high resolution) at any one point would still be left up to the fractal generator algorithm. It would be logical to use the constant settings (numerical field and slider) that are in the menus as high-end-scale specifiers.  The mask value used would be multiplied by the current constant setting before arriving at the final value.  For example, if the value at the location on the planet were black, the value would be scaled to zero.  If it were white, then it would be scaled to whatever the constant is in the field/slider for the parameter.  For the first case given above, it would be 2000 for Displacement Amplitude and it would be 5000 for Feature Scale. Gray colors in the mask would scale the parameters to intermediate values depending on their positions on the planet.

Oshyan

I'm not sure how easy it would be to control a fractal in the way you are describing, but the basic idea of "driving a setting by input from another shader" is something we have in mind for the future. In other words being able to feed a fractal or even (as in your original idea) an Image Map Shader output into not the main input of another shader, but the input for a *specific setting*, e.g. scale. So that you could modulate the scale of a fractal by another fractal, in 3D space. That sort of thing. I know this is not something that will happen any time soon, but it's a feature we are certainly interested in for the future.

- Oshyan

PabloMack

#6
This is good to read coming from someone who represents PS.  As it is, you can drive parameters of a terrain displacement shader by time using the "SA>" button (i.e. controlling it on the animation time line). Perhaps this is more easiy accomplished than what I described above.  However, in real life, planets to not normally "pulsate" globally through time (with the possible exception of extreme time-lapse, but uniformly on a global basis?).  However, planets do vary a great deal in their terrain globally depending on the location on the planet's surface.  The Earth is full of examples. If someone like me is to "design" a planet so that flat places and mountainous places occur in certain places of my choice and still retain the benefit of convincing arbitrary detail at any scale, then this capability is essential.  

Seeing that many image masks only have about 8-bits of gray scale,  I can see that an image mask might lack the numerical resolution to control the signal level at the low end of the scale.  For example, if the scale were 9000m, the incremental value might be 9000m/255 = 35m. Perhaps the gray scale could code for an exponential factor instead of linear. The user, though, would simply enter a value of 0 to 1.  The math would be done underneath the surface as is done in other parts of TG2.

Oshyan, thank you for your insights.