Macha Posted February 24, 2010 Share Posted February 24, 2010 How is data from fields in dops stored in volumes? We can read pressure, velocity and such things from fluid calculations into SOP context. I was thinking of using an attribute transfer to blend those values with geometry but I can't figure out how they are stored in the volume data, and how to extract them. Quote Link to comment Share on other sites More sharing options...
edward Posted March 2, 2010 Share Posted March 2, 2010 From what little I know, the fields are stored as scalar volume primitives. If you want to use AttribTransfer, I think you'd need to evaluate the scalar values into points. Quote Link to comment Share on other sites More sharing options...
johner Posted March 2, 2010 Share Posted March 2, 2010 Yeah, the fastest way is usually using VolumeSample from within a VOP SOP to read the values into point attributes. The points will go into the first input, the volumes in the second, then on the VolumeSample VOP change the OP Input Index to 1 and the Primitive Number to whichever volume you're interested in. If you want AttribTransfer style filtering, the easiest way might be to create a grid of points that correspond to each voxel (Box SOP should do it with some expressions). Then VolumeSample your values from the fields to the grid points, then AttributeTransfer to your geometry. If you don't care about filtering, i.e. you just want point sampling, you can VolumeSample straight to your geometry. Quote Link to comment Share on other sites More sharing options...
Jason Posted March 2, 2010 Share Posted March 2, 2010 I don't believe you can sample SIM_SDF nor SIM_ScalarFields geometry data I think you can only sample SIM_Geometry. This is an outstanding RFE: 35603, logged in May, 2009. echo `volumevoxeldiameter("/obj/AutoDopNetwork:obj0/density",0)` Are these tools capable of querying dopnets? Thanks, Jason 2009-05-21 11:49:32 (EDT): jlait: Not if it isn't a SIM_Geometry. note that volumevoxeldiameter("/obj/AutoDopNetwork:obj0/density/Visualization",0) hopefully does work. 2009-05-21 14:42:18 (EDT): jiversen@rhythm.com: Ah, thanks. Would it make sense to extend the volume*() functions to be able to be able to access SIM_ScalarField and SIM_SDF, etc? 2009-05-21 15:00:39 (EDT): jlait: Yes it would. Which is why this RFE remains. Quote Link to comment Share on other sites More sharing options...
Macha Posted March 2, 2010 Author Share Posted March 2, 2010 (edited) Cool. Thanks for helping me out there. Now I'm getting a grip on this stuff. Attached image shows a velocity field transferred onto points and copy-stamped spheres. Edited March 2, 2010 by Macha 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.