In simulations with two more more fluids or emitters RealFlow | Cinema 4D tracks the distances between the particles and creates a weight map. These weight maps can be used to render a blending effect for differently coloured fluids. The workflow is pretty much the same as with → channel vertex maps, but there are a few things to consider. Let's start with how to blend two particle sources – you can combine up to nine emitters/fluids and extract weight maps:
- Create a simulation with two fluids or emitters – there is nothing special you have to consider, but the particles should mix at some point in time.
- Add a "Mesher", go to → Mesher > Channels, and enable the "Weight" option.
- Choose, whether the weight vertex maps should be created from the fluids or the emitters.
- If you have two (or more) fluids then both containers have to be meshed together!
- Create the mesh as usual.
Material Setup
That's everything you have to do in terms of simulation and meshing. When the → building of the mesh or the → caching is finished you will see two new vertex maps: "weight0" and "weight1".
In order to render blending fluids with weight maps you have several options, e.g. with gradients, Cinema 4D's "Fusion" shader, or by stacking two materials. Here we want to go on with the 2-materials method:
- Create two materials and decide which one should be the base and top colour.
- Apply the base material first, then the top colour.
- Open the top colour and create an "Alpha" channel. Add Alpha > Texture > Effects > Vertex Map, and click on the white thumbnail.
- Drag one of the weight vertex maps to the empty slot.
Annotations
As mentioned in the introduction there are some things to consider with weight maps:
- The maximum number of weight vertex maps is 9.
- RealFlow | Cinema 4D's meshing engine is not responsible for the colour blending effect itself – it only provides an Alpha map.
- When you work with more than two fluids/emitters then the base colour must not have a vertex map applied.
Blending colours has some restrictions, introduced by Cinema 4D and the render engines:
- All render engines use an additive RGB model. This means that mixing red, green, and blue in equal proportions, results in pure white.
- The mixing of subtractive colours (CMYK), on the other hand, results in pure black or – more or less dark – grey tones. This colour model is not supported by today's render engines.
- These fundamental differences between the colour models (RGB vs. CMYK) may result in apparently wrong colours, but in fact they are correct according to the additive RGB model.
Here is the difference between the RGB model, used in CGI/DCC, and CMYK colours, used for printing and painting: