Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Studio Chat / [SOLVED] Is there a way to merge two mesh then the edges between two mesh to be eliminated?

Years of Service
User Offline
Joined: 16th Apr 2020
Posted: 24th Dec 2020 08:22 Edited at: 24th Dec 2020 08:24
For example, I have two models with very similar color and texture.
When I simple combine two models by setting setobjectposition, the edges between them are very obvisous.
How could I eliminate these edges?

The author of this post has marked a post as an answer.

Go to answer

Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 25th Dec 2020 01:51
This post has been marked by the post author as the answer.
The issue is that the Vertices along the adjoining Edge(s) aren't actually in the same Position., thus when Floating Point Rounding or even Triangle Rasterisation occurs; there is going to be a variance generated.
Now as a further note, there might not actually be a way to "Fully" Resolve this issue.

What I mean is that AppGameKit has a habit of using a Medium Floating Point Precision (FP16) as a "Performance" Improvement., this in-turn *WILL* result in Floating Point Rounding Errors., even when it comes to Rasterisation.
In essence you have a more subtle but ever present "PlayStation" Style Rendering Bug., because it lacks the precision to put the Vertices in the correct places to eliminate seams between edges of DIFFERENT objects.
Why doesn't this happen with the SAME object? Well, it's because it's reusing existing Vertex Data.

Oh and as a note., this issue becomes even more obvious the LOWER the Output Resolution.

One Solution is to create a Custom "Default" Shader., which switches to Highp Float instead of Mediump Float ... this will noticeably reduce seams.

Another is to increase the Units, by say a Factor of 100 ... essentially you want it so that you're never using Values between Vertices < 1.0... this will (mostly) eliminate Rounding Errors from Floating Point Precision as it's not longer relying on the calculated Exponent Result.

Still beyond that, you might just have to accept it's an artefact of the AppGameKit Engine.

Login to post a reply

Server time is: 2021-09-19 21:40:56
Your offset time is: 2021-09-19 21:40:56