How-To Create Particles that Emit Random Geometry

Have you ever used the Particle Editor and wondered what the Geometry
in Pieces
option does? Once geometry is attached to a particle, this
option can be used to have random geometry emitted from the particle. But to get this working correctly, some setup
is required in DCC.

Setup - Maya Workflow

Preparing Geometry in Maya

  1. The first step is to create random pieces of
    geometry. For this example, I used
    basic Maya primitives. The geometry for
    the particles needs to follow one of the two conventions demonstrated here:
    4913-random-geometry-002.png

  2. Create and assign a material to the geometry.

  3. Export the geometry and material from Maya
    using the Lumberyard Tools. Merge
    Nodes
    must be unchecked. If this detail is missed, the particles will
    emit the exported geometry as one asset.

Note: Because the groups and or the individual
nodes end in _group the exporter thinks there is no geometry and gives the
following error. This can be ignored:

Setup – FBX Workflow

Setup using the FBX workflow is very similar to the Maya
workflow.

  1. The
    geometry for the particles needs to follow one of the two conventions demonstrated in Step 1 of the previous section: Setup - Maya Workflow.

  2. Create and assign a material to the geometry.

  3. Export from Maya using the FBX file format. With FBX export, the
    material will also be exported.
    4918-random-geometry-007.png

  4. Import into Lumberyard using the FBX Importer by navigating to Tools / FBX Importer (Preview). Click on Open
    file…
    and navigate to the FBX file that you exported in the previous step.

  5. Once your FBX file is loaded, click on Add Rule and then add the Mesh (Advanced) rule.

  6. Finally, uncheck Merge Meshes, if this detail is missed the particles will emit the
    exported geometry as one asset.

Lumberyard - Particle Editor

  1. Create a new particle library or add a particle
    to an existing one.
  2. Open up the Particlesgroup.
  3. Set the Geometry
    parameter to use the geometry exported during the setup step.
  4. Geometry
    in Pieces
    has three options:
  5. Whole (Default) – Emits all geometry as one
    asset.
  6. RandomPiece – Emits random pieces from asset.
  7. AllPieces – Emits pieces from asset in a
    sequence.
  8. Choose RandomPiece.
    4885-random-geometry-005.png

The Preview
window should now be displaying a particle emitting random pieces of geometry!

I’m loving these tutorials you’ve been making, thanks! I do have one question though; when I export my geometry out of Maya using the Lumberyard tools, it looks very jagged in the Lumberyard viewport. It looks almost as if the face normals were destroyed. Is this normal, or is there a setting somewhere I needed to change?

@Taylor

I have never seen that happen. I would check to see if your normals are flipped backwards in Maya. If that doesn’t help, post your question in the Art & Graphics forum with some screenshots, and I’ll take a look at them. I should be able to help you out.

is it possible to have this working with fbx in the future?

@Gamely

I have not tried this with the FBX importer. You are the second person to ask me this today, so I will give it a try and let you know if it works.

@Gamely

This is possible with the FBX importer! I’m updating the steps now.

Great tutorial thanks I will try the fbx workflow very soon. :slight_smile: