Jump to content

Volume Density Gradient


Macha

Recommended Posts

I'm looking for a way to ramp the density of a volume in a controlable and smooth way.

Say you have a cloud of arbitrary shape. I want to increase the density as we get closer into the center of the cloud. There are 2 problems with this:

1) How do I find the (local) center of a cloud? I have done something similar here:

The particles in that video travel to the nearest central part of the object. However, that method is unsuitable for my purpose because it needs to run a pop to find the center.

2) How do I ramp a volume in a visually pleasing way? I always get either-superdense or super-weak results. So, the density ramps in a non-linear way. Looking at the default volume shaders it looks like it is something exponetial.

So far what I have done is to create a point cloud and blend an attribute from the surface of the volume. I create a field out of those attributes and use it multiply density. But as I said there are those 2 problems with. I tend to get volumes with a very visible and sudden increase in density, wheras I want a smooth one.

Makes sense?

Link to comment
Share on other sites

Why don't you use an SDF? you can make one with iso offset and then remap the values with a volume vop?

I can post an example file if you like?

You won't really ever get a 'linear' ramp (in screen) out of a volume... although you can get a more pleasing one by powering the density ...

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