Volume Masking and Mixing

   182   5   1
User Avatar
Member
10 posts
Joined: Nov. 2017
Offline
Hi guys, i'm really enjoying Houdini alot as i'm learning it and hopefully i'm not asking too many questions , but i'm having a little problem that i'm not able to get past currently.

In the picture below, i'm trying to use a sphere mask on the left branch and apply it to the volume on the right branch through a volumemix node. For the most part it is correctly masking out what I want, but the problem is that its removing all of my geo fields.

Basically, on the left there is one field density and on the right volume there is density, heat, temperature..ect and when I multiply them in the volumemix node the density field survives but the other fields are removed going forward. I'd like the multiply to mask out all the available fields on the right.

How would I do that, I thought if I could add those fields to the left as values 1 for each of them that might do it to survive the mult operation or possibly do an append operation which i don't think exists in houdini, but I'm not able to figure that out yet. Any suggestions would be greatly appreciated!




Thanks again for any help!

Attachments:
Volumemasking1.jpg (434.8 KB)

User Avatar
Staff
66 posts
Joined: May 2017
Online
You need to have a matching field for both inputs. Swap your inputs into the volumemix (2nd input generally effects 1st input). After your volumeblur add a name node for the heat field and another for the temperature field. Merge those all together and use that as your mask. Right now it's only effecting density because that's all your mask has.
User Avatar
Member
10 posts
Joined: Nov. 2017
Offline
Hi Mike, thanks again for the quick reply.

I wasn't able to get the masking to work unless I switched the inputs on the volumemix, it kept giving me the result of the sphere cutout from the right side, opposite of what I was going for. I was also not able to add a name node to without a bunch of errors.

However, I was able to figure out a solution, I basically created a new mask for each field and merged all the results in at the end. Then i was able to do a texture pack and motionvector render without any problems and it displayed the correct info i was going for. I have attached a pic for reference.



Also, i noticed when the voxel size of the mask is higher than of the data i'm masking, the output ends up with the lower resolution. How important is it that the mask voxel size match the data voxel size, will, it make a big difference on the rendering?

Thanks!

Attachments:
Volumemasking2.jpg (485.0 KB)

User Avatar
Staff
66 posts
Joined: May 2017
Online
I don't think it'll make too much of a difference in the render but it's generally a good idea to match the resolution. Otherwise it attempts to match internally by copying and interpolating values which might not give the result you're expecting.
User Avatar
Member
10 posts
Joined: Nov. 2017
Offline
I see what you mean, it does make a big difference, thanks for the great help!
User Avatar
Member
2897 posts
Joined: July 2007
Offline
you don't have to do separate mix per volume

- just use Volume Wrangle SOP instead of Volume Mix in your first setup
- first input your cached volumes
- check Bind Each Volume to Density
- assuming the second input has single mask volume, this would work:
f@density *= volumesample(1, 0, @P);
Edited by tamte - Feb. 16, 2018 22:18:02
Tomas Slancik
FX Supervisor
Method Studios, NY
  • Quick Links