Applying displacement to vertical surfaces?

Started by reck, August 25, 2008, 09:12:43 AM

Previous topic - Next topic

reck

How would I go about making the side of this heightfield look more like a rock face or canyon wall? By default the side of the hf is very smooth, I need to be able to add some large displacement to give it a more rocky feel and then add some smaller displacements for the little details.

I'm not sure which nodes I should be using to control displacement on the sides of vertical edges.

Seth


cyphyr

Or a PF shader restricted via height and slope :)
Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

rcallicotte

This has been attempted before.  Ask TU...or was it BigBen?

If nothing else, we could learn what we need to learn all over again.
So this is Disney World.  Can we live here?

moodflow

#4
To do this correctly, you'd need to make sure there was a compute terrain node just after the node that creates this "wall", else the detail won't protrude from the wall, it will try to protrude from the smooth planet surface.  The patch size could likely be a larger number size there is no detail on the wall initially (but you'll need to play with the values to get a good fit).  Then you could use any node that would add displacement detail, like a power fractal, a redirect shader (with power fractal attached), fake stones, etc.

Can you post a .tgd of this?
http://www.moodflow.com
mood-inspiring images and music

reck

I've been trying to use power fractals restricted by height but it was only displacing the planet, not the wall. Moodflows post explains why, I had a computer terrain node, but it wasn't high enough in the flow. I added another computer terrain and now the displacement is working on the walls. Thanks moodflow.

rcallicotte

...so it was moodflow...  The mystery doesn't thicken.

So this is Disney World.  Can we live here?

Tangled-Universe

Quote from: calico on August 25, 2008, 09:29:10 AM
This has been attempted before.  Ask TU...or was it BigBen?

If nothing else, we could learn what we need to learn all over again.

Yup, here I am...I remember I ran into the same problem some time ago.

Moodflow is right, putting a compute terrain in front of these kind of operations is necessary. However, as some of you may have experienced before, using multiple compute terrain/normal nodes in the chain can create crazy results.

I'd like to add that for these kind of walls a simple PF will be sufficient for displacements rather than a redirect shader since the wall is almost vertical and thus the normals are "lateral". At least, I find it more convenient to work with.

Martin

moodflow

Yep, as TU stated, multiple compute normals can create strange effects.

I've been using the stack technique to generate some great results, but so far, they are not consistent and must be done based on feel...which means either I am not understanding the concept fully, or TG2 isn't rendering it properly yet (likely the former, though I suspect the renderer has problems with extreme displacements at this time).

For example, use a PF to generate terrain with very large scales (lets say smallest scale at 1000 and displacement at 5000 or more), then use a compute terrain with a patch size of 1000 or 500 (to match the terrain).  Then add another PF to generate different and smaller scaled detail on this same terrain.  Since the previous terrain was computed (aka "set") by the compute terrain, it will now apply the next terrain over the prior terrain's bumps (rather than straight up).  Then add a compute normal to "set" this overall terrain as the final terrain.  By this time, there will be significant overhangs and such, and yes, it will require extra computing power, but its worth it, since we want some seriously varied terrain.  I've tried to keep going with this, but always end up with strange overlap artifacts, so I am still trying to understand whats going on overall.

And as stated on a previous post, if you set the patch size too small, and then displace it with large numbers, you'll get terrain that's turned in on itself, similar to how curtains bunch up.  This tends to cause those strange dark shadows, likely due to TG2's renderer being "confused" on how to display the surface.  That's my best guess, and only Planetside will be able to officially answer this.
http://www.moodflow.com
mood-inspiring images and music

Oshyan

Terrain that is displacing over itself is almost certain to cause render issues as it's a difficult thing to visualize correctly. So your explanation is likely correct. Did you need more detail on something?

- Oshyan