Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] Bug Reporting => [Max] Resolved Bugs => Topic started by: Alessandro on 2015-05-29, 12:24:17

Title: Bump map and smooth surface
Post by: Alessandro on 2015-05-29, 12:24:17
I find this problem, also with new corona map, using last build (2015/05/28), don't know with previous.
The scene is too simple, middle gray background and corona sun.
Is it me or it's a bug?
Title: Re: Bump map and smooth surface
Post by: romullus on 2015-05-29, 12:30:14
Can be shadow terminator problem.
Title: Re: Bump map and smooth surface
Post by: maru on 2015-05-29, 12:35:21
Yes, it looks like the old terminator. It will always be more apparent when using bump/normal maps.
Title: Re: Bump map and smooth surface
Post by: Alessandro on 2015-05-29, 12:41:52
(http://cdn.hitfix.com/photos/5869549/Terminator-Genisys-motion-poster_article_story_large.jpg)

Btw, any solution? Otherwise I'll public in Mantis...
thx
Title: Re: Bump map and smooth surface
Post by: romullus on 2015-05-29, 12:43:39
https://coronarenderer.freshdesk.com/support/solutions/articles/5000516258-objects-in-my-rendering-are-not-smooth-faceted-and-i-can-see-shadows-of-polygons-
Title: Re: Bump map and smooth surface
Post by: Alessandro on 2015-05-29, 12:51:17
No, also with 200 subdivisions it does not smooth the shadow, it just move the place of the light limit.
I attach the scene if you want to play ;)
Title: Re: Bump map and smooth surface
Post by: maru on 2015-05-29, 13:14:03
Stronger bump would always intensify this effect. I don't know what's the magic behind this. Ondra could surely explain the technical reason.
Title: Re: Bump map and smooth surface
Post by: pokoy on 2015-05-29, 14:04:24
Oh how I would love to see this resolved, thanks for bringing this one up. There's clearly a limit how much bump you can use on curved surfaces and I constantly run into this issue when using strong bump. Bump looks really nice in Corona so having this issue resolved would be great.
Title: Re: Bump map and smooth surface
Post by: Ondra on 2015-05-30, 01:15:41
Stronger bump would always intensify this effect. I don't know what's the magic behind this. Ondra could surely explain the technical reason.

Everything with geometry normal facing away from sun will NOT get any lighting because shadow ray would be generated under the surface, travelling through the cylinder object and hitting its backface when resurfacing.
Everything with geometry normal facing towards sun can get lighting. BUT the amount of lighting is dependent solely on shading normal. If it would be dependent on geometry normal, the bump map would have no effect, because it can only modify shading normals.

So: lighting amount depends only on shading normal. Geometry normal only has on/off effect. So there is sharp jump where geometry normal cuts off all lighting. Without the bump mapping, shading and geometry normals are almost identical, so the "amount" and "on/off" effect work together as they are supposed to.
Title: Re: Bump map and smooth surface
Post by: Ludvik Koutny on 2015-06-09, 14:58:41
Known limitation logged on mantis: https://corona-renderer.com/bugs/view.php?id=1043

Archiving to resolved.
Title: Re: Bump map and smooth surface
Post by: Alessandro on 2015-06-09, 16:00:00
Stronger bump would always intensify this effect. I don't know what's the magic behind this. Ondra could surely explain the technical reason.

Everything with geometry normal facing away from sun will NOT get any lighting because shadow ray would be generated under the surface, travelling through the cylinder object and hitting its backface when resurfacing.
Everything with geometry normal facing towards sun can get lighting. BUT the amount of lighting is dependent solely on shading normal. If it would be dependent on geometry normal, the bump map would have no effect, because it can only modify shading normals.

So: lighting amount depends only on shading normal. Geometry normal only has on/off effect. So there is sharp jump where geometry normal cuts off all lighting. Without the bump mapping, shading and geometry normals are almost identical, so the "amount" and "on/off" effect work together as they are supposed to.

Well, that's a great technical description of who it works. It can be good to understand, but it cant be an answer to a problem. Don't be afraid for this, but one thing is to understand who the software works, one other thing is to work with the software ;)
I can be happy to have your technical description, but if it does not solve the problem I think we can't name it as a "Resolved bug".
I have had some discussion (very interesting technical discussion) with Master Zap about some Mental Ray artifacts, he always have given me amazing technical reason for this, but no practical solutions. One of the reason why I choose Corona is about it's way to solve a lot of situations in a very easy and "natural" way. So, please, with a lot of respect for you, don't give me a technical reason for a defect, give me a solution ;)

Btw, without bump it works good. With bump it works good in surface with no bump effect, but it works wrong (sharp) in bump effect, as you can easily see it on the bottom of the cylinder. If it is known limitation, I'll wait for a solution. If it's me, happy if you will correct and teach me the right way ;)

best regards,
alessandro

Edit: sorry to have this late to give this answer, I've lost your one...
Title: Re: Bump map and smooth surface
Post by: romullus on 2015-06-09, 16:09:06
Currently the only solution is subdivide your mesh, AFAIK. Yes, i'm aware that's not always possible, but we have to live with it.

As for your example, such prominent effect better be done with displacement anyway.
Title: Re: Bump map and smooth surface
Post by: Alessandro on 2015-06-09, 18:06:41
Currently the only solution is subdivide your mesh, AFAIK. Yes, i'm aware that's not always possible, but we have to live with it.

As for your example, such prominent effect better be done with displacement anyway.
The cylinder has 200 segments, and this not solve anything. I agree that for a so strong bump is better to use a displace.
I also agree we can live quite fine also with this ;)