Jump to content

Parenting at geometry level


AntoineSfx

Recommended Posts

Hi,

I'm trying to make a parametric folding cube template. How can I achieve the equivalent of parenting (scene level) at the geometry level ?

My goal is to have 6 grids, one for each face of the cube, on a plane all next to each other (unfolded state),  set the parents accordingly, then set each pivot, and eventually the angles, to have a folding template. I did it earlier with multiple bends but it's tedious and not flexible at all.

Link to comment
Share on other sites

You can create custom matrix attribute for holding transformation, parentid attribute to handle link to your parent and with some loop iterate from bottom most child to topmost parent and cumulatively apply transformation. That would be exact approach you asked for. But I have to ask why not using transformation and parenting at obj level? You could have empty objects, just for storing transformation (and potentially parenting hierarchy if it is known) and use houdini's functions for transformation space change from one object to another if hierarchy evolve somehow during time.    

Link to comment
Share on other sites

On 18/11/2017 at 9:04 AM, djiki said:

You can create custom matrix attribute for holding transformation, parentid attribute to handle link to your parent and with some loop iterate from bottom most child to topmost parent and cumulatively apply transformation. That would be exact approach you asked for. But I have to ask why not using transformation and parenting at obj level? You could have empty objects, just for storing transformation (and potentially parenting hierarchy if it is known) and use houdini's functions for transformation space change from one object to another if hierarchy evolve somehow during time.    

I just wanted to know if something similar to parenting existed in the same way at geo level. Apparently not. So I guess I can certainly do it with a hierarchy of objects.

Link to comment
Share on other sites

On 11/19/2017 at 6:23 PM, AntoineSfx said:

I just wanted to know if something similar to parenting existed in the same way at geo level. Apparently not. So I guess I can certainly do it with a hierarchy of objects.

there is.
see attached file. the "optransform" vex function returns a 4x4 global matrix of an object.
then you just multiply your pointposiiton with that 4x4.
hope this helps?
Fuat

SOPParent.hip

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...