Author Topic: Light diffusion material  (Read 3944 times)

2018-05-29, 14:25:42

fabioazevedo

  • Active Users
  • **
  • Posts: 28
    • View Profile
Hello guys!

I'm currently developing a project where I need corona to simulate the light behavior of a slightly unconventional lighting system, and I'm doubting the results I'm getting in terms of it being physically correct.
The system itself will eventually have other layers of complexity, with LED lighting and sensors to mimic color and intensity of natural light, but for the purpose of this topic I'll go to the point.
I have a series of small/regular sized windows and, in front of them, I'll put some sort of light diffusion continuous plane to minimize the perception of the individual windows and create a more uniform strip of light.
In terms of direct visibility it will never be perfect using this diffusion plane only (hence the LED to improve the effect), but what I wasn't expecting was that the sun rays weren't diffused passing through it.
I'm using corona sun+sky (but I got the same results with HDRI) and I've played with all refraction, volumetric, sss and translucency values. The only thing that was constant was the defined shape of the windows projected on the ground. Shouldn't the light get diffused? is this normal behavior?
I made a quick real test with a laser and a polycarbonate panel and it did get quite diffused as I was expecting.
Am I missing something? Is it a known limitation?

Thanks in advance.



2018-05-29, 14:28:41
Reply #1

Jpjapers

  • Active Users
  • **
  • Posts: 1672
    • View Profile
Seems like a bug to me. Does your diffusion material have depth to it or is it a single face?

2018-05-29, 15:18:14
Reply #2

fabioazevedo

  • Active Users
  • **
  • Posts: 28
    • View Profile
It has depth. I've played with that too, even to an exaggerated thickness, but it didn't change either.

2018-05-29, 16:04:43
Reply #3

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12828
  • Marcin
    • View Profile
It definitely looks wrong. Can you share the scene with us?

If you are using refraction, you will get this result. This is because by default Corona uses "transparent shadows" for glass, rather than true caustics. If you enable caustics, you will get correct results, but the rendering will be extremely slow and noisy.

The solution is to use translucency (only, no refraction!).
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2018-05-29, 16:52:04
Reply #4

fabioazevedo

  • Active Users
  • **
  • Posts: 28
    • View Profile
I've replicated the behavior in several different test scenes (I'll attach one of them, but it's rather basic), and even went back to other scenes with normal glass windows and changed the materials, but results are the same throughout.

I thought about caustics as well (render times and noise are not a concern) but turning them on simply blocks any direct light from coming in, which doesn't seem plausible either. It's like you have maximum diffusion with no control whatsoever on the blur amount, even with different refraction glossiness values.
I also just did what you suggested, using translucency with no refraction, but it kinda does the same thing, as you are limited to 100% diffusion.
I guess this could be the case with some materials, but not necessarily with all of them, right?

2018-05-29, 18:32:51
Reply #5

sprayer

  • Active Users
  • **
  • Posts: 794
    • View Profile
Caustic works better with bidir/VCM

here example similar to your photo test with almost directional corona light and glossy refraction box. But it's very noisy, without better caustic support  this will be hard to render

http://imagizer.imageshack.com/img922/2870/vqjcVP.jpg

2018-05-29, 19:43:38
Reply #6

fabioazevedo

  • Active Users
  • **
  • Posts: 28
    • View Profile
There you go!

With bidir/VCM it works as expected. I will do some tests to better understand the usability of this method for my specific needs.

I haven't been following the forum closely for the last couple of years, but i'm a bit surprised that this isn't a more frequent issue tbh. Hope it can be brought to a production ready setup soon.

Thanks again for the help.

2018-05-30, 11:40:09
Reply #7

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12828
  • Marcin
    • View Profile
@fabio I downloaded your scene and hit render, and this is the result I am getting (see attached)
Isn't this exactly what you needed?
There are no sharp shadows from the sunlight, and enviro light is scattered all over the room.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2018-05-30, 12:39:15
Reply #8

fabioazevedo

  • Active Users
  • **
  • Posts: 28
    • View Profile
It would be plausible in some light conditions, but for the specific light of that scene and a somewhat credible diffusing material, I would expect something more like the image attached in this post, which was rendered with bidir/VCM.

At least it should be possible to control the "blurriness" of light projection.

What I need is to understand physical light behavior with the help of corona (which I might be able to do with the experimental mode), use that knowledge to make project decisions, and only then try to make a final image for presentation purposes.

This final image might be difficult if I decide to go for something like 0,5 refraction glossiness, with real caustics, as in the attached image.

2018-05-30, 12:56:12
Reply #9

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12828
  • Marcin
    • View Profile
Experimental render engines such as VCM are not production ready - they will most probably give you persistent fireflies or some other issues.

Anyway, here is an update:
I tried experimenting with this material and here are my results:

translucentplastic-2015.max - scene in max 2015 format


nowindows - room rendered with no window geometry (light just enters the room with no obstacles)


windows-translucency - a material using translucency only
note: this seems to be the best (compared to references) and fastest result


windows-volumetric-sss - using volumetric SSS only
note: slow, noisy, and darker


windows-glass-caustics - using glass material with caustics enabled
note: fireflies, darker, some artifacts close to the windows


laser-translucency - laser pointer test, same material as in windows tests
notes: quite dark, and produces splotches because of uhd cache (switching to "animation" preset solves this, but the cache is computed slower)


laser-volume-sss - same material as in windows tests
notes: seems to look close to reality


laser-glass-caustics - same material as in windows tests
notes: noisy, doesn't look usable

Additional notes:
-There is also a "best?" material in the scene. It is a kind of mix between the glass material and the sss material. So it has reflections, but also scatters light.
-It would be probably possible to come up with a material which mixes various features using the rayswitch mtl - for example a material which scatters light using translucency, but in direct visibility it is just a solid white plane with reflections, or similar.
-When the light passes through an object, it is considered GI, and this GI light is clamped by the Max Sample Intensity parameter in the Render Setup > Performance tab. This means that in cases like this the light will become darker than it would be in real life. The solution is to increase the MSI value, but increasing it too high will produce fireflies which may never go away.

Conclusion:
Looks like translucency with reflections enabled should work best here, or the "best" material which is a mix of SSS and glass.



Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us