Closed GoomiiV2 closed 2 years ago
Partial fix in 543ae37aca32d37f74a3c7581b4df80cde6a6e7e
The T-Junction fixer still needs to set the right uvs and look more in to stopping it creating degenerate tris.
Fixed with a second attempt but with a winged mesh data structure and more thought for the t-junction algo.
This one handles many more edge cases, its still can be improved and I'd like to try later but for now this seems to be working quite damm well :D (quote me with this when it breaks :<)
a9f946d3ba5682d76b5e7c266553f187467a48d5
Realtime CSG can produce invalid sealed world meshes some times, this is mostly from it creating T-Junctions in the output mesh. So i need a way to decent and fix those.
A T-Junction is when a vert sits on an edge but isn't connected (there can be a gap, but the output from RCSG doesn't really have those).![image](https://user-images.githubusercontent.com/5684215/142497799-9c162d25-683e-4cde-ad9f-7a22da650624.png)
So a rough way for me to fix this would be.
To make this fast I'd want to convert the Unity mesh into a half edge structure and then do the processing on that before converting and exporting.
Notes: Simplgon has the ability to do this it seems: https://documentation.simplygon.com/SimplygonSDK_9.1.225.0/api/tools/tjunctionremover.html They have a free tier, but seems its remote processing with limits so not a good fit for this :<
An example of the problem and needed fix:![T-Junction Example](https://user-images.githubusercontent.com/5684215/142779517-fc0e0c44-b8af-4ac5-9bbe-f83e8b6d285d.png)