Jump to content

Extracting Transforms


gaurav

Recommended Posts

Hello Folks,

What are some preferred methods of extracting transforms from the sop level and apply them at the scene level ?

Something like what rivet does. But how can i access transformation matrix which rivet generates ?

I need to transform another obj only for a frame at the obj level as per the orientation of geo inside the sop.

Reason being, I dont want to parent my obj to rivet and need it only for a frame to position/orient another obj at scene level.

Right now i have very crude way of doing it, Would like to hear how pros do it. :)

Thanks,

Edited by vectorblur
Link to comment
Share on other sites

If your object is rigid then you can pick a few points and make your own coordinate system out of that and work from there. You may have some luck with oriented bounding boxes too but axes could flip.

Could the matchaxis sop do something useful here?

Link to comment
Share on other sites

If your object is rigid then you can pick a few points and make your own coordinate system out of that and work from there. You may have some luck with oriented bounding boxes too but axes could flip.

Could the matchaxis sop do something useful here?

Hi Macha,

Thanks for replying. I too was thinking on the same lines of defining a new coordinate system. Something what rivet does.

Also while searing the archives i came across your r&d stuff on AABBs very impressive. I will be looking in it soon once i have the basics in place.

step by step. :)

Thanks,

Link to comment
Share on other sites

Is there a reason you can't use rivet? Is it because you only want it for one frame? You can use the blend node to mix between transforms ...

Yes, I wanted to avoid parenting of any sort. So i had to extract transform of rivet explicitly and put them in obj transform at scene level.

Cheers,

post-6162-132635058651_thumb.jpg

Link to comment
Share on other sites

With python you can use worldTransform() or with hscript expressions you can use origin() to get a transform from an obj.

Or in vopsop you can use the lookat node to get a matrix, which you can extract the translation and rotation from, and use a point expression or something on your object nodes.

Or you can use the blend node to switch to a rivet transform for just one frame.

Link to comment
Share on other sites

With python you can use worldTransform() or with hscript expressions you can use origin() to get a transform from an obj.

Or in vopsop you can use the lookat node to get a matrix, which you can extract the translation and rotation from, and use a point expression or something on your object nodes.

Or you can use the blend node to switch to a rivet transform for just one frame.

Hi Sam,

Thanks for pro tips. I really liked the origin() and fetch using point().

I also came across to inbuilt extract transform obj.

http://www.sidefx.com/docs/houdini11.0/nodes/obj/extractgeo

Cheers,

Link to comment
Share on other sites

  • 2 years later...

Yes, I wanted to avoid parenting of any sort. So i had to extract transform of rivet explicitly and put them in obj transform at scene level.

Cheers,

 

I'm very interested how you extract transfrom with VOP. Do you mind sharing your hip file??

 

thanks

Link to comment
Share on other sites

  • 10 months later...

I'm very interested how you extract transfrom with VOP. Do you mind sharing your hip file??

 

thanks

 

Bumping up this one as I'm also interested in extracting transform with VOP. I've got it with Python SOP, but the VOP one would be a nice tune-up for my tool :)

Link to comment
Share on other sites

Hey Guys, Sorry been off lately..

 

I think I used optransform() vex function in inline to fetch transforms of given object and passed returned matrix to extract transform vop.

 

HTH,

-GM

Edited by gaurav
Link to comment
Share on other sites

  • 5 months later...

hello,

no big deal but, is there a way to extract the local matrix directly from obj level? Isn't it stored somewhere on the obj? (like maya does)

I know I can calculate it, but it would be good to know if there's a more direct method to access it.

 

thanks

Edited by MENOZ
Link to comment
Share on other sites

hello,

no big deal but, is there a way to extract the local matrix directly from obj level? Isn't it stored somewhere on the obj? (like maya does)

I know I can calculate it, but it would be good to know if there's a more direct method to access it.

 

thanks

 

Does this work?

 

http://www.sidefx.com/docs/houdini14.0/hom/hou/ObjNode#localTransform

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