Tutorial: The Falloff: Shadow/Light - unsupported map workaround

Hi,
Recently I had to create Planet Earth, but I wanted to do it fully in Corona Render,
without rendering separate layers and compositing them in post production.

Something like Jonas Noell showed in this great tutorial using VRay here:
→ youtu.be/mTHKU9c6eAg

Unfortunately the crucial map - Falloff: Shadow/Light is still not supported in Corona Render.
It works in VRay.

If we want our planet shader to react on sun position - this map is needed to mask out the maps and elements that are not lit by the light source.
For example the lights in the cities or inner atmosphere.


— THE WORKAROUND —

To workaround this issue I used 3ds max OSL map to create simple shader based on basic Lambert shading
additionally adding additional parameters like tresholds, ease control and invert.

Well to be honest ChatGPT helped me a lot with this xD

It is not perfect but acts like simplified Falloff: Shadow / Light.
It does the job. The results are ok.


— HOW TO USE —

I am attaching my OSL shader down below in the attachments. Its just simple and short text file.
I called it msShadowLightRamp.osl

  1. In 3ds max instead of using unsupported Falloff: Shadow / Light,
    select maps → general → OSL map.

  2. click (…) and open the file msShadowLightRamp.osl

  3. Select your light

  4. Adjust the parameters if needed.

I hope you will find it useful (until the Corona Render will finally support the native Falloff: Shadow/Light xD)

msShadowLightRamp.osl (1.76 KB)

Hi,

Haven’t checked the script, but I create a very similar scene some long time ago.

In such scenarios a towards-away falloff map works just as fine and you have the intuitive curves to control the transition.
Maybe worth a try, who knows.

P.S. ignore the Arnold render, it works anyway :smiley: