Jump to content

how do i get world transforms from a parented object


Recommended Posts

ok i figured it out

how to get positional data from the geo level to the sop level

therefore beeing able to calculate distances between objects on geo level and on sop level

i created a rivet and gave it all the objects points

that gave me the centre of the object

i then parent something to that rivet and use it to calculate the distance to other objects

maybe it helps someone

if thats a very cumbersome or slow process please let me know (i am a houdini noob and i need to learn fast)

EDIT

or a cleaner version is to use an expression and get the rivet translates (works with origin)

Edited by KrisStaber
Link to comment
Share on other sites

if thats a very cumbersome or slow process please let me know (i am a houdini noob and i need to learn fast)

EDIT

or a cleaner version is to use an expression and get the rivet translates (works with origin)

..you could just add the result of origin() to result of centroid().

origin("/obj/geo1", "", "TX") + centroid("/obj/geo1/__display_sop__", "D_X")

Or object-merge you geometry into this space (using the Transform Object parameter) and just use centroid() - which would be heavier since it has to transform a copy all the geometry into the specified space, but it makes a simpler expression.

Link to comment
Share on other sites

symek

dont know

couldnt get it to work with the nodes i know

which arent too many

i attached the file - if anyone wants you can have a look at it - i would certainly appreciate feedback or tipps

basically two groups - the two spheres and the two big cubes

the other stuff is parented or constrained to it in various ways

the position i want to grab is the one of the nurbs circle

i could only get it to work with the rivet

chops and other nodes you might need are in the file

the small cube and the tube are checking objects that i use to see if the positions are grabbed properly

the bone to see if the distance is calculated properly

jason

i will give that one a try and read up on that function

thanks for the tipp

constrain_testing2.hip

Edited by KrisStaber
Link to comment
Share on other sites

your circle has a sop level transform (go inside the geometry object to find it) , remove that and it snaps into the same place as the rivet

yeah thats the thing

i want it to work with sublevel deforms

Edited by KrisStaber
Link to comment
Share on other sites

Then you'll need rivet to pull the transform into the object level, as the origin expression looks at object level transforms

alternatively you could use point() + origin() expression

origin to get the object level transform, and point to get the position of a certain point in the object (relative to the object transform)

yeah thats the thing

i want it to work with sublevel deforms

Link to comment
Share on other sites

Then you'll need rivet to pull the transform into the object level, as the origin expression looks at object level transforms

alternatively you could use point() + origin() expression

origin to get the object level transform, and point to get the position of a certain point in the object (relative to the object transform)

This is what I was suggesting, except I was using centroid() instead of point() to get the centroid of all points - but it's not taking into the account the rotation of the final object (sorry about that). So the rivet might be the best idea after all - or a Geometry CHOP thing, if you like that better.

Link to comment
Share on other sites

are you getting anywhere with this Kris?

don't know why I haven't read this thread...?

not 100% sure what you trying to do...

what kind of constraint are you trying to build?

hey

i am just playing around and trying to find out how to do things in houdini

and what tools it offeres

i needed that for my spine setup but now i am doing a different one that doenst do any transformations in the geo level

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