Jump to content
Sign in to follow this  
spf987

Extract animated relative inverse transforms?

Recommended Posts

Posted (edited)

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

Share this post


Link to post
Share on other sites

Hi,

if you have a local orientation on each point of the object being transformed (which is also transformed), you can just apply the inverted transformation (of the point you select on the geometry) on the whole geometry.

make_point_static.hipnc

  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)

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

Share this post


Link to post
Share on other sites
Posted (edited)

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

Share this post


Link to post
Share on other sites

don't worry about maths and codes stuff, here is an example with object level constraints,

there might be some useful informations for you

invert_space.hip

  • Like 1

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×