Jump to content

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

Link to comment
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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...