-
Notifications
You must be signed in to change notification settings - Fork 100
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
Axis-aligned surfaces problem mentioned in util.h #48
Comments
Interesting, looking into this. If I can get rid of the hacky little epsilon perturbation, would be nice. |
@conceptclear this doesn't fix the problem unfortunately. I added this, and removed the ugly fix in util.h - the problem returns. Tried it on the problematic model from issue #7 and it still has holes along the edges. |
I have tried this on my own computer and it could solve the problem as shown below: |
Could you make a PR with the exact changes? |
OK, I have made a PR to dev |
Here's the problem model. |
Hi,@Forceflow
I have found the reason which caused the problem that you mentioned in util.h.
In cpu_voxelizer.cpp Line 133 to Line 135
and voxelize.cu Line 131 to Line 133
The positions of z and x in these lines of code are wrong.
The modified code could be
float d_xz_e0 = (-1.0f * glm::dot(n_zx_e0, glm::vec2(v0.z, v0.x))) + glm::max(0.0f, info.unit.z * n_zx_e0[0]) + glm::max(0.0f, info.unit.x * n_zx_e0[1]);
float d_xz_e1 = (-1.0f * glm::dot(n_zx_e1, glm::vec2(v1.z, v1.x))) + glm::max(0.0f, info.unit.z * n_zx_e1[0]) + glm::max(0.0f, info.unit.x * n_zx_e1[1]);
float d_xz_e2 = (-1.0f * glm::dot(n_zx_e2, glm::vec2(v2.z, v2.x))) + glm::max(0.0f, info.unit.z * n_zx_e2[0]) + glm::max(0.0f, info.unit.x * n_zx_e2[1]);
After modifying these codes, the problems mentioned in #7 should not happen again :)
The text was updated successfully, but these errors were encountered: