### 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
| 56687 Views
| 0
Software used:
Maya

In order to do this we will have to add a custom attribute to particleShape1 and then tell the instancer to use this attribute for rotation. Select particleShape1 and in the attribute editor under Add Dynamic Attributes click the General button (Fig.23).

Fig. 23

In the new tab type "custom_rotation" under Long name. Change Data Type to vector and Attribute Type to per particle (array) and click ok (Fig.24).

Fig. 24

In the instancer section, under Rotation Options, change Rotation to custom_rotation (Fig.25).

Fig. 25

Jupiter's axial tilt is 3.13 degrees and the planet rotates on that axis once every 10 hours. Working on the scale of Earth where Earth's rotation would simply equal "time", Jupiter's rotation variable will look like this:

vector \$jupiter_rotation = <<0,(time/0.416),3.13>>;
Â

Place this under the \$jupiter_position variable in the expression editor to keep things organized.

Now within the curly braces "{}" of jupiter's "if" statement, type:

particleShape1.custom_rotation = \$jupiter_rotation;
Â

With a little research we find that:

• Io's tilt is 2.21 degrees and it rotates every 42 hrs
• Europa's tilt is 0.47 and it rotates every 85.2 hrs
• Ganymede's tilt is 0.195 and it rotates every 171.6 hrs
• Callisto's tilt is 0.281 and it rotates every 400.536 hrs

This brings our final expression to look like this:

Â
vector \$sun_position = <<0,0,0>>;
Â
vector \$jupiter_position = <<100*(sin(time)),0,150*(cos(time))>>;
vector \$jupiter_rotation = <<0,(time/0.416),3.13>>;
Â
vector \$io_position = <<20*(sin((time+8)*8)),0,25*(cos((time+8)*8))>>;
vector \$io_rotation = <<0,(time/1.75),2.21>>;
Â
vector \$europa_position = <<30*(sin((time+6)*6)),0,30*(cos((time+6)*6))>>;
vector \$europa_rotation = <<0,(time/3.55),0.47>>;
Â
vector \$ganymede_position = <<40*(sin((time+4)*4)),0,40*(cos((time+4)*4))>>;
vector \$ganymede_rotation = <<0,(time/7.15),0.195>>;
Â
vector \$callisto_position = <<50*(sin((time+3)*2)),0,50*(cos((time+3)*2))>>;
vector \$callisto_rotation = <<0,(time/16.698),1.281>>;
Â
if (particleShape1.particleId == 0)
Â Â Â Â Â Â  Â Â Â Â  {
Â Â Â Â Â Â Â Â Â Â Â Â Â  particleShape1.position = \$sun_position;
Â Â Â Â Â Â  Â Â Â Â  }
Â
if (particleShape1.particleId == 1)
Â Â Â Â Â Â  Â Â Â Â  {
Â Â Â Â Â Â Â Â Â Â Â Â Â  particleShape1.position = \$jupiter_position;
Â Â Â Â Â Â Â Â Â Â Â Â Â  particleShape1.custom_rotation = \$jupiter_rotation;
Â Â Â Â Â Â  Â Â Â Â  }
Â
if (particleShape1.particleId == 2)
Â Â Â Â Â Â  Â Â Â Â  {
Â Â Â Â Â Â Â Â Â Â Â Â Â  particleShape1.position = (\$jupiter_position + \$io_position) ;
Â Â Â Â Â Â Â Â Â Â Â Â Â  particleShape1.custom_rotation = \$io_rotation;
Â Â Â Â Â Â  Â Â Â Â  }
Â
if (particleShape1.particleId == 3)
Â Â Â Â Â Â  Â Â Â Â  {
Â Â Â Â Â Â Â Â Â Â Â Â Â  particleShape1.position = (\$jupiter_position + \$europa_position) ;
Â Â Â Â Â Â Â Â Â Â Â Â Â  particleShape1.custom_rotation = \$europa_rotation;
Â Â Â Â Â Â  Â Â Â Â  }
if (particleShape1.particleId == 4)
Â Â Â Â Â Â  Â Â Â Â  {
Â Â Â Â Â Â Â Â Â Â Â Â Â  particleShape1.position = (\$jupiter_position + \$ganymede_position) ;
Â Â Â Â Â Â Â Â Â Â Â Â Â  particleShape1.custom_rotation = \$ganymede_rotation;
Â Â Â Â Â Â  Â Â Â Â  }
if (particleShape1.particleId == 5)
Â Â Â Â Â Â  Â Â Â Â  {
Â Â Â Â Â Â Â Â Â Â Â Â Â  particleShape1.position = (\$jupiter_position + \$callisto_position) ;
Â Â Â Â Â Â Â Â Â Â Â Â Â  particleShape1.custom_rotation = \$callisto_rotation;
Â Â Â Â Â Â  Â Â Â Â  }
Â

And our final result to look something like Fig.26 & Fig.27!

Fig. 26

Fig.27

< previous page

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

Tutorial

Gallery Image.

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

(1)
0 23355

Tutorial

Gallery Image.

Keywords: explosion, smoke, particle, technique,

0 155732

Tutorial

Gallery Image.

Keywords: particle, system, foliage, max,

0 14379

Tutorial

Gallery Image.

Keywords: advanced, particles, glu3d, teapot, animation,

0 28959