Author Topic: 'Add' shader/node/material  (Read 3082 times)

2016-08-29, 12:12:21

avl

  • Active Users
  • **
  • Posts: 7
    • View Profile
There is a layered material in Corona, which mixes several materials with weights.
It would be great to have an 'add' material/shader which just sums up material colors without weights.
While it breaks energy conservation, it's often useful, e.g. to fake dispersion.

Currently, it's unclear how to make a realistic (albeit fake) diamond material with dispersion in Corona.
The common way to fake dispersion is to sum up three glass materials for R,G,B colors with slightly different IORs.
If using a mixing layer, the result will be too dark (one third of required).
I also tried to multiply reflection/refraction colors by 3, but it gives strange tinted results. It's possible to find mixing weights which result in a neutral color, but it's quite difficult, and the result is still dark.

So, a proper 'add' material would solve this problem. Which is much easier than a full spectral rendering solution, and probably preferable from an 'artistic' point of view, since the real dispersion is rather weak and a fake one is more art-directable.

I attached corona mtl preview results, to illustrate the stuff above.
plain.png/plaint.txt - is a pain glass (IOR=2.4) material
dark.png/dark.txt - is a mix of three glass materials with slightly varying IORs and reflection/refraction colors set to red, green and blue
trippled.png/trippled.txt - is the same as previous. but color values are multipled by 3 (which is incorrect probably)

« Last Edit: 2016-08-29, 13:27:46 by avl »

2016-08-31, 00:37:49
Reply #1

3dwannab

  • Active Users
  • **
  • Posts: 362
    • View Profile

2016-10-03, 16:37:40
Reply #2

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 9048
  • Turning coffee to features since 2009
    • View Profile
We will add dispersion as separate control. In the meantime we fixed some bugs that would cause incorrect shading of layered materials with refraction. ADD still remains too unphysical to implement (sorry, we dont want to deal with crashes and freezes caused by creating material with albedo > 1 and enclosing it in closed space ;)
Rendering is magic.How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)