Dade Orgeron avatar image
Dade Orgeron asked ·

How do I randomize and take control of particle colors from X-Particles in Arnold?

10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

1 Answer

· Write an Answer
Dade Orgeron avatar image
Dade Orgeron answered ·

Taking control of the colors of X-Particles’ particle emissions is actually quite simple and powerful when rendering with Arnold in Cinema 4D. For most of all my needs, I find it best to fine tune the colors and values in the Arnold Shader Network Editor instead of at the particle level. I can feed my Arnold material a specific value by using X-Particles’ native controls and use that value for control in the shader network. This gives me full interactivity in Arnold’s IPR window and I don’t need to re-simulate to see the changes I make. In this example, I simply want to emit some particles and use a gradient to randomize the colors of the emitted particles.

or simplicity's sake, I’m going to assume you already know how to set up an X-Particle emitter and have the particles moving and reacting the way you want. I’ll also assume you at least know the basics of creating and modifying materials in Arnold’s Shader Network Editor (can I just call it ASNE from now on?). Here are the steps:

  1. In the Particle Display tab of the X-Particles Emitter, set the Color Mode to Gradient (Random). You can set this to whatever works for your needs, but for this example, I want the particles to have a random color. Leave the Gradient Color at default (grayscale) since we’ll be using this as more of a value to drive ramps in the shader network.
  2. Now add an Arnold Parameter tag to the xpEmitter, and under the Main tab, tell the tag to Render points as a Sphere. You can change this to whatever you like and even add custom geometry (which is awesome), but for this example we’ll leave it as Spheres.
  3. Click the Channels tab. You’ll notice that Export color is already selected, which is what we want. You can also see that there are a variety of other channels that can be stored. Feel free to experiment, but we’ll save those for another day.
  4. Create a new Arnold Standard Surface material or use the one you may have already created, and assign it to the xpEmitter. Now in the ASNE add both a ramp_rgb and an xparticles node.
  5. In the parameters for the xparticles node, leave the channel to Color (default). Again, you can experiment with this later… there’s no better way to learn, then to break it. you can always undo.
  6. Now plug the xparticles node into the input of the ramp_rgb node and plug it into the color of your xpEmitter material. Try adjusting the gradient as you desire. Doing it this way you can get immediate visual feedback in the IPR window for easier experimentation and adjustment.

As this is a frequently asked question we have provided both the question and answer in this thread.

10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Welcome to the Arnold Answers community.

This is the place for Arnold renderer users everywhere to ask and answer rendering questions, and share knowledge about using Arnold, Arnold plugins, workflows and developing tools with Arnold.

If you are a new user to Arnold Answers, please first check out our FAQ and User Guide for more information.

When posting questions, please be sure to select the appropriate Space for your Arnold plugin and include the plugin version you are using.

Please include images, scene and log files whenever possible as this helps the community answer your questions.

Instructions for generating full verbosity log files are available for MtoA, MaxtoA, C4DtoA, HtoA, KtoA, and Kick.

If you are looking for Arnold Documentation and Support please visit the Arnold Support site.

To try Arnold please visit the Arnold Trial page.

Bottom No panel present for this section.