Tetrahedral volume grids

   7901   7   2
User Avatar
Member
21 posts
Joined: Nov. 2010
Offline
I'm working with tetrahedral voxel grids outside of Houdini. I'm looking for some ideas on efficient ways of importing this data into Houdini for manipulation and eventual rendering in Mantra.

Currently, I convert each tetrahedron into four disconnected polygonal faces and bring them in as such. This allows me to interpolate along faces and convert it all to a high-res cartesian grid in Houdini with an attribTransfer. The workflow and results could be better.

I'm not aware of native Houdini support for tetrahedral voxel grids. Assume I know nothing about the HDK. Is it possible to develope a set of tools to import, visualize, manipulate and render such data without converting to square voxels?

or is there a better way? Thanks for sharing.

-Greg
Edited by - Sept. 16, 2011 15:12:25

Attachments:
tet_grid.jpg (189.9 KB)

User Avatar
Member
21 posts
Joined: Nov. 2010
Offline
For those knowledgeable in the HDK, does it support defining a new data type, a tetrahedral volume grid in this case (or an octree), writing other custom op's to manipulate the new type, all renderable in Mantra?

Thanks,

-Greg
User Avatar
Member
15 posts
Joined: March 2010
Offline
Hi,

I have a question which is related to this thread so I thought I'd rather put it in here than making a new one.

I am also looking into how much I can use houdini for working with tetrahedral meshes. What I specifically want to do is to turn a mesh into a tetrahedral grid and export it with some custom python code.

I have seen the Tetrahedralize sop and with houdini 12 I found this statement:
New primitive type: tetrahedron. You can convert to poly and display it. The expected SOPs, Iso Offset, and Tetrahedralize, now create tetrahedrons when appropriate

I was looking in the hou python reference and wasn't able to find any python functions related to tetrahedral primitives. Is it possible in houdini12 to access tetrahedral primitives from script similar to how we can access polygon primitives?

Thanks in advance,
David
User Avatar
Staff
6219 posts
Joined: July 2005
Offline
You can manipulate existing tetrahedrons using their vertices(), just like you can polygons.

It seems there was an oversight, however, and you can't directly create them with Python. An ugly work around is to use a Copy SOP to pre-create the number you know you will need for your python sop.
User Avatar
Member
401 posts
Joined:
Offline
Is there a list of SOPs that support manipulation of tets?
I tried primitive and edit but somehow it didn't look like they're understanding the tet primitives.
this is not a science fair.
User Avatar
Member
15 posts
Joined: March 2010
Offline
jlait
It seems there was an oversight, however, and you can't directly create them with Python. An ugly work around is to use a Copy SOP to pre-create the number you know you will need for your python sop.

Thanks for your reply. So you suggest to create one tet and create as many duplicates I need? What about shared vertices etc.?

I actually wasn't concerned about creation and manipulation at this point. I want to export the tet data with some custom python code (so I have a python function defined with the module which takes a sop's geometry and dumps the tet data somewhere).

On that note: is there some de facto standard for exchanging tetmeshes? Currently I use the format which tetgen uses because I couldn't find any better.

David
User Avatar
Staff
6219 posts
Joined: July 2005
Offline
If you just want to export, it should be straightforward? hou.Prim has access to the primitives.

Any SOP that acts on points, like Edit, really should be working with tets. It is a bug if it isn't.
User Avatar
Member
15 posts
Joined: March 2010
Offline
jlait
If you just want to export, it should be straightforward? hou.Prim has access to the primitives.

Any SOP that acts on points, like Edit, really should be working with tets. It is a bug if it isn't.

Hi Jlait,
thanks for your reply. When I look at the documentation I can't seem to find any method or datastructure which indicates that this possible.

David
  • Quick Links