Jump to content

get normal for pyro displacement


Recommended Posts

Hi, everyone.

I have a fog volume with pyro materia have to render, the defaut render looks not good enough, so i have to modify the materia by turn on the displacement . But the pyro displacement need the Normal field, how can i get the normal?

I just transfer the polygon normal to the fog volume simeply, it works,but looks not properly.

I get some tip in forum,but i can not set it to work.

Anyone who give a help will be great.

Thanks.

 

 

 

get_normal.hip

post-9982-0-82864300-1394095037_thumb.jp

Link to comment
Share on other sites

You can't get normals in your volume that way. You want a field for that, specifically a vector field, which points in the right direction. With an SDF that is easy because it is negative inside and positive outside (or the other way around, i never remember). So you want to get the gradient of your density field, a gradient points to increasing values. Because it is an SDF then it will act as a normal for your volume.

 

Here is a hip for that, and since I cant remember how an SDF works you can disable/enable the Volume Mix SOP to invert the normal field. You then of course specify it in your shader to use for displacement.

 

get_normal_dv.hipnc

  • Like 2
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...