Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] Bug Reporting => [Max] Resolved Bugs => Topic started by: romullus on 2015-02-14, 15:25:38

Title: CoronaAO issues
Post by: romullus on 2015-02-14, 15:25:38
What can cause such CoronaAO artefacts and how to fight them? Further subdivision of mesh doesn't help - triangles simply get smaller. Reseting x-form or normals doesn't has any effect.
Title: Re: CoronaAO issues
Post by: Ondra on 2015-02-14, 15:30:12
are normals ok? Show the normals discrepancy render pass and AO settings. Are you using extreme AO spread values?
Title: Re: CoronaAO issues
Post by: romullus on 2015-02-14, 16:43:58
No, nothing extreme. "Normals discrepancy mask" - cannot find such in RE. Could you poke more specifically, please.
Title: Re: CoronaAO issues
Post by: Ondra on 2015-02-14, 17:20:48
maybe the element is not shown in non-debug versions. Try using the normals and dotproductshading elements instead
Title: Re: CoronaAO issues
Post by: romullus on 2015-02-14, 17:55:37
Here it is, AO settings and some render elements. I hope i managed to pick the right ones - those RE is still like a chinese arithmetics to me.
Title: Re: CoronaAO issues
Post by: Ondra on 2015-02-14, 21:49:18
The Z direction offset is almost surely causing the problem
Title: Re: CoronaAO issues
Post by: romullus on 2015-02-15, 11:30:27
I can easily get those triangles without directional offsets.
Will try to play with other models and see if it's general behaviour or just this model specific.
Title: Re: CoronaAO issues
Post by: romullus on 2015-02-15, 12:13:31
Looks like it has nothing to do with this model. I get same errors even with teapot primitive.
Tried to get something similar with Menta Ray, but without luck - its AO behaves more predictable. I think i'll move it to bug section.
Title: Re: CoronaAO issues
Post by: Ondra on 2015-02-15, 12:16:37
in that case give me scene ;)
Title: Re: CoronaAO issues
Post by: romullus on 2015-02-15, 12:54:50
Sure.
1424001254_AO_issue_02-15.7z
Title: Re: CoronaAO issues
Post by: Ondra on 2015-02-15, 17:09:13
ok, I took a look at the scene and the problem is caused by the object's geometry. It is actually concave, leading to self-shadowing (made visible due to big color spread value). It is tricky to see, since the non-convex objects are the individual quads.

This is one of the problematic polygons. I created a lines connecting its opposing pairs of vertices:
(http://i.imgur.com/ini54o3.jpg)

This is the same polygon from angle - you can see it is concave:
(http://i.imgur.com/Nk1qIJI.png)

This is the render with default non-convex tesselation:
(http://i.imgur.com/uorTo55.png)

And here I manually change the tesselation of the quad to produce convex result:
(http://i.imgur.com/rAyOOwW.png)
Title: Re: CoronaAO issues
Post by: romullus on 2015-02-15, 18:30:30
Oh, i see. Now i was able to reproduce it with MR and Vray demo too. But still, it looks like Corona is somehow more sensitive to these artefacts.

Curious if there's a medicine for this. I tried to manually turn those edges, but looks like it lost job - if one face gets better, other turns worse. Automatic retriangulate didn't work neither.
Title: Re: CoronaAO issues
Post by: Ondra on 2015-02-15, 20:20:39
I can easily imagine a script that would do it. But I dont know if anyone made it
Title: Re: CoronaAO issues
Post by: romullus on 2015-02-16, 11:25:58
Just a thought: if there were Min distance spinner in CoronaAO map, could it help in such situations?
Title: Re: CoronaAO issues
Post by: Ondra on 2015-02-16, 12:04:11
yes, but it would create more artifacts than it would prevent
Title: Re: CoronaAO issues
Post by: Ludvik Koutny on 2015-02-16, 13:16:35
CoronaAO has by default a bit wider sampling angle spread than other renderers. Therefore, it picks up even very wide-angled concave areas. You can easily prevent that by tweaking directionality parameter :)