Community
Arnold for Cinema 4D Forum
Rendering with Arnold in CINEMA 4D using the C4DtoA plug-in.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

1 REPLY 1
Reply
Message 1 of 2
dadeFC4BK
8920 Views, 1 Reply

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

 
Tags (1)
Labels (1)
1 REPLY 1
Message 2 of 2
dadeFC4BK
in reply to: dadeFC4BK

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.

20-xparticlescolors-bty-001.jpg

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.

21-particlecolors-process-001.pngAs this is a frequently asked question we have provided both the question and answer in this thread.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report