Author Topic: Major Bug? - CoronaSun + Thick Glass + Glossy Reflection = Incorrect Shading  (Read 12722 times)

2015-09-03, 11:48:42

atelieryork

  • Active Users
  • **
  • Posts: 283
    • View Profile
    • Atelier York
Running the latest daily build but I was having this issue with 1.2 and colleagues having the same issue with older versions too.

Very simple scene:

CoronaSun inside a daylight system (default settings for the sun) pointing at solid pane of glass with IOR 1.52 onto a floor object which is reflective with IOR 7 and glossiness 0.5.

Let's change the glossiness value of the floor material and see what happens:

Glossiness 0.5:



Glossiness 0.53:



Glossiness 0.55:



Glossiness 0.6:



It's probably the viewing/glancing angle that is the issue rather than glossiness (who knows) but as you can see there is a major shading error here. There is no object outside the window/door that would cause that "shadow". The issue must be related somehow to refraction in the glass material (see later).

Here are the render elements for glossiness 0.5. You can see that the incorrect "shadow" is shown in all the main render elements.

Direct:



Reflection:



Shadows:



Here are the same results but I'm using a simple map to drive the reflection slot. I have changed to glossiness 0.4 and 0.45 to make the effect more obvious.



And here's another render but with the camera very low to the floor, just FYI.



And here is an even more obvious example:

With glass casting shadows:



With glass NOT casting shadows:



With glass casting shadows but with glass material set to THIN (no refraction) mode:



With glass casting shadows but with glass material THICK but with IOR = 1.0:



Looks like IOR doesn't make any difference. Only the THIN option can "fix" it, but this results in incorrect/unphysical result because you're using a solid thick glass mesh.

So I think, basically, that there is a major issue with CoronaSun coming through THICK glass and hitting a reflective object with glossy reflections.

- If I disable Cast Shadows on the glass object the problem goes away.
- If I disable the CoronaSun the problem goes away
- If I disable reflectivity on the floor material the problem goes away.
- If I enable THIN mode for the glass material the problem goes away
- The problem is not related at all to the use of maps (same issue appears with or without maps used)
- Legacy Mode for the glass material makes no difference if on or off

I can't share this scene but I might try to make a simplified version of it, but it's probably easy to replicate if you create one like the examples above.
Alex York
Atelier York
www.atelieryork.co.uk
max 2016 sp1, corona 1.3 final, win 8.1. pro

2015-09-03, 11:53:51
Reply #1

atelieryork

  • Active Users
  • **
  • Posts: 283
    • View Profile
    • Atelier York
And just in case anyone else came across this issue, here are the simplest ways to "solve it" (incorrectly, but at least the shading error goes away) before the bug is squashed:

Either:

1) Enable THIN mode on your glass material

or

2) Disable Cast Shadows on your glass objects

This should mean that you don't need to mess around with your glossiness or reflectivity of your "receiver" objects, so the scene should still look more or less ok.
Alex York
Atelier York
www.atelieryork.co.uk
max 2016 sp1, corona 1.3 final, win 8.1. pro

2015-09-03, 12:00:24
Reply #2

pokoy

  • Active Users
  • **
  • Posts: 1861
    • View Profile
I wonder if what you see is the 'glossy reflections of high intensity values through glass result in dark/black reflection' limitation, if yes, it's a known behavior and only better when switching the glass material to be 'thin'. Though I only saw it on curved surfaces, the shadow on the floor might be what happens on flat panes, but I guess only the devs can say.

Here's a link to t athread discussing this:
https://forum.corona-renderer.com/index.php/topic,6883

Good documentation of the bug btw ;)

2015-09-03, 12:01:45
Reply #3

atelieryork

  • Active Users
  • **
  • Posts: 283
    • View Profile
    • Atelier York
I thought about this as well, but then I did a test with the coronasun set to 0.1 intensity so nothing was blown out but the problem remained exactly the same. So I think we can rule this out.

I just saw that other thread you linked. That's depressing...! 1.5 or 2.0 to fix this is really bad news if it's still the case...
« Last Edit: 2015-09-03, 12:06:27 by atelieryork »
Alex York
Atelier York
www.atelieryork.co.uk
max 2016 sp1, corona 1.3 final, win 8.1. pro

2015-09-03, 13:03:36
Reply #4

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12754
  • Marcin
    • View Profile
