Particle Tree Placement

In this lesson you will use polygon selection to define the area in which to generate tree particles.

Use polygon selection to define the render area:

  1. Open the scene file called ptrees_placement.max.

    The scene consists of an undulating terrain bisected by a riverbed and populated by a number of particle-based trees.

  2. Maximize the Top viewport and set viewport shading mode to Smooth + Highlights.
  3. Zoom in to the river.

    Notice how a few particle trees stand in or on the very edge of the river bed.

  4. Zoom out again and select the Camera01 object.

    The light blue guidelines show the camera field of view. Assume for a moment that you only want a static shot, or plan to have the camera move towards the upper-left corner of the terrain. This means there are many particle trees elsewhere in the plane that will never be seen and consequently do not need to be rendered.

    Camera field of view

    You will now use polygon selection to indicate where to place the particle trees (within the field of view and not in or near the river).

  5. Switch back to four-viewport view, select the Plane01 object and from the Modify panel > Modifier List, choose Editable Poly.

  6. On the Selection rollout, click Polygon Selection.

  7. Click just outside the top left corner of the Plane01 object and drag toward its center.

  8. From the main toolbar, choose the paint selection tool, then the Select Object tool.
  9. In the Camera01 viewport, hold down Ctrl and start painting over the polygons adjacent to the riverbank.

    Selected polygons near riverbank

    Top view, showing selection of polygons near the riverbank.

  10. In the Top view, hold down Alt and eliminate the polygons at the periphery of the camera field of view, as shown in the next illustration.

    Top view, with polygons beyond periphery of camera view deselected

  11. Zoom in and continue to use the Ctrl and Alt keys to add or subtract polygons by the riverbank until you are satisfied with the result.
  12. On the Selection rollout, click Polygon Selection again to exit polygon selection mode.
  13. De-select the terrain object and press 6 to open the Particle View window.
  14. On the Event 01 box, click the Position Object 01 operator.
  15. In the Position Object rollout > Location group, from the Surface list, choose Selected Faces.

    Previously, particles were generated across the entire plane. Now, the same number of particles are generated only on the polygon faces you just selected.

    Particle generation restricted to top left region of plane object

    Because generation area is reduced, you can reduce the total number of particles generated.

  16. In the Birth 01 operator rollout, set the Amount spinner to 50 and press Enter.

    If you like, adjust tree placement in the Position Object 01 > Uniqueness group by clicking New until you see a grouping you prefer.

  17. On the PF Source 01 box, click the Material Static 01 operator and in the Material Static Parameters rollout > Uniqueness group click New until the Camera01 viewport displays a mix of trees that looks best.
  18. Render your scene.

    Rendered 50-tree view of the particle forest

    The 50 particle trees should take just a minute or two to render. If on the other hand, the scene was made up of 3D trees at 30,000 polygons each, you would need to process over a million polygons and require a great deal more time to render.

    There is one aspect to watch out for when using particle systems to create trees with shadows. As the next illustration demonstrates, the base of the middle foreground tree does not quite match the base of its shadow.

    Tree trunk not aligned with particle tree shadow

    Recall that you created two sets of particle trees: one set oriented to face the camera and another, hidden set that faces the sun. Depending on the respective positions of the light source and camera, a hidden tree might cast a shadow that is slightly different to that of the visible tree.

    To solve this problem, rearrange tree placement by changing the particle trees’ seed value, or add objects such as rocks to obscure unwanted detail.

    A completed version of this scene can be found in a scene file in the \scenes\dynamics_and_effects\particle_trees folder, called ptrees_completed.max.


Particle systems can offer a fast, effective way to populate scenes with multiple objects.

In this tutorial you used images of trees and mapped them onto billboard-sized particles. But you could just as easily have mapped other types of images, such as those of people, to create a crowd scene.

When using this particle-creation technique, make sure your particles are set to face the camera. If you need to cast shadows, generate a second set of particles and make sure their shadows continually face the light source.