Jump to content

How to modify multiple volumes using the same VEX code?


magneto

Recommended Posts

Hi,

 

If I have multiple volumes like density, color, vel, fuel, etc, how can I write code so that I can copy the volume values from the second input of the Volume Wrangle into the first one. For testing I am feeding the same node into both inputs and simply copy the result but I am still getting incorrect result.

 

This is what I wrote:

 

Group: @name=Cd.x

Bind Each Volume to Density: ON

float sample = volumesample(1, @primnum, @P);
@density = sample;

I was expecting the volume to look exactly the same but it looks completely different. I am using Petr's hip file so the volume order is fixed so not sure what's happening this time (before/after):

 

aHhi5lB.png

 

o04H1I6.png

 

 

Thanks :)

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...