### Keep up-to-date with Free tutorials!!

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

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

By Johnny Z
| 58125 Views
| 0
Software used:

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

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) ;
}

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) ;
}

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))>>;

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.

Fig. 22

< previous page continued on next page >

1 | 2 | 3 | 4 | 5 | 6
Related Tutorials

Tutorial

Painting Planets

Keywords: painting, planets, photoshop,

(14)
9 97890

Tutorial

Improve your 3ds Max workflow: An introduction to Particle Flow

Keywords: 3ds Max, Interface, Tutorial, Workflow, Particle Flow

0 25287

Tutorial

Maya Irradiance Particles in Mental Ray - Video Tutorial

Keywords: maya, mental ray, rendering, irradiance, particles,

0 43735

Tutorial

Using a Particle System to Create Foliage

Keywords: particle, system, foliage, max,

0 14878