X-Particles integration

Jan 06, 2021 13:41

CentiLeo and X-Particles integration

CentiLeo supports rendering X-Particles https://insydium.ltd/products/x-particles/ with direct integration of particle instances motion blur and consumes a lot of particle attributes for shading. 
Potentially out-of-core amount of particles (hundreds of millions of them) can be rendered by CentiLeo on GPU if CPU and RAM performance are ready to produce such complex simulation setup. CentiLeo can also render complex geometry object within particle itself also with out-of-core technology support for polygons inside a particle.

Particle Geometry

X-Particles engine generates particle positions and their parameters and to render each particle with actual geometry the tag “CentiLeo Object Tag” should be added to xpEmitter object. This tag has particle setting “Reference Objects” where user specified geometry objects can be added to represent particles on render.

CentiLeo object tag.png

These objects can include any other Cinema object, even hierarchies but not other X-Particles emitters. Each particle has one randomly assigned reference object. The actual particle size depends on particle transformation matrix, scale, particle radius and dimensions of particle reference object.

xparticle_render.png

Motion Blur

Motion blur on CentiLeo side is enabled in renderer settings in Camera tab and they have global effect for all scene objects. Up to 32 transformation keys (object matrix change) are supported for all regular Cinema 4D objects, but particles support just 2 transformation keys. Deformation motion blur produces 2 step blur for deforming object geometry with constant topology (non changing polygon count).

render_settings_motion_blur.png

Non-cached X-Particle simulations may produce few artifacts sometimes in case motion blur is enabled because motion blur render requires changing scene frame/time to evaluate particle positions at adjacent frames. To avoid these issues the simulation should be cached with xpCache object.

Particle Shading

It’s important to assign variation to particle colors on render. CentiLeo renderer can use various particle attributes using the ParticleInfo shading node. This node may output particle ID, Group ID, Position, Rotation, Velocity, Speed, UVW, Color, Age, Lifespan, Radius, Mass, Density, Distance Travelled, Temperature, Fuel, Fire and Smoke values. 
These values have different units e.g. the Age and Life Span are given in seconds while Position and Radius are in scene distance units. These values may change during simulation however particle ID is constant.

The common practice is to use Remap shader node which allows to project selected particle attribute value to 0..1 range given particle values input range which should be known by user or taken from experiments. The resulting value can be used as input of Gradient shader node to colorize the particle attribute and can be connected to diffuse color channel of material node assigned to particle xpEmitter object or particle reference object or underlying hierarchy child of reference object. This shading scheme is presented below. On this example the values of particle Age are mapped to the heat map gradient where blue particles are new and red particles are old.

particle_shading_setup.png

Resulting render of falling spheres can be seen on image below:

xparticle_render_shading_example.png

Limitations

At this stage CentiLeo doesn’t support curve rendering, so xpTrail is not supported for now.
If Emission material is applied to particles then it’s not importance sampled, so the noise can be high if this particle lighting setup is intended to be global across the scene. But this situation is ok if emission material of particles has local effect which is common situation.

Anyway, both limitations will be solved in future releases.