In this example we'll use a particle point cloud and its attributes to shade the particles.

Import the geometry

First we load the particle.abc file from the Samples folder.

  1. Create Reference by clicking Create>Reference
  2. Select the path of the alembic file, $(SAMPLES)/particle.abc
  3. Uncheck Prefix, check Contains Children

Setup a simple scene

We create a simple scene by adding a skylight and a camera

  1. Create a SkyLight
  2. Create a MayaCamera
  3. Rename the camera RenderCamera
  4. Check the camera Main Camera box

Setup a simple particle shading

We create a particle material and override the particle size attributes with an Attributes node

  1. Create a Particle material
  2. Connect it between the Surface2 and the Trace nodes
  3. Drag and drop the box1 group into the RenderGraph to create a Path node
  4. Create an Attributes node between the Particle material and the Merge node
  5. Into the Attributes node set the Attributes>Particles>Mode to Points
  6. Into the Attributes node set the Attributes>Particles>Point Size to 5
  7. Trig a render

Inspect the geometry attributes

We inspect the attributes of the geometry

  1. Set the Preferences>Rendering>Logs & Diagnostics>Verbosity to Diagnostics
  2. check the Preferences>Rendering>Logs & Diagnostics>Diagnostic Shape
  3. Clear cache by pressing the little cute trash in the top right corner
  4. Open the console by pressing alt + 2 or View>Show/Hide console
  5. Trig a render
We are now sure we have a Cd attribut usable baked into the goemetry for our shading. Good job!
By the way, we are now sure we have have a velocity attribut disguised as color2.

Control the color with a geometry attribut Cd

We create a PrimAttr shader to read the Cd attributes

  1. Into the Particle material check the Shader>Incandescence>Color>M
  2. Set this new Shader to PrimAttr
  3. Set the Attribute Name to Cd
  4. Set the Shader>Incandescence>Intensity to 1
  5. Trig a render
  6. Smile ;)

Control the color with a geometry attribut pscale

We create a material override to control the size with the geometry attribut pscale

  1. Create a MaterialOverride between the Particle material and the Attributes nodes.
  2. Create an ParticleScale parameter in Float
  3. Click the ParticleScale>M
  4. Set the shader to PrimAttr
  5. Set the Attribute Name to pscale
  6. Change the Particle point size to 50
Your skill is great!