Fake Stone Shader Issue...

Started by Njen, December 30, 2006, 07:51:40 PM

Previous topic - Next topic

Njen

I am having a problem orienting the fake stone shader stones properly on surfaces that have been affected by the Twist and Shear node. Below, I have a fractal which I pass through the Twist and Shear node, then merge it back onto the original terrain based on a fractal.

As you can see, the fake stones that are on the normal terrain are fine, but the ones on the sheared terrain are at an angle. Is there anyway to correct this (I have the option 'Only Displace Upwards' already checked in the Fake Stones shader).

Ideally what I would love is to 'reset' the history of the terrain, so that the fake stones shader does not rely on any preexisting data for it's up direction.

Ricowan

Is it possible to put another "compute terrain" node just before the fake stones shader?

Njen

I tried that, but it didn't work. I think the Compute Terrain takes a shader and converts that into height data. I also tried Compute Normal, and it also didn't work.

Doofus

#3
What happens if you put the Twist & Shear between the fractal terrain and the compute terrain?

EDIT: Just tried it. Worked OK.
Rub a little funk on it baby :D

Njen

Cool, thanks for the solution. There is another issue I have which is related to this if anyone has any other ideas. I want to displace only the sheared terrain in all directions, not just vertical. So I put a Displacement Shader in between the Twist and Shear node. Now if the Displacement Shader (which is directly after the Twist and Shear node) is before the Compute Terrain node, then the displacement happens in a vertical direction. But if it happens after the Compute Terrain node then it displaces in all directions, which is what I want.

But then I run into the same problem of the Fake Stone Shader not pointing up on the displaced geometry. So I either need a way to displace in all directions beforefore the Compute Terrain node, or I need a way to 'reset' the direction of geometry in the Shaders section.

The two images below show what I mean, I changed no settings, just the position of the Displacement Shader. The first image shows good displacement, but bad stones, and the second image shows bad displacement and good stones. Any suggestions?

lonewolf

Have you tried a redirect shader with a power fractal on each x,y,z for the displacement? that way your twist & shear will be displaced where you want with control over each direction.

Njen

#6
I just tried that (doing the displacement before the Compute Terrain), and that seems to displace in absolute direction of xyz. I want to be able to displace in the direction of the normal. Though in the Displacement Shader, the Displacement Direction is set to Normal, but is not displacing in the direction of the normal, but in the vertical.

Doofus

Maybe try this?
Rub a little funk on it baby :D