How to blend volumes?

   3204   2   0
User Avatar
Member
1177 posts
Joined: April 2017
Offline
Hi!

I made a noised volume using a volume wrangle. I duplicated that wrangle and change the settings to get a different noise. How can I blend both volumes? I tried using a volume vop but it looks like the density can only be picked from input 0.

-Olivier

EDIT: I see there's a VolumeMix sop I can set to blend but I don't get how to mask it. Lets say I wanted the top portion of the volume to be A and the bottom to be B with a gradual transition?
Edited by olivierth - July 3, 2019 16:12:29
User Avatar
Member
9379 posts
Joined: July 2007
Offline
float y = relbbox(0, @P).y;
float mask = chramp("falloff", y);
float d0 = f@density;
float d1 = volumesample(1, 0, @P);
f@density = lerp(d0, d1, mask);
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
1177 posts
Joined: April 2017
Offline
Ah! volumesample is what I was looking for!

Thanks tamte!
  • Quick Links