Jump to content
Nicole

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

Share this post


Link to post
Share on other sites

Hey,

here you go.

Not a technically super clean solution but I guess it works.

Also look inside the Noise Vops, I multiplied the density by the noise instead of directly piping the noise in the density output. This gives artefacts on the edges as well.

 

Mix VDBs_fix.hipnc

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
Posted (edited)

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×