سؤال

I am creating this puzzle thing, which generates puzzle pieces at runtime (i generate verts, make them into meshes, and texture them all at runtime)

Since i now got a complete puzzle, and after confirming that verts are EXACTLY lined up, i get these tiny tiny black dots when i view my puzzle. They are however nowhere to be seen when you zoom in on them.

Example

I suspect this is just a floating point error. If that is the case, I have no idea how to fix it. Any input on this subject is greatly appreciated.

Thanks in advance, Smiley

هل كانت مفيدة؟

المحلول

Stitch the vertices together and use UV mapping to compose your puzzle mesh. That way you will not have this visual artifact.

It's a rendering artifact not a floating point error. You often see this sort of thing when say two wall pieces that are, seemingly, perfectly aligned still show a tiny (pixel wide) gap.

Another way to solve this would be to overlap the puzzle pieces a little bit. Of course you must also take z order into account.

Hope this helps.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top