In this lesson, you will instruct the particle system to generate a second set of trees, with only its shadows visible. You
will then orient the shadows so they continually face the light source in the scene. As a result, the shadows will appear
to belong to the first set of visible trees.
Set up the lesson:
- Continue working on the scene file you saved in the previous lesson, or open ptrees.max.
Generate a second set of tree particles:
- Press 6 to display Particle View, drag a Spawn operator from the depot to Event 001, and drop it at the bottom of the event, below the Display 001 operator.
The Spawn operator will generate a new set of particles from the ones you defined in Event 001.
- Highlight the Spawn 001 operator to display its parameters.
In the Spawn 001 rollout Spawn Rate And Amount group, the Once option should be chosen, indicating that only one set of particles will be created.
Set the particles to follow the sun:
- In Event 001, click to highlight the Shape Facing 001 operator, then right-click it and from the pop-up menu, choose Copy.
- Right-click an empty area of the event-display area below Event 001, and from the pop-up menu, choose Paste.
3ds Max creates a new event, called Event 002, with an operator that also instructs the particles to face the camera. Now you will modify this operator so that the particles
will face the scene light source instead of the camera.
- Click the new Shape Facing 002 operator so you can see its parameters. In the Shape Facing 002 rollout Look At Camera/Object group, click the Pick button (which at first is labeled Camera01), then in any viewport, click the
[Daylight01] Sun01 object.
- In Event 002, click the Display 002 operator. On the Display 002 rollout, click the color swatch and use the Color Selector controls to choose a red color.
This color is used to display the shapes of the second set of particles in wireframe views. It will not be visible in renderings.
The red color will help you better identify the second set of particles.
- Open the Type drop-down list and choose Geometry.
- In Event 001, click the Display 01 operator and choose a dark blue color, to better see the first set of particles in wireframe view.
- Click the blue handle to the left of the Spawn operator and drag it to the Event 002 input (the empty circle that protrudes from the top of Event 002).
With this connection, Event 001 spawns a set of particles once and sends them to Event 002, where they are instructed to face the sun.
- In the Front viewport, select the camera. On the main toolbar, click (Select And Move). In the Top viewport, move the camera about the scene.
- Press Ctrl+Z to undo the camera movement.
Do a test rendering:
- Render the Camera01 viewport.
There are now two sets of particle trees, each of which cast shadows. You need to hide the shadows of the particle trees that
face the camera, then hide the particle trees that face the sun but keep their shadows visible.
Fix the visibility of shadows:
- Highlight the header of Event 001, then right-click it and from the pop-up menu, choose Properties.
Remember that in Particle View, Event 001 represents the particle trees that face the camera, while Event 002 represents the particle trees that face the sun.
- In the Object Properties dialog General panel Rendering Control group, click By Layer (if By Object is not already active) and turn off Receive Shadows, Cast Shadows and
Apply Atmospherics. Click OK.
- Highlight the header of Event 002, then right-click it and from the pop-up menu, choose Properties.
- In the Object Properties dialog General panel Rendering Control group, click By Layer (if By Object is not already active) and turn off Inherit Visibility, Visible to
Camera, Visible to Reflection/Refraction, Receive Shadows and Apply Atmospherics. Click OK.
- Render the Camera01 viewport again.
The rendering shows one visible set of particle trees, and shadows cast by the second set of trees, which are otherwise hidden.
Save your work:
- Save the scene as my_ptrees_shadows.max.