Jump to content
Sign in to follow this  
eunchae

How to apply displacement in shaders

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

Share this post


Link to post
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

Share this post


Link to post
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!

Share this post


Link to post
Share on other sites

 

@Nicholas Ralabate 

I have a question again. Where should "smooth" connect to the displaced part? (From Shader)

The edge is too sharp.

Thank you.

 

Share this post


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

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
Sign in to follow this  

×