Jump to content

HDK (12.5) add a tetrahedron within a SOP node???


Recommended Posts

using houdini 12.5

i'm trying to add a tetrahedron (the one that comes as an example with the HDK and is created when compiling tetra.c in the tetprim directory of the toolkit samples)

trying to go through the examples of the sample code and docs on how to add geometry, but i'm not sure if i'm doing it right specifically for the tetrahedron.

i've tried adding things like this to the cookMySop function of the SOP node.

HDK_Sample::GU_PrimTetra *newtetra = static_cast<HDK_Sample::GU_PrimTetra *>(gdp->appendPrimitive(HDK_Sample::GU_PrimTetra::theTypeId()));

although it compiles, the sop doesn't show up in houdini. it does when i remove this bit of code. (houdini crashes)

GEO_PrimTetra *newtetra = static_cast<GEO_PrimTetra *>(gdp->appendPrimitive( GEO_PRIMTETRAHEDRON ));

it compiles and i can see the sop, but i can't add points or vertices to this tetra.

i've done a test where i simple add a geo_primpoly and can add vertices/points to the primitive and i can see it in houdini, but i haven't been successful with tetras.

what is the correct way of adding the tetrahedron?

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...