KrisStaber Posted July 29, 2008 Share Posted July 29, 2008 (edited) i would need to get the global position of a in the hirarchy embeded object :euro: edit: when its in a sublevel so geometry level and not sop level Edited July 29, 2008 by KrisStaber Quote Link to comment Share on other sites More sharing options...
Jason Posted July 29, 2008 Share Posted July 29, 2008 i would need to get the global position of a in the hirarchy embeded object :euro: in hscript? Look at the *origin() expressions: exhelp origin http://www.sidefx.com/docs/houdini9.5/expressions/origin Quote Link to comment Share on other sites More sharing options...
KrisStaber Posted July 29, 2008 Author Share Posted July 29, 2008 in hscript?Look at the *origin() expressions: exhelp origin http://www.sidefx.com/docs/houdini9.5/expressions/origin sorry forgot to add (too tired) when its in a sublevel so in the geometry level or something Quote Link to comment Share on other sites More sharing options...
KrisStaber Posted July 29, 2008 Author Share Posted July 29, 2008 (edited) 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 July 29, 2008 by KrisStaber Quote Link to comment Share on other sites More sharing options...
symek Posted July 29, 2008 Share Posted July 29, 2008 i would need to get the global position of a in the hirarchy embeded object :euro: edit: when its in a sublevel so geometry level and not sop level Isn't it a job for an object chop? Quote Link to comment Share on other sites More sharing options...
Jason Posted July 29, 2008 Share Posted July 29, 2008 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. Quote Link to comment Share on other sites More sharing options...
KrisStaber Posted July 29, 2008 Author Share Posted July 29, 2008 (edited) 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 July 29, 2008 by KrisStaber Quote Link to comment Share on other sites More sharing options...
KrisStaber Posted July 29, 2008 Author Share Posted July 29, 2008 (edited) jason i couldnt get your expression to work (it does seem interesting though) i attached the file the box_object4 (origin + centroid) should be in the same position as box_object3 (rivet) maybe i did something wrong - have a look constrain_testing3.hip Edited July 29, 2008 by KrisStaber Quote Link to comment Share on other sites More sharing options...
JoshJ Posted July 29, 2008 Share Posted July 29, 2008 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 Quote Link to comment Share on other sites More sharing options...
KrisStaber Posted July 29, 2008 Author Share Posted July 29, 2008 (edited) 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 July 29, 2008 by KrisStaber Quote Link to comment Share on other sites More sharing options...
JoshJ Posted July 30, 2008 Share Posted July 30, 2008 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 thingi want it to work with sublevel deforms Quote Link to comment Share on other sites More sharing options...
Jason Posted July 30, 2008 Share Posted July 30, 2008 Then you'll need rivet to pull the transform into the object level, as the origin expression looks at object level transformsalternatively 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. Quote Link to comment Share on other sites More sharing options...
michael Posted July 30, 2008 Share Posted July 30, 2008 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? Quote Link to comment Share on other sites More sharing options...
KrisStaber Posted July 30, 2008 Author Share Posted July 30, 2008 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 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.