Sprites
The Sprites render type lets you display a texture image or image sequence at each particle. Each particle can display an identical or different image or image sequence. Depending on the type of texture image you use, you can use sprites to create effects such as smoke, clouds, fog, and stars.
A sprite appears as a small rectangle until you map a texture image to it. The image faces the camera directly regardless of the camera's position or orientation.
If the texture image lacks an alpha channel, the image is opaque and occupies the sprite rectangle. If the texture image has an alpha channel, the sprite uses the image's transparency. To avoid displaying the rectangle, you must make the peripheral parts of the original texture image transparent.
These sprites use a texture image lacking an alpha channel, so the rectangles are displayed.
These sprites use a texture image that has an alpha channel. The "1" in the image is opaque. The rest of the image is transparent. The rectangles are invisible.
Use the Sprite Wizard
The particle Sprite Wizard simplifies the process for displaying a texture image or image sequences on particles. The particle Sprite Wizard leads you through the steps necessary to associate image files with sprites. You can assign a single image or a sequence of images to each particle. The images can be assigned randomly, or using various criteria such as the particleID or a ramp. You can also edit the sprites once you've created them with the Sprite Wizard.
The Sprite Wizard automatically:
- assigns a Lambert material to the particle object
- adds a creation expression and runtime expression that enables all the wizard options
- connects a ramp to the spriteNumRamp attribute
- sets the particle render type to Sprites and adds the attributes for sprites
- assigns the images you specify to the sprites
Note The image files you use as sprites must have filename extensions in the format file.n, not file.000n (zero-padded extensions).
To use the Sprite Wizard
1 Select the particle object to which you want to assign sprites.
2 Select Particles > Sprite Wizard.
The Sprite Wizard leads you through a series of choices. For help, read the pop-up help that appears with each text box.
For additional information on the Custom Start and Custom Cycling options, see "Customizing sprites with the Sprite Wizard" on page 42.
3 To see the sprite images, turn on Shading > Smooth Shade All and Shading > Hardware Texturing.
To edit the sprites
- Do one of the following:
- Select the particle object and display the Attribute Editor. Open the Sprite Attributes section of the Particle Attribute Editor to edit the attributes. You can also edit the sprite attributes using the Channel Box.
- Select the particle and select Particles > Sprite Wizard to re-open the Sprite Wizard window. You can change the file names, the frame ranges, or other settings in the Sprite Wizard window. When you accept the changes, the wizard updates the appropriate attributes for you.
To change the images of an existing sprite animation:
1 Select the particle object.
2 Select Particles > Sprite Wizard.
3 Select a new image sequence for the Sprite File.
4 Turn on Use existing setup with new images in the second Wizard screen.
All the existing settings in the Sprite Wizard are used with the new image sequence.
Editing sprite attributes
Once you have created the sprites, you can optionally edit these Render and Sprite attributes in the Attribute Editor or in the Channel Box:
Customizing sprites with the Sprite Wizard
You can customize how the initial sprite images are selected and how the images are cycled by modifying the expressions that are automatically added to the particle object when you use the Sprite Wizard.
To customize the selection of the initial sprite image
You can customize the selection of the initial sprite image whether or not you choose to animate the selection of the initial image.
1 Create the particles and select Particles > Sprite Wizard.
2 Select the Sprite File you wish to use and click Continue.
3 Select how you want to assign images to the particles: either No animation or Cycle through the images for each particle, and click Continue.
4 Select Custom Start and click Continue.
5 Select how you want the images to be cycled for each particle If you select Custom Cycling, see "To customize sprite cycling" on page 43. Click Continue.
6 Click Apply to apply the wizard.
7 Select the particle and select Window > Animation Editors > Expression Editor.
8 In the Expression Editor, select Select Filter > By Expression Name.
9 Select the expression with the name of the particle object to which you have applied the sprites.
10 Click the Creation checkbox.
11 If you selected No Animation for the image assignment, look for the first occurrence of the line "Custom Start: If your sprites are not animated" in the creation expression.
If you selected Cycle through the images for each particle for the image assignment, look for the second occurrence of the line "Custom Start: If your sprites are animated" in the creation expression.
12 Insert your custom expression. For information on writing expressions, see Expressions.
To customize sprite cycling
1 Create the particles and select Particles > Sprite Wizard.
2 Select the Sprite File you wish to use and click Continue.
3 Select Cycle through the images for each particle and click Continue.
4 Select the technique used to assign the initial sprite to each particle and click Continue.
5 Select Custom Cycling for how you want the images to be cycled for each particle and click Continue.
6 Click Apply to apply the wizard.
7 Select the particle and select Window > Animation Editors > Expression Editor.
8 In the Expression Editor, select Select Filter > By Expression Name.
9 Select the expression with the name of the particle object to which you have applied the sprites.
10 Click the Runtime checkbox (before or after dynamics calculation).
11 In the runtime expression, look for the line "Custom Cycle."
12 Insert your custom expression. For information on writing expressions, see Expressions.
Average user rating: 5 stars out of 1 votes
Post a comment