Animation question (the Stingray tutorial)

   5627   5   2
User Avatar
Member
10 posts
Joined: Aug. 2007
Offline
I did the stingray tutorial posted and I am trying to create an animation move from left to right across the screen. I tried the transform operation and had some success. Is this the right way to do it or should it done using keyframes. I am also trying to create a circular motion so that the stingray remains in the screen looping. Help me please.



Tx
User Avatar
Member
42 posts
Joined: Nov. 2006
Offline
emkay
I did the stingray tutorial posted and I am trying to create an animation move from left to right across the screen. I tried the transform operation and had some success. Is this the right way to do it or should it done using keyframes. I am also trying to create a circular motion so that the stingray remains in the screen looping. Help me please.



Tx

you can RMB on the parameter you want to keyframe… it's a choice in the context sensitive menu. you may want to note the hotkey as the menu choice changes once you have a keyframe down on that parameter. also, this menu is the way to go to delete animation (channels).

if you want to have the stingray follow a path, like a circle, check out the Digital Tutors online vid tut about setting up a turntable.

good luck. peace & 42
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
The simple way to do this would be to use a Sin and Cos function in the transform of your geometry object .
In the TX channel type sin($FF*6)*6 and in TY channel type cos($FF*6)*6
you will then have a looping circular motion for your sting ray

R
Gone fishing
User Avatar
Member
42 posts
Joined: Nov. 2006
Offline
circusmonkey
The simple way to do this would be to use a Sin and Cos function in the transform of your geometry object .
In the TX channel type sin($FF*6)*6 and in TY channel type cos($FF*6)*6
you will then have a looping circular motion for your sting ray

R

that crossed my mind too, but the math gets tricky. we need to be careful if we want it to loop correctly for “n” number of frames.

furthermore, if a circular and not elliptical orbit are required, the outside multiplier should be the same and therefore wouldn't creating our own variable and slider for the radius be helpful? i suppose 2 sliders could be used to allow elliptical orbits. hmmm … i've seen it in a video tutorial, but …. OK in help i found the “expression cookbook” worth a read.

RMB on the node, select Edit Paramater Interface and add a Float or Integer. rename it and remember the name! I chose Integer and named it “radius.” You can limit the range by checking “range”…

now in the translate params instead of sin($FF*6)*6 use sin($FF*6)*ch(“./radius”) make the same change for the “cos” expression.

think of houdini as an OS directory tree thingie. the expression cookbook helped me here. and, as memory slowly returned, you can drag and drop params onto other parameter textboxes. using my “radius” param, one can click and drag from the label (I used the same name “radius”) and drop it onto the param textbox you want it in. in this case translate X and translate Z. the path to the variable will be slightly different depending on whether you use Channel Ref or Relative Channel Ref.

note: you might want to stop the animation to get accurate values in your new param. sliding it while it was looping worked visually but the param didn't update. i'm on 9.0.725

now, who's up for getting the object to be tangental to the curve?

a possibly easier route and one that takes care of the tangental problem would be to translate the stingray off of the origin and then move the pivot in the opposite direction and then do a rotate on the Y axis. then the math would fade away and only $FF would need to be put in the rotate Y parameter.

peace & 42
User Avatar
Member
42 posts
Joined: Oct. 2007
Offline
lovely, detailed post!
User Avatar
Member
1145 posts
Joined: July 2005
Offline
You can do the Starwars thing and animate the camera instead.
“gravity is not a force, it is a boundary layer”
“everything is coincident”
“Love; the state of suspended anticipation.”
  • Quick Links