Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate vertex artifact #36

Open
QuantumEntangledAndy opened this issue Jan 20, 2021 · 1 comment
Open

Duplicate vertex artifact #36

QuantumEntangledAndy opened this issue Jan 20, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@QuantumEntangledAndy
Copy link
Contributor

mostly copied form the discussion in #34

This is another issue with unnecessarily duplicated vertices which causes this artifact:

Screenshot 2021-01-19 at 18 10 12

There are two verticies at this point:

Screenshot 2021-01-19 at 18 10 32

It seems the deduplication step of the meshing algorithm is not tolerant enough

I think it is caused here, which I was thinking of when I wrote this part:

cx - sx * (1. + EPSILON),
cy - sy * (1. + EPSILON),
cz - sz * (1. + EPSILON),
  • When checking for duplicates sx = 1e-5
  • sx * (1. + EPSILON) = 1e-5*( 1+1e-5) = 1.00001e-05 which is 6sf so it is fine`
  • cx is the coordinate center which could be anything lets say 123.0
  • cx + 1.00001e-05 = 123.0 + 1.00001e-05 = 123.00001 Which is 8 sf too many sf for f32
  • Truncating previous to 6sf we get 123.000 which is equivalent boundary size of 0.
  • Which means if there is any rounding error in the coordinate it won't be treated as duplicate
@QuantumEntangledAndy QuantumEntangledAndy changed the title Duplicate verticie artifact Duplicate vertex artifact Jan 20, 2021
@norman784
Copy link
Owner

This artifact happens in amethyst too or just blender?

Also I want to work tomorrow in merging #35, so if you can wait until this PR lands before submitting new ones.

@norman784 norman784 added the bug Something isn't working label Jan 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants