Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] Bug Reporting => [Max] Resolved Bugs => Topic started by: ogneed on 2013-09-12, 22:44:15

Title: One glass object with thikness + two glass material = Unexpected result
Post by: ogneed on 2013-09-12, 22:44:15
Hi Keymaster.
I've found unexpected render result in case when i tried use two glass materials with slight different on one model.
Difference between materials this is bump, one material without bump, second with bump.
Here simple example. Models are instances of simple half spherical cups, the walls of cups with thikness.

configuration:
Notebook - Lenovo G770
i3 - 2310M
8Gb RAM
Radeon HD 6650M + Intel HD 3000

Windows 8 pro 64
3ds max 2012 64 and 3ds max 2012 Design 64
Corona Build timestamp: Sep  6 2013 22:03:00
Title: Re: One glass object with thikness + two glass material = Unexpected result
Post by: Ondra on 2013-09-12, 23:34:06
Do I understand it correctly that the green bowl uses both materials with and without bumps? If so, then this is expected result - because there is no way to tell, which side of the material is which, so corona has to assume. And the assumption here is, that if you enter glass through face with one material, you cannot exit it through face with another - even if it is basically the same one, but with bump. So the second face also "enters", not "leaves". So what you have is a scene where there are two glass objects inside each other.

You can either use the same material on both sides of the object (you can for example map the bump map only to one side), or fake it by disabling the attenuation on the inner material.

In future I plan to add a feature to optionally manually specify which material is on which side of the face (w.r.t. surface normal)
Title: Re: One glass object with thikness + two glass material = Unexpected result
Post by: ogneed on 2013-09-13, 01:28:01
Yes, you are correct. Bumped glass assigned to outside surface of 3rd bowl. Inside bowl glass material without bump.

So this fundamental thing with bump?
What about displacement? When i use displacement instead bump in outside material at object - i see same incorrect result. Take a look at attached picture please.

I'm are noob in the rendering algorithms but I was wondered, why if i use one material at all object   special UV mapping, like you offered, result correct. But with couple transparent materials incorrect result(((
Title: Re: One glass object with thikness + two glass material = Unexpected result
Post by: Ondra on 2013-09-13, 01:40:15
it is not just about the bump, it is about using different materials for the two sides. Corona just assumes there is one glass object embedded in another one - so the bowl has glass inside instead of air. You need to keep the bowl a single material.
Title: Re: One glass object with thikness + two glass material = Unexpected result
Post by: ogneed on 2013-09-13, 01:52:57
I see now, so this issue about two materials at one object.