Jump to content

how to set up a volume falloff


pencha

Recommended Posts

I'm looking for a way to do a volume falloff.

The ideal way would be to be able to lookup the SDF value and modify the resulting density with a curve, but I think the SDF value is only accessible via the HDK, as it's internal to DOPS, am I right?

The tool would allow me to pipe a sphere (or almost any geometry) into an ISOOFFSET and, modifying a curve, be able to get a smooth transition between the density at the core of the geometry and the outer part, instead of getting a rough inside/outside cut.

I know that with a low-res IsoOffset you can get a smooth transition, but not when you work with high sample divs.

Any ideas on how to set this up?

Thanks

Link to comment
Share on other sites

I'm looking for a way to do a volume falloff.

What are you trying to accomplish?

The ideal way would be to be able to lookup the SDF value and modify the resulting density with a curve, but I think the SDF value is only accessible via the HDK, as it's internal to DOPS, am I right?

Starting from 10.0.388 you can use an SDF volume from SOPs as your collision volume in DOPs. (From the journal:)

 Wednesday, September 2, 2009
Houdini 10.0.388: The RBD Object, Configure Object, and Static Object DOPs now have an
option for the proxy volume to build the SDF from. By using this and the new
Volume Sample option, one can use volumes from SOPs as one's collision SDFs,
providing more control over their generation. 

You can make your volume with IsoOffset SOP, and then edit it with Volume SOP or with a Volume VOPSOP.

Actually, now that I think of it, by arbitrarily editing the SDF values you will easily end up with an illegal/nonphysical sdf. For example, the values of neighboring cells in an sdf can't really differ by more than the width of one cell. Dunno how Houdini deals with it.

The tool would allow me to pipe a sphere (or almost any geometry) into an ISOOFFSET and, modifying a curve, be able to get a smooth transition between the density at the core of the geometry and the outer part, instead of getting a rough inside/outside cut.

I know that with a low-res IsoOffset you can get a smooth transition, but not when you work with high sample divs.

By definition an sdf volume defines a rough inside/outside cut. The values themselves are smooth as they represent the distance to said cut. If you would modify an sdf volume of a sphere with an y-axis gradient, you would in essence be just squashing the sphere in y. (The above legality issues notwithstanding)

So, what are you trying to accomplish? :)

eetu.

Link to comment
Share on other sites

Like eetu said, isoOffset will generate it and then your are free to remap it how you wish.... attached an example.

eetu: this could be useful for soft edges on a volume... (in place of a Fog Volume, which has hard edges)

SOPSDF.hip

Edited by sam.h
Link to comment
Share on other sites

I was thinking that SDF held two values, one for density and the other was the actual SDF value, after reading your posts I see I was wrong.

And what I wanted to do is exactly what sam.h posted! edit> Just add a scalar ramp to sam.h example.

So thanks for the help!

Edited by pencha
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...