-
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
Intersection creates artifact #11
Comments
I have the same issue. I tried detecting these and removing them by doing an 'island' detection, but when you're doing loads of intersection sooner or later some fail. |
Hi. I am interested in Island detection you mentioned. Can you help me out? |
Well it's been a while, but at the time I did get it partially working. Basically what I did is I selected a vertex and added the 3 vertices that are part of the triangle to a list of discovered vertices. Then for each of those vertices, I searched for another vertex that's in the same position but part of another triangle and add that to the list together with the other two vertices that are part of that triangle. When a vertex is already in the list you do not check its neighboring vertices. Sooner or later there will be no new vertices to check and you've found an island. Then repeat if necessary for a vertex that isn't in the first island or you can just delete all triangles/vertices that aren't in the bigger part, assuming there are at max two islands. Hope this helps! |
Sorry for late reply. I know its weird to ask, but is it possible for you to share your code? I have written a script myself where mesh splitting works, but the game freezes in between while doing splitting operation. I can share my code as well. |
Oh boy. Man, I still have the projects but it's such a mess and it's multiple attempts mixed together. Like honestly, it would probably take you more time to figure out what the code means than to try and implement the crude algorithm I described. If you really want then here are the scripts I made. Good luck! |
Thank you so much for the scripts. |
When I intersect a standard cube and a standard sphere there is an artifact in the corner:
It doesn't matter if I move the objects. The problem also appears if there are no zero-width situations.
The text was updated successfully, but these errors were encountered: