Jump to content

How to set up volume displacements?


magneto

Recommended Posts

Hi,

 

I created a volume (Max Axis = 50) from a Sphere and assigned a Uniform Volume material to it, but after I turn on Displacement Noise, it renders black. If I don't have displacement enabled, I get this:

 

GgNPGdc.png

 

I have Displacement Bound set to 1 when I have the displacement enabled, but it doesn't work.

 

Then I tried using a Basic Smoke material and added my own displacement, but it still shows up without displacements though it renders it correctly.

 

Are there issues with these materials or am I missing something?

 

 

Thanks :)

Link to comment
Share on other sites

Displacement bound is float value, should be a little bit higher than amplitude of displacement. So if texture outputs in -1 +1 range, displacement scale is 0.07,  displacement bound goes to 0.08 or something like. More than that, forces additional sampling of empty space and higher render time, less does clamping. Uniform volume thing together with displacement, works fine here in fresh v14 scene.

Link to comment
Share on other sites

Thanks I tried it in H13 which had these problems. I will give it a try with H14.

 

I always set up my Displacement Bound like you said, most of the times I set it higher not to run into issues. But still the problem seems something else :(

Edited by magneto
Link to comment
Share on other sites

Uniform volume is for rendering actual geometry as a simple (single density value) volume at render time, and would be displacing the geometry before it renders as a volume.  To set up volume displacement, look at how the cloud noise vop or the pyro shader (with pyro displace) are set up.  You basically need a gradient field (can build from normals of your sphere),  so the volume knows where to look for density values. As a ray marches through the volume it can offset P to look up density elsewhere in the density field along a certain direction (along with adding noise to it of course). It's not exactly the same as geometry, because well, it's a volume.  

  • Like 1
Link to comment
Share on other sites

Thanks Solitude, I will give that a try. I just thought the displacement of volumes was the same when I saw how it was done inside Uniform Volume material.

 

Is there a built-in material that renders volumes with the ability to displace them? Just thought one would be provided by default.

 

I will build one myself by looking at the examples you told me.

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