Jump to content

How to apply displacement in shaders


eunchae

Recommended Posts

Hi.

I want to apply displacement to the area I want.

For example, I want'dis' to be applied only to the red area as in the image.

But I am not sure how to do it in the shader.

Could you please let me know?

Or maybe it's a reference address.

The example file is also good.

Thanks in advance.

displacement.JPG

Link to comment
Share on other sites

You just bind in your Cd attribute and then use that to drive the displacement amount.  I included a minimal example, but the principle is the same when using premade shaders like Classic/Principled.  If you do it yourself don't forget to turn on the vm_displacebound setting on the object.

 

image.thumb.png.734f7feb2ab3ce348ecd8405ea88d84b.png

nr_simple_displacement.hiplc

  • Thanks 1
Link to comment
Share on other sites

10 hours ago, Nicholas Ralabate said:

You just bind in your Cd attribute and then use that to drive the displacement amount.  I included a minimal example, but the principle is the same when using premade shaders like Classic/Principled.  If you do it yourself don't forget to turn on the vm_displacebound setting on the object.

 

image.thumb.png.734f7feb2ab3ce348ecd8405ea88d84b.png

nr_simple_displacement.hiplc

Thank you very much!

Link to comment
Share on other sites

look at the 1st pic, between red/blue....there simply ain't enough geo for a smooth deformation.

try your sphere frequency say 50 ?

I don't know anything about displacements in renders tho, so could be wrong.

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...