Share

X-Particles - Arnold for Cinema4d

X-Particles is a powerful, commonly used third-party particle simulation engine developed by Insydium Ltd. C4DtoA is shipped with native support for X-Particles. The X-Particles Emitter object is automatically translated to an Arnold points node with default settings (as points). To define parameters for the points node, you must add an Arnold tag to the Emitter.

Note:

Known limitations:

  • Size variation and scale settings of the X-Particles material does not work in XP v2.5. In v3 it only works in the PV render and not with the IPR.
  • Particle filling is not supported. It is not accessible via the API.
  • X-Particles does not work correctly in the IPR in some cases or some changes require to rerun the simulation.

Main

See the Particles page for more information about generic particle parameters.

Channels

Each particle has several data channels assigned which can be exported to Arnold and read within a shader network. On the Channels tab, you can define which channels you want to export. Values are added as user parameters with an xp_ prefix (e.g. xp_id, xp_velocity, xp_color, etc.) and can be read via the dedicated xparticles shader or the appropriate user_data shader.

If an X-Particles Material is added to the emitter then radius, color, and transparency are sampled using the material.

The following channels are available:

Name Parameter name Type Description
ID xp_id int The unique identifier of the particle.
velocity xp_velocity vector The velocity of the particle (m/s).
age xp_age float The age of the particle (seconds).
life xp_life float The lifespan of the particle (seconds). -1 if Full Lifespan is enabled.
mass xp_mass float The mass of the particle.
speed xp_speed float The speed of the particle.
density xp_density float The density of the particle.
spin xp_spin float The spin of the particle.
UV xp_uv vector The UV coordinates at the given particle.
temperature xp_temperature float The temperature of the particle.
fuel xp_fuel float The fuel value of the particle.
fire xp_fire float The burn value of the particle.
smoke xp_smoke float The smoke density of the particle.

Channels can be mapped to the 0-1 range (between the minimum and maximum value of the current frame) where it's possible. Any custom mapping can be achieved within the shader network by exporting the minimum and maximum channel values (Export channel min/max value is enabled). The min and max values can be read via a user_data_float shader. The name of the parameter is the channel name with the xp_ prefix and a _min or _max postfix (e.g. xp_age_min, xp_density_max, etc.).

An example setup of custom mapping of the density channel.

Motion Blur

Enable

Enable/disable motion blur of the particles.

Use Motion Vector

When enabled the motion blur will be calculated using a velocity channel instead of taking the position of the particles in subframes.

Unit

Specifies if the velocity is interpreted as a 'per frame' or 'per second' value.

Scale

A float scale field (with a default value of 1) to do time scaling effects.

Shading Workflow

If no Arnold shaders are defined for the Emitter, then a default xparticles shader will be assigned to display the color of the particles. You can also use any surface shader (e.g. standard_surface) together with xparticles.

  1. Create a standard_surface shader by clicking Create > Arnold > Surface > standard_surface in the Material Manager.

  2. Open the network editor and add an xparticles shader from the tree.

  3. Connect the xparticles shader to the Base > Color parameter of the standard_surface.

  4. Select the xparticles shader and set the color channel to age for example.

  5. Don't forget to enable the age channel export in the Arnold tag of the Emitter. Change the render mode to spheres as well.

  6. Setup the standard_surface shader by your needs and assign the material to the X-Particles emitter. You can also add an X-Particles Material to the emitter and use its color output to colorize the particles. The Color channel in the xparticles shader must be set to color in this case.

Info: User data shaders can also be used to read exported channels. In this case, you have to use the xp_ prefix in the attribute name (e.g. xp_velocity, xp_age).

XP Trails

Trails are supported directly since C4DtoA 3.3.2 and X-Particles build 4.0.895. Thickness and color data is automatically exported to Arnold when an Arnold tag is added to the xpTrail object.

Use the xparticles shader or a user_data_rgb shader with the xp_color attribute to read the color of the trails in a shading network.

Note:

Known limitations:

  • Spline intermediate points are not supported.

Was this information helpful?