Animating rotation of planet

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 04 April 2013   #1
Animating rotation of planet

I've been able to set up an orbit of a planet around a star and keep said planet tilted in the same direction regardless of it's position in the orbit (since the Earth's axial tilt doesn't follow the sun, giving us the seasons and different lengths of day at different times of year). However, attaching to a motion path has given me problems when it comes to rotating the planet around itself - it doesn't want to let me do this. I'm wondering if it's possible to get the texture to rotate as opposed to the planet itself, giving the impression of a rotating planet?
 
Old 04 April 2013   #2
What setup are you using in terms of groups and pivot's? Seems like it would work nicely with some nested groups to attach to the motion path.

Cheers Jake
 
Old 04 April 2013   #3
instead of rotating the texture, why not use groups as 'null' objects ? This way you can add the motion path to the group, and inside that group animate as you want.


If you're doing a solar system you can achieve the whole she-bang using only groups:



Sun_Group
 * Sun_object
 * Mercury_Group (pivot is the sun, rotate it to get the mercurian year)
   * Mercury_Object (pivot is itself, rotate it to get the mercurian day)
 * ....
 * Earth_Group
   * Earth Object
   * Moon Group (pivot is the earth) 
       * Moon_Object (pivot is itself)


This method forces you to use perfect circle orbits but you can do pretty much anything with it.
__________________
maya@reddit r/maya
 
Old 04 April 2013   #4
Originally Posted by berniebernie: instead of rotating the texture, why not use groups as 'null' objects ? This way you can add the motion path to the group, and inside that group animate as you want.


If you're doing a solar system you can achieve the whole she-bang using only groups:



 Sun_Group
  * Sun_object
  * Mercury_Group (pivot is the sun, rotate it to get the mercurian year)
    * Mercury_Object (pivot is itself, rotate it to get the mercurian day)
  * ....
  * Earth_Group
    * Earth Object
    * Moon Group (pivot is the earth) 
        * Moon_Object (pivot is itself)
 


This method forces you to use perfect circle orbits but you can do pretty much anything with it.


I considered this, and followed a tutorial for it. However, the problem appears when trying to keep the axial tilt in the same direction. Say I want it pointing along the x axis by 23 degrees - unless I used a locator outside of the motion path, this tilt would always be pointed towards the centre of the path, i.e. it would follow the path rather than maintain it's own orientation. Using groups instead of a motion path, it was even harder to maintain that tilt along the same axis.

Using a method where I rotated the texture after applying spherical mapping seemed to only partially work - while it rotated along the y axis as desired, the x axis quickly 'righted' itself. I oriented the sphere prior to attaching it to the motion path so it would be at the correct angle once attached. I then applied spherical mapping and keyframed that texture (which seems to take a bit of time - it freezes Maya for a short while), but it always alters the x axis so it's upright again and not at the same angle as the sphere itself.
 
Old 04 April 2013   #5
I've tried the grouping method, but sadly it doesn't work. The planet rotates around the pivot point, so it's tilt will always be at the centre of its orbit, which isn't right at all (or there'd be no seasons and different lengths of day). I've tried adding a locator in outside of the orbital range, except the planet now points towards the locator specifically, again messing with the tilt. I've tried different combinations of constraining via aim and orient, and if I don't choose all three axes, the planet ends up with a wild rotation around it's pole - if I do choose all three, it no longer rotates around itself.

There has to be a way to get the planet to point in the direction of its axial tilt constantly and rotate around itself without messing up the tilt, and while orbiting another object.
 
Old 04 April 2013   #6
Did you try something like this and it wasn't giving you what you were after?



Cheers Jake
 
Old 04 April 2013   #7
No, I didn't try that - been away from Maya for a while, so I'm rusty. I've also never used groups in that manner before, so it's new to me.
 
Old 04 April 2013   #8
Originally Posted by AJCHarding: There has to be a way to get the planet to point in the direction of its axial tilt constantly and rotate around itself without messing up the tilt, and while orbiting another object.


Why not use a point constraint? orbit a locator around the sun, and then you point constraint the planet to the locator.
__________________
"No, the movement is good, it just has to travel faster from spot A to spot B in the same amount of time."
 
Old 04 April 2013   #9
Still no luck, not that experienced at creating nested groups. Is the motion path a must for that method? I'm trying again, but I include the Sun object in the grouping (unlike in the screenshot).

Last edited by AJCHarding : 04 April 2013 at 05:14 PM.
 
Old 04 April 2013   #10
The point constraint constrains the translate values but leaves the rotation values free to animate. You can attach a locator to your motion path, then point constrain a group to the locator and it will follow the locator without inheriting it's rotation. put your planet in this group, tilt the group as much as you want, then just rotate the planet in Y.
__________________
"No, the movement is good, it just has to travel faster from spot A to spot B in the same amount of time."
 
Old 04 April 2013   #11
Thanks Lostparanoia, it's working now. Attached the locator to the motion path, point constrained the Earth to the locator. I then figured out how to use other constraints to constrain the Earth to two separate two-point curves, one for the rotation and one for the tilt. The planet is now tilted in the same direction all of the time, and rotating around its own axis. Thanks everyone for the assistance.

EDIT: Hmmm, the rotation doesn't seem to quite work out - the Earth perhaps rotates 180 degrees, then resets and rotates 180 degrees again, it isn't doing the complete 360 degree rotations over and over. It's like it rotates a certain amount about the y axis, then jumps a certain arc, and rotates again.

Last edited by AJCHarding : 04 April 2013 at 03:40 PM.
 
Old 04 April 2013   #12
Perhaps this will work for you (see attached scene)...

1. Create sphere, move to orbit position then group.
2. Animate the y rotate of the group to create the orbit: type "= time * 10" into rotY in attibute editor cell.
3. Create a cube (or locator) for an aim object.
4. Set the rotate order to yzx on the cube.
5. Set the cube rotate X to the tilt and animate the y rotation (type "= time * 50") for spin.
6. Select the cube followed by the sphere and create an orient constraint

(note one may still wish to use a path if the orbit is elliptical)
Attached Files
File Type: zip axisOrbitSpin.zip (7.1 KB, 4 views)
 
Old 04 April 2013   #13
That seems to work. Thank you very much.
 
Old 04 April 2013   #14
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 09:20 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.