Jump to content
PengZhang

displacement custom control?

Recommended Posts

Hi,guys,

i have a shader question here.

i want to do some displacement on my rigidbody chunk to add detail.

let's say we have a cube,in the attatchment jpg ,it is a.(you can imagine it is a rigid chunk),

if i add noise displacement on it,i got b.

but,i do not want the top face get the displacement,because i hope the top face looks like a flat ground.

so i set the noise vector y to 0,and i got c.

the problem is the top face looks strange,the reason i think is the x z position of the top face changed,

the normal should changed too.

so,i set the normal vector y 0,then i got d,you can see,there is some change,but it did not solve the problem.

what can i do to get what i want?

i need your help.

thank you.

Peng Zhang.post-8141-0-89452800-1371629424_thumb.jp

shader_displacement6.hip

Share this post


Link to post
Share on other sites

I think the way to go is not messing up with normals and positions.

If u are using the "displace along normal" node, just add an attribute in shops, that has a value of 0 where u don´t want displacement and 1 where u want.

Read that in shops using a parameter node with the attribute name in it, and multiply the displacement amout by this number.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×