SteveNi Posted January 4, 2017 Share Posted January 4, 2017 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? Quote Link to comment Share on other sites More sharing options...
dimovfx Posted January 4, 2017 Share Posted January 4, 2017 you can access them just like attributes, f@density or v@vel in volume wrangle is the right way. Quote Link to comment Share on other sites More sharing options...
SteveNi Posted January 7, 2017 Author Share Posted January 7, 2017 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? Quote Link to comment Share on other sites More sharing options...
dimovfx Posted January 7, 2017 Share Posted January 7, 2017 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. 1 Quote Link to comment Share on other sites More sharing options...
SteveNi Posted January 7, 2017 Author Share Posted January 7, 2017 Thanks. We should ask to some volume experts or some dude frome SideFx why you have to write @density = @density Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.