CParticleRenderer Mesh

From PopcornFX
Jump to: navigation, search

Mesh renderer Last update: v1.10.0 - Main page : Particle renderers Particle renderers

This renderer draws the particles as meshes.


This renderer is supported in all of our public engine integrations.
You can check the implementation status of a feature in our public integrations here:


Mesh renderer


Mesh renderer Node properties

The mesh renderer is split in two main nodes:

  • The actual mesh renderer node
  • One or more mesh descriptor nodes, you can see these as the individual rects in a texture atlas, except here it's a "mesh atlas". To create other mesh renderer descriptor nodes, right-click on the mesh renderer.


Field name Default value Description
Light renderer Material
UserData Empty Use this if you need to pass custom data to your game engine's integration (custom PopcornFX SDK). If you're Using UE4 or Unity, you can ignore this.
Light renderer Geometry
DrawOrder 0 Rendering order index of the particle.

Defines the order in wich the particles are rendered. Smaller value will be rendered first.

Mesh renderer General
MeshIdField <empty> Name of the particle field containing the Index into the mesh list telling the renderer which mesh to draw for each particle. similar to TextureID for billboard renderers. Should reference a particle field of type float
Mesh renderer Static transformations
Scale 1; 1; 1 Scale to be applied to all rendered instances
StaticPositionOffset 0; 0; 0 Use this to pre-translate all meshes
StaticOrientationOffset 0; 0; 0 Use this to pre-rotate all meshes (rotations in degrees, euler angles around the x, y, and z axes)
StaticRotationAxis 0; 0; 0
Mesh renderer Dynamic transformations
PositionField "Position" Name of the field containing the mesh position. Should reference a particle field of type float3
ScaleField <empty> Name of the field containing the mesh scale. Should reference a particle field of type float or float3
EulerRotationField <empty> Name of the field containing euler rotation angles (in radians) for the mesh. Should be of type float3
RotationAxisField <empty> Name of the field containing a rotation axis. Should be of type float3
RotationAxisAngleField <empty> Name of the field containing the rotation angle around the rotation axis. Should be of type float
PositionOffsetField <empty> Name of the particle field containing the POSITION OFFSET the renderer should use to build the mesh transform matrices. Should be of type float3
ForwardAxisField <empty> Name of the particle field containing the FORWARD axis the renderer should use to build the mesh transform matrices. Should be of type float3
UpAxisField <empty> Name of the particle field containing the UP axis the renderer should use to build the mesh transform matrices. Should be of type float3
Mesh renderer layout



Field name Default value Description
Light renderer General
Mesh <empty> Path to the FBX mesh to be used
MeshLOD 0 Base LOD Level of the Mesh to render (NOT IMPLEMENTED in PopcornFX Editor !)
SubMeshId -1 Index of the sub-mesh that should be rendered (a value of '-1' will display all submeshes)
Material Solid_Lighting Material to be used when rendering the mesh:
  • Additive
  • Additive_NoAlpha
  • Distortion
  • Solid
  • Solid_Lighting
CastShadow false If active, particles cast shadows (NOT IMPLEMENTED in PopcornFX Editor !)
MaterialParameterFields <empty> Mappings of particle fields to material parameters (ie: "DiffuseColor = Color")
Mesh renderer Textures
Diffuse <empty> texture diffuse: color(rgb), gloss(a)
Normal <empty> texture normal: normal(rgb)
Specular <empty> texture specular: specular(r)
DiffuseColor 1; 1; 1 Diffuse color
AmbientColor 0; 0; 0 Ambient color
Renderer mesh descriptor layout


Mesh renderer Material bindings

The 'MaterialParametersFields' property allows you to bind particle fields to custom material properties.

The Popcorn-Fx editor material used for mesh particles only supports the 'DiffuseColor' material property. It is used to color the meshes.
For example, if you want to change the per-instance color of the mesh, and have a 'Color' particle field, you'd just add the following line to 'MaterialParameterFields':

DiffuseColor = Color

However, As the final renderings in your game use your engine's own materials, you can use these bindings to bind any particle field to any of the properties your own materials might have. Talk to your developers about this to see what can be bound.


For example, if you have a material that has a 'UV_SCROLLSPEED' property, and you want to control that property per-particle, you'd do that by creating a custom 'float2' particle field, named for example 'ScrollSpeed', update it however you like in the evolvers or spawn-scripts, and add the following line to 'MaterialParameterFields':

UV_SCROLLSPEED = ScrollSpeed


Obviously you won't see any change in the Popcorn Editor's viewport, because it will ignore bindings it does not recognize, and it is a binding specific to your own game engine's materials.
However, if you are using the live-connection with your world editor or running game, you can tweak the values and see the final rendering instantly.