Foreword
In this tutorial, the idea is to verify if render software properly simulate colour mixing. For that, we will use, when possible, IES files in order to mimic as much as possible real phenomena. It extends and refreshes the previous tutorial on the same topic: http://www.keris-studio.fr/blog/?p=5475
Colour mixing refers to Grassmann’s laws (https://en.wikipedia.org/wiki/Grassmann%27s_laws_(color_science)). In colorimetry, Grassmann’s laws govern the superposition of colours. They serve as the foundation for all colorimetric calculations. Hermann Grassmann’s 19th-century studies of human colour perception led him to formulate three laws in his 1853 article « On the Theory of Colour Mixing. » (Grassmann, H. (1853). « Zur Theorie der Farbenmischung »).
These laws express the trichromacy principle, which states that a colored sensation can be indistinguishable from an additive mixture of three appropriately chosen primary colors. They are mentioned with variable statements that most likely have little to do with the original statements. They are reduced to three propositions in modern terms:
- To characterise a colour equalisation, three independent variables are necessary and sufficient;
- In an additive mixture of colour stimuli, only the trichromatic components matter, not the spectral compositions;
- In an additive colour stimulus mixture, if one or more of the components of the mixture are gradually changed, the resulting trichromatic components are also gradually changed.
These rules are frequently replaced by mathematical formulae, implying that mixing relationships are linear, which Grassmann did not postulate. They are the result of applying Abney’s law to Grassmann’s propositions. This set serves as the foundation for all linear colorimetric systems. (http://iitp.ru/upload/content/1512/GrassmannTheorie%20der%20Farbenmischung1853.pdf)
Finding IES lights
Nearly every manufacturer provides IES files, sometimes with 3D models. Several websites propose large collections of IES files. For this example, sources come from this site: https://ieslibrary.com/en/browse
Setup in Rhino
Rhino has no inbuilt sophisticated rendering tool. It uses external motors. The light settings do not allows IES files. Let’s see the results with those simple light simulation.
We prepare 3 lights, one Red (R255,G0, B0), one Green (R0, G255, B0), one Blue (R0, G0, B255), and 3 more that cross flux.
This is the light setup for green:
The final render shows that the mixed colours are correctly rendered. White is obtained at the crossing of the three flux.
Setup in Blender
The same scene is used. It has been exported in FBX to keep the lights.
In Blender, the hierarchy is verified.
To use IES lights, we need to use Cycle as default render.
Select one lamp, go to lamp setup, and click on “Use Nodes”.
In the Shader Editor, we find this structure.
We will use a IES Texture component, Click on External to load the IES file
The power can be set in Watt or with the Strength Box
We do the same for all lights
The first result is ok, but some enhancements could be done.
Setup in 3DSMAX
Max’s Arnold render brings a huge control on the image, it mimics real physics phenomena, so is the lighting setup a bit more complicated.
Lights will be replaces by Arnold Lights.
By choosing photometric, we can import IES files to simulate real light source.
Material are also set with Arnold components. In this case, we choose very basic settings.
The result is way more detailed and subtle.
Good thing is, it is quite easy to bake the textures to have an online virtual experience with a very complex lighting.
Just press 0 (zero on the main keyboard (not numpad) or/and choose Bake to Texture. Press + Add Maps to selected Objects. Choose Beauty, choose Output to Original Material (new Material and then choose one), Choose Base Color to have the result directly, press Bake. Please note that objects will need UVW coordinates in order to work properly.
Textures are converted to glTF to be real time compatible. Then exported for Real time.
Setup in SIMLAB
Simlab usually produces very good results. But with exercise we face problems.
Our lights are set to IES with the same IES file than before. For white colour it works.
Let’s colourise…
Verify with shadows
OK, this works. Let’s check with our scene.
With the whole set, it’s ok but not perfect yet. Let’s remember that it is real time, Arnold was not. Nota bene, it is needed to use
If we add 3 more lights it becomes not very good in terms of simulation. We should have the complementary colours in the shadows.
Let’s bake, Simlab has a very good baking system.
Setup in Twinmotion
In Twinmotion we also have a simplification that is visible with shadows
If we dim light
Not bad, but not so good.
Conclusion
Precalculated lights in Blender and 3DSMax will bring the more accurate results. Baking in max is very easy now, it might be the best choice to prepare high quality real-time simulation.