Author Topic: refractive/non-refractive intersection (contact line) bug  (Read 1316 times)

2024-08-28, 11:44:37

v.p.vlasenko

  • Active Users
  • **
  • Posts: 90
    • View Profile
It's an old problem, I reported it years ago, but it is still not fixed - black contact line between "water" and "ground"

render and scene attached




2024-08-28, 14:55:11
Reply #1

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9088
  • Let's move this topic, shall we?
    • View Profile
    • My Models
There's no need to report the same issue multiple times, if you want to bump up your old report, please do post reply in original topic.

Duplicate: https://forum.corona-renderer.com/index.php?topic=33864.0
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2024-08-28, 15:23:51
Reply #2

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13153
  • Marcin
    • View Profile
Hmm, you reported the same thing in the past and confirmed that the fix worked:
"At least one of those objects was heavily scaled. Applying "reset xform" to both the sea and the object fixes the issue immediately."
https://forum.corona-renderer.com/index.php?topic=33864.msg188386#msg188386
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2024-08-29, 08:09:50
Reply #3

v.p.vlasenko

  • Active Users
  • **
  • Posts: 90
    • View Profile
Sorry guys, my answer was misleading, but no - I didn't confirmed it.There was no opportunity to check at that moment, so it's more like - ok, I'll check later. My fault.

It's not fixed yet.

2024-08-29, 14:11:50
Reply #4

TomG

  • Administrator
  • Active Users
  • *****
  • Posts: 5858
    • View Profile
I can replicate it here, and tried various things such as geometry optimizers, retopology, reset xforms, redoing normals, subdividing terrain, subdividing water plane, making the water plane smaller,  etc. Some of which reduces the effect but doesn't remove it. So far my best guess is it is related to how these planes are ALMOST but NOT QUITE coplanar, due to the low angle of incidence between them (if you scale up the landscape so that all the features are "taller" then the unwanted effect goes away, and sometimes you can see a bit of z fighting flicker in the viewport with clay mode on with the scene as it is). Could be wrong though.
Tom Grimes | chaos-corona.com
Product Manager | contact us

2024-08-29, 14:42:27
Reply #5

v.p.vlasenko

  • Active Users
  • **
  • Posts: 90
    • View Profile
Quote
So far my best guess is it is related to how these planes are ALMOST but NOT QUITE coplanar, due to the low angle of incidence between them
The effect is quite exaggerated now, I did that intentionally.

But it exists almost always. Attached image - same scene with 3x higher landscape and enabled displacement for water. The black edge is less visible but still there.

2024-09-19, 11:20:36
Reply #6

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13153
  • Marcin
    • View Profile
I was able to reproduce it and I couldn't find a solution to fix it. It is now logged for the devs at (Report ID=CMAX-1271).
It seems to be some kind of precision issue. If you select all scene objects and move them farther away from the scene origin, it becomes even worse. This is strange because Corona is using an internal coordinate system so in theory the position of the objects relative to the world origin should not matter.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2024-10-14, 10:25:48
Reply #7

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13153
  • Marcin
    • View Profile
This is confirmed as a precision issue. It appears if low-poly meshes are intersecting. Adding tessellation to the meshes improves the situation (modifiers like tessellate, mesh smooth, subdivide).
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2024-10-28, 10:51:31
Reply #8

v.p.vlasenko

  • Active Users
  • **
  • Posts: 90
    • View Profile
Quote
Adding tessellation to the meshes improves the situation
- is it a temporary workaround? Or there is no solution and that should be used as a fix?

The original mesh is quite high resolution, as I remember it is around 1M polys. Making it 5,10 or 20M isn't an good option.

And as I said before
Quote
The effect is quite exaggerated now, I did that intentionally.

But it exists almost always. Attached image - same scene with 3x higher landscape and enabled displacement for water. The black edge is less visible but still there.

Even with displacement it is still there. Adding displacement for water is actually ok, but adding displacement for beach sand for aerial shots just to overcome problems looks strange.

2024-10-28, 16:48:10
Reply #9

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13153
  • Marcin
    • View Profile
Quote
Adding tessellation to the meshes improves the situation

- is it a temporary workaround? Or there is no solution and that should be used as a fix?

I would say it's a temporary workaround, but the best one we know so far. Hopefully we can improve this behavior in the future.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us