Jump to content
SteveNi

How to acces vector fields in a volume? (temp,rest,vel)

Recommended Posts

Hi.

So I have a volume from a pyro sim, wich has various vector fields like temperature, density, rest field..etc

How can I acces these vector values in a volume wrangle, so I can do per-voxel suff with them?

They are not attributes so I cant simply write @temp, @rest....

Can someone explain me also why those vector fields are represented as primitives in the volume object?

 

Share this post


Link to post
Share on other sites

you can access them just like attributes, f@density or v@vel in volume wrangle is the right way.

Share this post


Link to post
Share on other sites

Oh ok, I noticed there was an error in my code....my bad :)

I also have another issue tho..

Always in a volume wrangle, if I want to print out the @resx @resy or @resz attributes, and I use the following code:

printf("%s \n", @resx);

I just prints out 0, and to get it to work I have to write: (found it ina old post)

printf("%s \n", @resx, @density);

Can you explain me why?

Share this post


Link to post
Share on other sites

Not quite sure, perhaps @resx does not actually exist as primitive and does not evaluate at all.

if you try:

@density = @density
printf("%d \n", @resx);

it does seems to work.

  • Like 1

Share this post


Link to post
Share on other sites

Thanks.

We should ask to some volume experts or some dude frome SideFx why you have to write

@density = @density

 

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

×