Jump to content

Mix VDBs with different densities and colours in Houdini?


Recommended Posts

Hello :) I am trying to mix/combine the density and colour of two different VDBs into one VDB in Houdini (image 1, file attached).  For the most part, this is working as desired but there are two main issues: 

1. Pink fuzzy edges around the blue VDB - How do I get nice clean edges where the blue VDB smoothly fades out to transparent? (image 2)

2. Blue VDB does not go all the way to the border of the pink VDB - How do I make sure both VDBs finish on the same outside border? (image 3)

I have tried adjusting the voxel size, changing the set up of the VDBs (ie. the exterior/interior band voxels, fill interior) but I can't seem to get it working the way I want.

Can anyone please help me?  I have only been learning Houdini for just over a month so example files would be helpful.  Thank you!

Mix VDBs.hip

5d23e05b2c6a3_MixVDBs1.thumb.jpg.c9bbf47f7770ce3f05cea54b7b1283df.jpg

5d23e05d1ac90_MixVDBs2.thumb.jpg.6b58c2ec33c6a88eca9c75d9f40d2bee.jpg

5d23e05f075ba_MixVDBs3.thumb.jpg.b8bf4ab2142f9aeccfeea6feb850d5ec.jpg

Link to comment
Share on other sites

  • 2 weeks later...

Hi Adrian, thanks so much for your help and for uploading an example file.  I've been through your setup, made a couple of changes and it's looking much better than my original file.  I've added in some nodes that convert the blue VDB to an SDF, dilate it, then convert it back to a fog VDB (inspired by your idea to add in the peak SOP).  This makes the colour extend beyond the density which helps get rid of the pink fuzzy edges.  I had to uncheck 'fill'interior' on the new VDB you added because I need consistent colour throughout the volume as opposed to a falloff.

I'll work on applying this setup to a more complex model, still open to ideas so I can continue to improve my method.

Thank you!

5d3778a5a4874_MixVDBsImproved.thumb.jpg.441b941cc3ce8926596e36d40ecf38ab.jpg

Link to comment
Share on other sites

Hey, glad it helped.

Yes its prob. the cleaner way to do it via SDF than Peak SOP.

And yeah, the Fill Interior Option is a strange thing anyways. I think its actually a very misleading term.

Because in Fog Mode if its not enabled, it actually fills the interior like you would expect. If its enabled, it actually fills the volume with a soft gradient from 1 on the deepest inside and 0 on the outside, so really not what you would expect from the parm name. (still a handy option of course though)

In SDF Mode it makes more sense, there it stores also all negative SDF Values opposed to only the narrow band.

Link to comment
Share on other sites

I think "fill Interior" does the exact right thing. 

As far as i know, a fog volume is always "filled". Otherwise it wouldnt be a fog volume.

Same as storing graduating sdf values towards the interior (like a falloff), i think "fill interior" on a fog stores graduating density values like a falloff  (would have to doublecheck this, not 100% sure, but i think so) towards the "middle".

So I usually use "fill interior" with SDFs rather than Fog volumes.

Hope this helps.

 

 

 

 

 

 

 

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