anupamd Posted October 6, 2012 Share Posted October 6, 2012 Does anyone know have any info/docs on .geo/.bgeo file format as it relates to volumes. The current docs don’t really say anything about how volumes are stored (other than they are primitive attributes). I am trying to export velocity fields out of a fluid sim for use elsewhere and writing these out of Houdini as .geo ascii files. For a 10x10x10 volume we get 3 data blocks (one for each dimention). That makes sense to me. But for a 20x20x20 we get 8 data blocks per dimension, which I cant make sense of. Attached are the two files. If someone knows more about how volumes are written out to .geo files I'd love to speak with you further. Any assistance would be appreciated. See attached. pyro_velexport_debug.hip Quote Link to comment Share on other sites More sharing options...
edward Posted October 6, 2012 Share Posted October 6, 2012 I only know them from UT_VoxelArray.h in the HDK. The scalar volume fields are stored as voxel tiles of maximum 16x16x16 dimensions. So voxel (x, y, z) will be stored in tile (x/16, y/16, z/16). For a 10x10x10 volume, you only require 1 tile. For a 20x20x20 field, I would expect that you get 8 tiles: one 16x16x16 tile, three 16x16x4 combinations, three 4x4x16 combinations, and one 4x4x4. As for the tile order, I think it's done in x major order. ie. tile (x, y, z) is tile number ((z * res_z + y) * res_y + x) for a volume with tile resolution (res_x, res_y, res_z). This is all I know, YMMV. Quote Link to comment Share on other sites More sharing options...
edward Posted October 6, 2012 Share Posted October 6, 2012 BTW, why do you want to do this? You know there's a Volume VOP SOP for processing raw volumes, the SOP Solver if you need to process it over time. Quote Link to comment Share on other sites More sharing options...
anupamd Posted October 6, 2012 Author Share Posted October 6, 2012 Wow this is great help an will also check out additional documentation in UT_VoxelArray.h. Ok I will try that out! Thanks so much for the speedy response! ps: need to export velocity fields out of houdini for use in a seperate propritary application (not houdini). Quote Link to comment Share on other sites More sharing options...
johner Posted October 6, 2012 Share Posted October 6, 2012 Python is really good for this sort of thing. You can get the volumes as hou.Volume objects, then use allVoxels to get the raw float values. Or use allVoxelsAsString and create python Array objects or numpy objects from which you can export in many different formats. Also note that velocity fields will typically use Face sampling, meaning the values will be stored on the voxel faces and the field will be one size longer along that dimension. So if you've got a 100x100x100 sim, for example, the field for the x-velocity will actually be resolution 101x100x100, since the values are stored on the faces along the x-axis. Similarly for y- and z-. 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.