Puffy Pinnacles

Started by pmetschan, June 28, 2010, 01:31:39 PM

Previous topic - Next topic

pmetschan

How  should my nodes be setup to produce "puffy" tops from a pointy heightfield.
In general I think I want to use the redirect shader and then pipe a powerFractal into
the x and z. The portion i am not sure of how to control is the "height" bias. Meaning
I want to have the effect at its maximum on the peak but less-0 on the bottom?

Goms

i dont think the redirect shader is the right way to do this.
you need to blend a power fractal shader after the heightfield shader with a distribution shader set to the height you want. also, you need to use the final position as indicator and a compute normal node before the power fractal. have a look at the file attached. ;)
(don't forget to press generate terrain)

Quote from: FrankB
you're never going to finish this image ;-)

dandelO

I think I would use the redirect shader for this. You can specify displacement along any direction via redirect shader and no preceding compute normal/terrain is required.
I think redirecting is a nice, cheap way to add large, multi-directional displacements before computing your terrain, then on your final resulting(computed only once) terrain, you can populate etc.

Using both a negative displacement, and a positive displacement value(with different seed values, of course) in the X and Z fields of the redirect shader to get lateral redirection, I think, would be faster to calculate than using just one 'lateral' displacement and another compute terrain node. Again, I think, maybe this isn't true, I'm very often wrong. :D
You would still use your distribution shader/s on the negative and positive displacement functions.

As with everything with TG2, though, there's many different ways to skin a mongoose. I like the redirect shader, however. :)

FrankB

I dare a bet Goms method is faster, without having tested it. Redirect shaders add a lot to render time, I find. Actually (I haven't looked at Goms file), it's sufficient to stick a "tex coords from xyz" above the distribution shader that controls the altitude-based effect of the powerfractal. No compute terrain needed, unless the distribution shader also needs to distribute based on slope, too.

FrankB

thought about it twice... of course you need the compute terrain if you want to have the powerfractal displace sideways too. You need the tex coordinates AND the normals to make this work. So Goms example is correct, although I would assemble the nodes differently.

Frank


Goms

#5
doesn't the compute terrain automatically computes the Tex coords?
but i dont think this is needed anyway, as the distribution shader gets the information from the final position.
(which is indeed not the most elegant way. but works)
this idea was my first shot; so there is a better way i guess.


the redirect shader might be better with simple fractals. i just interpreted the drawing as "the top heights should grow along normal".
i attached a simplified node network with the key values.
a huge patch size to not get a "blobby folded" terrain, displacement amplitude and offset, distribution shader as said to final pos.

with more smoother shades... are we again talking about massive phalli made with tg2?
i remember sth from a long time ago....


Quote from: FrankB on June 28, 2010, 04:09:50 PM
Quote from: Goms on June 28, 2010, 04:01:52 PM
doesn't the compute terrain automatically computes the Tex coords?

that's what I meant: tex coords + normals = compute terrain

ha. good to know. actually never thought about the difference.
Quote from: FrankB
you're never going to finish this image ;-)

FrankB

Quote from: Goms on June 28, 2010, 04:01:52 PM
doesn't the compute terrain automatically computes the Tex coords?

that's what I meant: tex coords + normals = compute terrain

pmetschan

Thanks for all the replies guys. Will try it out tonight and post the result when i get it working.