Yes, it's a very serious problem, but also very hard to fix. I also pointed it some time ago and was surprised how little attention it received (by the community, not by the developers!).

By the way, Atelieryork, can you share your scene? (if you do not wish to share it publicly, it can be via pm)
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2015-09-03, 13:05:27
Reply #5

atelieryork

  • Active Users
  • **
  • Posts: 283
    • View Profile
    • Atelier York
Totally agree. My colleague here has had the same issue many times so it's probably more common than appears from the forum. I'm very surprised that more people aren't talking about it here as well. It's such a common scenario - sun coming in through glass on glossy floor...

I will try to simplify the scene and PM it to you, sure.

Edit; PM sent, Maru, with the scene.
« Last Edit: 2015-09-03, 13:49:55 by atelieryork »
Alex York
Atelier York
www.atelieryork.co.uk
max 2016 sp1, corona 1.3 final, win 8.1. pro

2015-09-03, 13:22:47
Reply #6

pokoy

  • Active Users
  • **
  • Posts: 1861
    • View Profile
I am seeing this regularly and the workarounds aren't pretty.

It's a serious problem for any kind of interiors, not only architectural but in a lot of other fields as well: automotive (dashboard, leather, seats, most of them need low glossiness), yacht interiors, airplanes (that's where it affects me)...

2015-09-03, 13:56:39
Reply #7

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 9048
  • Turning coffee to features since 2009
    • View Profile
We are aware of the problem and can reproduce it ourselves (so I dont need the scene from you for devel/debugging). As was said, we are still waiting for some core rewrites before it can be fixed. The recommended workaround for now is to use thin glass mode, which should in this case render the same image, without the problems, maybe even faster.

I will move this thread to resolved bugs, as it is a duplicate to one in mantis
Rendering is magic.How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)

2015-09-03, 14:25:29
Reply #8

atelieryork

  • Active Users
  • **
  • Posts: 283
    • View Profile
    • Atelier York
Ondra - You recommend using Thin glass mode but does this mean we should use thin geometry too? Or are we safe to continue using thick solid geometry but with Thin mode enabled? It's not really practical to have to remodel all glass elements in some scenes.
Alex York
Atelier York
www.atelieryork.co.uk
max 2016 sp1, corona 1.3 final, win 8.1. pro

2015-09-03, 14:28:47
Reply #9

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12754
  • Marcin
    • View Profile
No, the advise is to use the same model, just with "thin" mode enabled. (a solid box, with thin mode) This will be ok for a glass panel, but not if there was a glass vase or some other solid object standing on that floor.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2015-09-03, 14:30:42
Reply #10

atelieryork

  • Active Users
  • **
  • Posts: 283
    • View Profile
    • Atelier York
Thanks for clarification. I hope this can be sorted out relatively soon.
Alex York
Atelier York
www.atelieryork.co.uk
max 2016 sp1, corona 1.3 final, win 8.1. pro

2015-09-03, 14:34:24
Reply #11

arqrenderz

  • Active Users
  • **
  • Posts: 994
  • https://www.behance.net/Arqrenderz1
    • View Profile
    • arqrenderz
The problem with this is that with thin glass the light is completly different, i have a render to show if you want, it becomes 100% brighter

2015-09-03, 14:37:48
Reply #12

atelieryork

  • Active Users
  • **
  • Posts: 283
    • View Profile
    • Atelier York
The problem with this is that with thin glass the light is completly different, i have a render to show if you want, it becomes 100% brighter

Please post your example because in mine there is no difference at all in light levels when you enable thin glass.
Alex York
Atelier York
www.atelieryork.co.uk
max 2016 sp1, corona 1.3 final, win 8.1. pro

2015-09-03, 14:43:44
Reply #13

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 9048
  • Turning coffee to features since 2009
    • View Profile
is it possible you also left "cast shadows" unchecked while switching to thin?
Rendering is magic.How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)

2015-09-03, 14:55:12
Reply #14

agentdark45

  • Active Users
  • **
  • Posts: 579
    • View Profile
Would be great to get this resolved as well as a one-stop solution for how to correctly model / set up the glass material for physically correct windows with refractive glass (vitally important when looking at the window at an angle), especially in scenes with double or triple glazing.

Currently I have issues with thick refractive glass windows slowing down the render and dimming the amount of light in the scene vs fast thin non refractive glass (but this solution is not usable when close-up angled shots of triple glazing is required).
Vray who?