Can functions set the boundaries for terrain height? (and a request)

Started by Sengin, March 15, 2007, 06:05:15 PM

Previous topic - Next topic

Sengin

Can functions set the boundaries for terrain height, and thus act as a pseudo boolean shader?  My approach is to have two equations using the current x value (Get position -> X to scalar) and use that value to calculate two equations.  I then want to check the current altitude to see if it lies between the two values of the calculated equations (if alt. < equation 1 and > equation 2).  If it does lie between those, I want to use that y value for generating terrain.  I have the equations and conditional scalars set up, but my world is flat.  I do not know what shaders to use after that, I've tried connecting it to a surface layer's displacement function, a redirect shader, and a displacement shader connected to the compute terrain.  Of course, I may not have connected them correctly.  Does anyone have any ideas, either for the connected shader/s or with the get altitude part of the function?

Also, I think a random function node would be great.  It would take two input nodes, the lower and upper limit of the value.  The node would have a setting of using either integers of floating point numbers.  The node could have a hidden seed or one the user can manually change (so that each render wouldn't look different).  I think this could be a great way to make some things (placement of objects, creation of terrains using functions) look more realistic because of slight randomness (think of small details on rocks, cliffs, water movements).  What do you guys think of a random number generating funtion node?


bigben

It should be able to. I haven't played with functions yet but part one of the Function only landscape post should provide a start. http://forums.planetside.co.uk/index.php?topic=843.msg8098#msg8098

You'll obvious need to add some extra parts to set the restriction for the boundaries of your terrain, but the general principle is the same as defining the base of the pyramid.

Sengin

I've already created the basic look of the waves using two equations, I just don't know how to tell the compute terrain node to either use a value or not to use a value (either through a specific shader or shaders, some sort of special function node, etc...).