Create Materials Whose Colors Add Together?


#1

I have a scene with a bunch of cylinders, randomly colored Red, Green, or Blue, and a random effector changing their positions and rotations:
image
Because I’m using the color channel, you’ll notice that where one cylinder is in front of another, the front cylinder covers up the behind cylinder (this is expected behavior). What I would like to happen is for the colors to add together. So, for example, at the small intersection the arrow is pointing to where the blue cylinder overlaps (is in front of) the red cylinder, instead of seeing blue, I would like to see magenta (red + blue):
image
Similarly, where all three colors are overlapping, I would expect to see white. How can I achieve this? What would the material setup look like?


#2

This is a 2D renderer thing. You have to render your objects in separate passes (one for each colour). Then combine them in with a blend mode.


#3

Hi,

You can do this via Additive mode in the Transparency Channel.

You can have this in either three separate materials for each RGB channel, or in my example here, I used some random hue and Colorized that with a stepped RGB gradient.

brasco_C4D_Additive_Shader_v01.c4d (Download)

cheers,
brasc


#4

Thats a great info. working with cinema for soooo long and missing this button :slight_smile:

thanks a lot Jops


#5

Wow Brasco, I haven’t needed to do this yet, but that is a high-level tip. I’m sure in a few years I will be desperatley searching for this thread :wink:


#6

Thank you, that worked perfectly!