Corona Renderer Forum

General Category => Feature requests => Resolved feature requests => Topic started by: peakyfreak80 on 2019-01-10, 15:44:51

Title: Distance Map Inside Color issue
Post by: peakyfreak80 on 2019-01-10, 15:44:51
There seems to be a problem when using overlapping geometry and the CoronaDistance Map.  Where it overlaps, you get triangles of the "far" color.  Could anyone help with figuring out why this is happening and if there's a solution?

Images attached of the viewport geometry, settings, and the rendering.
Title: Re: Distance Map Inside Color issue
Post by: pokoy on 2019-01-10, 15:54:17
Sometimes, adding a chamfer modifier to the distance object helps with similar problems in the Distance Map. I've seen problems that were caused by overlapping meshes that I couldn't resolve, though. You may have to remodel overlapping objects to be one continuous geometry (or use boolean), this should help.

The Distance Map has a number of issues, this is only one of them. I'm planning to post an extensive problems/request thread about this map with the intention to get our beloved developers to make it more robust and flexible but didn't have the time to do so. Hopefully soon.
Title: Re: Distance Map Inside Color issue
Post by: peakyfreak80 on 2019-01-10, 16:03:55
Thanks, Pokoy.  I'll try the chamfer trick.  Unfortunately, the real geo I'm using is all procedural (a.k.a Railclone) so turning it into one piece of booleaned geometry wouldn't really be possible.
Title: Re: Distance Map Inside Color issue
Post by: pokoy on 2019-01-10, 17:18:36
Yeah, it's really frustrating. The Distance Map is a godsend when (ab)using it for road marks, unfortunately it's one of the cases where it reliably fails... Hope it can be fixed.
Title: Re: Distance Map Inside Color issue
Post by: peakyfreak80 on 2019-01-16, 21:49:08
So I wasn't able to really 'solve' this problem and had to come up with a work around.  It does appear that it only happens when you have the "Inside Color" checked.  with that unchecked, anything that overlaps works exactly how you'd expect it to. Seems like a bug in the shader.
Title: Re: Distance Map Inside Color issue
Post by: Alexandre Besson on 2019-01-17, 12:27:35
+1
Title: Re: Distance Map Inside Color issue
Post by: PROH on 2019-01-17, 13:37:36
+1
Title: Re: Distance Map Inside Color issue
Post by: Frood on 2019-01-17, 13:39:25
"Distance map issues" is on my most wanted fix/improvement list, so +1 :)


Good Luck


Title: Re: Distance Map Inside Color issue
Post by: maru on 2019-01-18, 09:43:12
This is due to the imperfection of current inside detection method. We will do our best to improve it, but it may take a lot of time.
(internal note id=309726115)
Title: Re: Distance Map Inside Color issue
Post by: maru on 2019-04-04, 09:46:00
Improved in the newest daily!
Some further improvements possible.
Title: Re: Distance Map Inside Color issue
Post by: Aaron Quinn on 2019-10-10, 15:05:15
Just checking in, I have been following this issue for quite a while now.

Wanted to notify that this problem is still apparent in Corona 4.
Title: Re: Distance Map Inside Color issue
Post by: TomG on 2019-10-10, 15:07:25
How about in the newest daily of Corona 5, as Marcin mentioned?
Title: Re: Distance Map Inside Color issue
Post by: iancpotteer on 2020-04-15, 07:37:05
Not sure if anyone is still having this issue but..I am...until I found I could just grab the distance texture shader from VRAY - it doesnt have whatever bug the corona one has. Yep - using the VRAY distance map in corona seems to work without the overlap issue.
Title: Re: Distance Map Inside Color issue
Post by: iancpotteer on 2020-04-15, 07:38:57
As a side note...VRAY distance map used to have this same issue and it was resolved a few versions ago. (Prior to VRAY next) Maybe you can as them what they did ? :P