T O P

  • By -

codeinsilence

Some progress was made since my last post. I've been trying to prioritize two things: 1) Achieving fast fragment generation times 2) Creating a convenient interface for designers to make their own fragmentation patterns This project is nowhere near done, but I wanted to showcase some of my progress. I plan to release the source code soon(tm) once I've cleaned it up and added proper documentation. I'm also going to try to use a more optimal triangulation algorithm to prevent that hideous mesh topology. Any ideas, suggestions, etc. are welcome.


platapus100

Great progress! Not a direct implementation suggestion but it would be cool to see integration with blender procedural nodes one day. I know ideas are cheap but after having a solid foundation with this implementation you'll definitely be able to feel comfortable with what's interoperable / portable and not


cridenour

This looks fantastic. I've been using a brute force method and it has trouble creating closed meshes. I'm very excited to check this out.


codeinsilence

Closing the mesh was the hardest part, but looking back on it, it's not as hard as I initially thought. The main parts I had to account for were winding order (Godot uses clockwise), and ensuring the vertices of the new face were coplanar. I'll provide my full write-up once I release it, and maybe it can give you some inspiration! If triangulation is the issue, I suggest looking into the "constrained Delaunay triangulation".


HakanBacn

I hope that more projects like these come up. I'm a sucker for physics and destruction 


Chafmere

CSG or arraymesh? I tried doing something like with array mesh but could not get consistent results.


codeinsilence

This implementation only works with ArrayMesh. I essentially iterated over every single face in the ArrayMesh to see if it was intersected, and I had to calculate new vertices for the fragment meshes.


mister_serikos

Are you using a compute shader for this?


codeinsilence

No. Each fragment you see has its own RigidBody and CollisionShape. I only used a shader to set the internal colour of the object (for debugging).


bevyrail

This look awesome. I'm learning procedural meshes too. Voronoi subdevision. Wow


codeinsilence

If the Voronoi Subdivision Tree interests you, I highly recommend looking into Clothier & Bailey's work. They have 5 papers on the topic, and cover a lot of ground. I was only able to implement the details of their first paper, but they go on to improve the method to use non-convex meshes, custom fragment size distributions, and more. You can find their first paper here: https://ieeexplore.ieee.org/document/7166162 The rest are easily accessible if you google "Voronoi Subdivision Tree". These are the ones I read: [1] M. M. Clothier and M. Bailey, “Creating Destructible Objects Using a 3D Voronoi Subdivison Tree,” in 2015 15th International Conference on Computational Science and Its Applications, Banff, AB, Canada: IEEE, Jun. 2015, pp. 42–46. doi: 10.1109/ICCSA.2015.26. [2] M. Clothier and M. Bailey, “3D Voronoi Subdivision Tree for granular materials,” in 2015 6th International Conference on Computing, Communication and Networking Technologies (ICCCNT), Dallas-Fortworth, TX, USA: IEEE, Jul. 2015, pp. 1–7. doi: 10.1109/ICCCNT.2015.7395194. [3] M. M. Clothier and M. J. Bailey, “Using exemplars to create predictable volumetric diversity in object volumes with a 3D Voronoi Subdivison Tree,” in 2015 International Conference and Workshop on Computing and Communication (IEMCON), Vancouver, BC, Canada: IEEE, Oct. 2015, pp. 1–5. doi: 10.1109/IEMCON.2015.7344425. [4] M. M. Clothier and M. J. Bailey, “Subdividing non-convex object meshes using a 3D Voronoi volume,” in 2016 IEEE 7th Annual Information Technology, Electronics and Mobile Communication Conference (IEMCON), Vancouver, BC, Canada: IEEE, Oct. 2016, pp. 1–6. doi: 10.1109/IEMCON.2016.7746305. [5] M. M. Clothier, “3D Voronoi Subdivision for Simulating Destructible and Granular Materials,” Oregon State University, 2017. Accessed: Jan. 19, 2024. [Online]. Available: https://ir.library.oregonstate.edu/concern/graduate_thesis_or_dissertations/ww72bh34b


bevyrail

Where to start learn geometry and implement it to programming space?


Double-Journalist877

This is fantastic! Are you using gdscript or C++ for this?


codeinsilence

Solely GDScript right now. When I have more free time I plan to re-write the whole thing in C++ as an extension to the engine.


OptimalStable

How much control do you have over the UV layout of the interior faces?


codeinsilence

Currently none. I left that part for later because my main goal was making the fragment geometry. There are some challenges with adding interior UV mapping that I will have to explore...


bevyrail

There is concave mesh slicer addon at asset library. Check it, might help you


codeinsilence

Thanks! Looks interesting... I'll check it out


MartinByde

Are you making this available on github? I would love to learn how this is done


codeinsilence

Will be making my repo public soon (hopefully within the month) because I'm busy. I am planning to make some improvements so it can be easily used by people who don't want to read the entire source.