Jump to content

Extract animated relative inverse transforms?


spf987

Recommended Posts

Hi, is there a way to make or extract the animation of something relative to a chosen point? For example, the way the Earth orbits the sun. From afar, and if you were animating this in Houdini, you would put a sphere (Earth) on a path circling another sphere at the origin (Sun).
I would like to pick a point on the Earth Sphere, and have that then be static at the world origin, so you end up with the Sun apparently circling the Earth, from the pov of someone standing at the origin.
I'm not sure if this just requires lots of maths beyond my capability or if there is a clever node, either sop or chop, which might do it.


Something like the Align Components tool,  but which takes the animation into account as well, with the source component and connecting geo moving to the origin then staying put and everything else moving about it.

I've also looked at the Inverse Transform option on the Transform sop, so I'm wondering if it might involve that too.

Thanks.

Edited by spf987
Link to comment
Share on other sites

Hi @spf987! I have a node that i have created to stuck geometry to center of the world, if your topology is static. You can take a look at it!

 

UM_FreezeToCenter.hda

edit: if you check invert transform under transformation tab, you will have stuck geometry to origin based on point you have pick.

Then you can put attribwrangle, with "sun" geometry in 1st input and "earth" geo in 2nd  with

4@xform=point(1,"xform",0);

 to pick up xform and just use transformbyattribute node to transform sun with that "xform" attribute. hopefully I have understood well what you need.

 

P.S. I have uploaded it to orbolt some time ago, but i think it's locked. I have uploaded you file so you can take a look at the vex. its very simple! https://orbolt.com/asset/UM_::um_negatetranforms

Edited by ItsMeM
  • Thanks 1
Link to comment
Share on other sites

Thank you everyone!

@Aizatulin and @Benyee, thank you and I appreciate the sample files and it does seem to do what I'm after. Although, I'll need to dig around a lot to work out how to adjust and modifiy it a bit for my needs or at least understand it more, as it does look like a lot of complex maths. I've only got half way through the Joy of Vex intro course so all those Wrangles are way up on another level. When I first read your reply, you made it sound so simple haha :)


Thanks @ItsMeM, your description sounds exactly like what I need also, as yes my topology would be static. I've been unable to install the HDA from Orbolt. It's probably something wrong with the way I'm loading it as it didn't work for me using the Launch with Houdini option. I'll keep trying :)

EDIT  However, just realised you also had an an attached file and it's perfect! Exactly what I'm after, thank you so much! I didn't even need the extra Wrangle as your Animated checkbox did it on its own. I'll look at what the other options do but I think that's sorted it, much appreciated!

Thanks again:)

Edited by spf987
Link to comment
Share on other sites

Im glad you found it helpful!

by the way, animated checkbox often makes things slow if geometry is heavy. You can use bake button which will generate point of each frame and save xform attribute on it. Then it will be much quicker to work with geometry! (don't forget to reupdate bake if animation is changed).

  • Like 1
Link to comment
Share on other sites

Thanks Benyee and ItsMeM , I'll take a look this evening after work. Looks like I should continue with my Vex studying, as the bits I had previously learned I now use more frequently than I expected I would, as simple as they were.

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