Planetside Software Forums

General => Terragen Discussion => Topic started by: cyphyr on February 14, 2010, 06:47:17 PM

Title: CLIFFS ~ Lateral Displacement on truely vertical and near vertical surfaces
Post by: cyphyr on February 14, 2010, 06:47:17 PM
Ok the title says it all.
I've tried all I can think off.

I can create a vertical wall easily, either procedurally (high contrast) or with a bitmap (black to white over a short distance), easy enough. If I add a compute terrain/normal before a power fractal or image shader I can get horizontal displacement but it is horribly distorted. I'm guessing that this simply due to their not being enough polys in the vertical section to displace properly. Any ideas how to add extra polys in the cliff face.
One solution I have found that does work is to have a 45 degree angled surface (ish), displace that and then add another horizontal displacement to the cliff face fading in as the surface gets higher via a distribution shader. This works to a degree but when faced with a corner it "rounds" off, not the effect I'm after.

Solutions on a post card please lol :)

Richard

ps examples to follow if required
Title: Re: CLIFFS ~ Lateral Displacement on truely vertical and near vertical surfaces
Post by: cyphyr on February 14, 2010, 11:01:39 PM
Heres a screeny :)
The PF is the same in both cases, the only difference being that the terrain has a compute normal and a slope restriction. However the displacements are completely different, only becoming similar where the slope fades out at the top of the cliff.
Richard
Title: Re: CLIFFS ~ Lateral Displacement on truely vertical and near vertical surfaces
Post by: MGebhart on February 14, 2010, 11:25:10 PM
Richard,

Looks like you have got something on the way to being really useful. I will make it a point to follow this thread.

Excellent project.

Marc
Title: Re: CLIFFS ~ Lateral Displacement on truely vertical and near vertical surfaces
Post by: cyphyr on February 14, 2010, 11:34:34 PM
Hehe, thanks but the reason for posting is that I'm stuck :( All lateral displacements seem to get way distorted if they're displacing on a vertical or near vertical surface.
Oh well, back to the drawing board ... .. .
Richard
Title: Re: CLIFFS ~ Lateral Displacement on truely vertical and near vertical surfaces
Post by: MGebhart on February 14, 2010, 11:46:22 PM
Would you want to share the file and let me smack it around? Maybe I'll figure a way by accident. Ha!

Marc
Title: Re: CLIFFS ~ Lateral Displacement on truely vertical and near vertical surfaces
Post by: cyphyr on February 14, 2010, 11:58:10 PM
Sure :)
The chalange is to get "similar" displacement on the terrain as on the plane.
Enjoy :)
Richard
Title: Re: CLIFFS ~ Lateral Displacement on truely vertical and near vertical surfaces
Post by: FrankB on February 15, 2010, 02:27:00 AM
Hey Richard, there are two possible causes that spring to my mind. Number one: as you are applying the displacement to the outer side of the heigtfield, that heightfield could be border-blended into the procedural planet sphere, which reduces detail at the heightfield's border. Secondly, although I am not certain about that, TG2 might not know about the extra texture space that your steep heightfield wall has created, so could it be that an extra "tex coords" before the displacement would help?

To check my first suspicion: does the displacement look ok on slopes farther inside the heightfield (given you slope constraint is not prohibiting it)?

Regards,
Frank