Keep up-to-date with Free tutorials!!

 

Sign up to our twice-monthly newsletter today for the latest tutorials, interviews and product information.

Sign me up to receive third-party emails from 3dtotal's partners, too!

- Latest news
- Exclusive Shop Offers
- Preview early content
- Plus much more

 

Not Ready to take that step? OK, Why not just Subscribe to the RSS Feed

 
submit tutorial
1 | 2 | 3 | 4 | 5 | 6
Creating Orbiting Planets with Maya's Particle Instancer

| Your Rating:
rating star fullrating star fullrating star fullrating star fullrating star full
(2 Votes)
| 61604 Views
| 0 Comments
| Comments 0
Date Added: 30th December 2010
Software used:

Jupiter will now follow an orbit like this (Fig.20).

1369_tid_figure20.jpg
Fig. 20

Getting the moons to orbit Jupiter is relativity simple. We will assign the next particle its own vector variable and tell Maya to add the new variable to Jupiter's variable, which will get the particle to orbit Jupiter. We know that Jupiter's radius is 11.2 and Io's radius is .28 so the distance value in our expression (as illustrated in Fig.19) needs to be greater than 11.48. Any smaller and the planets will collide. The speed attribute needs to be faster too or Jupiter will always be between Io and the Sun. Our new expression should look like this:

 
vector $sun_position = <<0,0,0>>;
vector $jupiter_position = <<100*(sin(time)),0,150*(cos(time))>>;
vector $io_position = <<20*(sin(time*5)),0,25*(cos(time*5))>>;
 
if (particleShape1.particleId == 0)
            {
              particleShape1.position = $sun_position;
            }
 
if (particleShape1.particleId == 1)
            {
              particleShape1.position = $jupiter_position;
            }
 
if (particleShape1.particleId == 2)
            {
              particleShape1.position = ($jupiter_position + $io_position) ;
            }
 

Click Here To Download Code

You should now be able to assign variables and "if" statements for the remaining 3 moons to get an expression similar to:

 
vector $sun_position = <<0,0,0>>;
vector $jupiter_position = <<100*(sin(time)),0,150*(cos(time))>>;
vector $io_position = <<20*(sin(time*8)),0,25*(cos(time*8))>>;
vector $europa_position = <<30*(sin(time*6)),0,30*(cos(time*6))>>;
vector $ganymede_position = <<40*(sin(time*4)),0,40*(cos(time*4))>>;
vector $callisto_position = <<50*(sin(time*2)),0,50*(cos(time*2))>>;
 
if (particleShape1.particleId == 0)
            {
              particleShape1.position = $sun_position;
            }
 
if (particleShape1.particleId == 1)
            {
              particleShape1.position = $jupiter_position;
            }
 
if (particleShape1.particleId == 2)
            {
              particleShape1.position = ($jupiter_position + $io_position) ;
            }
 
if (particleShape1.particleId == 3)
            {
              particleShape1.position = ($jupiter_position + $europa_position) ;
            }
if (particleShape1.particleId == 4)
            {
              particleShape1.position = ($jupiter_position + $ganymede_position) ;
            }
if (particleShape1.particleId == 5)
            {
              particleShape1.position = ($jupiter_position + $callisto_position) ;
            }
 

Click Here To Download Code


1369_tid_figure21.jpg
Fig. 21

If you hit play and let it go for several hundred frames you might notice the moons align every so often (Fig.21). As this most likely never happens in nature, we can go back in to our variable and add an offset value to make sure it doesn't happen. Change the moon variable to read:

 
vector $io_position = <<20*(sin((time+8)*8)),0,25*(cos((time+8)*8))>>;
vector $europa_position = <<30*(sin((time+6)*6)),0,30*(cos((time+6)*6))>>;
vector $ganymede_position = <<40*(sin((time+4)*4)),0,40*(cos((time+4)*4))>>;
vector $callisto_position = <<50*(sin((time+3)*2)),0,50*(cos((time+3)*2))>>;

Click Here To Download Code

Now at the same frame, the planets are no longer aligned (Fig.22). Let's also add variables to handle the tilt and rotation of Jupiter and its moons.

1369_tid_figure22.jpg
Fig. 22





< previous page continued on next page >
 
1 | 2 | 3 | 4 | 5 | 6
Related Tutorials

FX Particles and Dynamics in Maya

by Mike Zugschwert
published on 2015-05-27

Keywords: maya, water, particles, dynamic

Go to tutorial
rating star fullrating star fullrating star fullrating star nonerating star none (5)
Comments 0 Views 11934

FX particles and dynamics in 3ds Max

by Matt Chandler
published on 2014-09-20

Keywords: 3ds max, water, animation, particles

Go to tutorial
rating star fullrating star fullrating star fullrating star fullrating star full (3)
Comments 0 Views 24910

Creating and animating bubbles

by Alvaro Moreira
published on 2014-06-09

Keywords: Bubbles, 3ds Max, Particle Flow, Frost

Go to tutorial
rating star fullrating star fullrating star fullrating star fullrating star half (5)
Comments 4 Views 22978

Creating a Smoke-Based Explosion in Fume FX

by Vikas Nagolkar
published on 2013-06-17

Keywords: explosion, smoke, particle, technique,

Go to tutorial
rating star fullrating star fullrating star fullrating star fullrating star none (25)
Comments 2 Views 165566
Readers Comments (Newest on Top)
no comments!
No comments yet. Be the first to comment!
Add Your Comment