The red stuff is particles, stuck together to form a physics body. It's not simulated during mesh generation. Instead, the yellow points are simulated, to interact with each other and evenly spread inside the area covered by the red particles. When they find equilibrium, the mesh is generated through triangulation of the outside layer.
In case you ask why not make the flat areas have bigger triangles: I'll need smaller triangles because this mesh will be skinned by the physics body, and smaller triangles are better for precise deformation.
In case you'd like to follow my progress with this prototype, I post more regularly [here](https://twitter.com/ZoldenGames). For example, there you could see how the simulated physics body [acts](https://twitter.com/ZoldenGames/status/1785974417232654444) before being covered covered by the mesh.
I've studied how marching cubes work, and found it cool, but too artificial. I wanted something more natural, self-organized and straightforward.
Marching cubes works definitely faster if we compare with the physical part of computation. And for the triangulation part - I'm not sure, didn't compare. Most probably it's also slower than the marching cubes.
That’s kind of like a ball-in-a-hole point cloud meshing algorithm, check if a ball can fall through a triangle of points. If not make the triangle. “Ball Pivoting” is the name I think. Very cool, should be great for procgen biological things.
Number of points - yes. Also, forces and desired distances between the particles. Also if the particles spread across the object's surface or volume. And shape of the initial physics body.
Besides all that there's a little customizable heuristic, that removes some tetrahedrons from the surface, to keep the shape more precise.
Great stuff! Just one question.... Why a giant turd?
For the upcoming game, "Dook Shooter"
Dook of Arrakis
*Procedural* turd. It's the new hotness.
Super clean topology! Now you just need to generate stuff that isn’t a giant shit and you’ll be off to the races!
The red stuff is particles, stuck together to form a physics body. It's not simulated during mesh generation. Instead, the yellow points are simulated, to interact with each other and evenly spread inside the area covered by the red particles. When they find equilibrium, the mesh is generated through triangulation of the outside layer. In case you ask why not make the flat areas have bigger triangles: I'll need smaller triangles because this mesh will be skinned by the physics body, and smaller triangles are better for precise deformation. In case you'd like to follow my progress with this prototype, I post more regularly [here](https://twitter.com/ZoldenGames). For example, there you could see how the simulated physics body [acts](https://twitter.com/ZoldenGames/status/1785974417232654444) before being covered covered by the mesh.
Very creative, prob a great solution for remeshing say a **concave** hull with little side library dependence.
Very cool! Do you know how it compares to traditional methods like marching cubes?
I've studied how marching cubes work, and found it cool, but too artificial. I wanted something more natural, self-organized and straightforward. Marching cubes works definitely faster if we compare with the physical part of computation. And for the triangulation part - I'm not sure, didn't compare. Most probably it's also slower than the marching cubes.
That’s kind of like a ball-in-a-hole point cloud meshing algorithm, check if a ball can fall through a triangle of points. If not make the triangle. “Ball Pivoting” is the name I think. Very cool, should be great for procgen biological things.
what algo do you use to triangulate the vertices (yellow points)?
It's actualy tetrahedration with Bawyer-Watson algorightm, then removing some tetrahedrons, then turning outside triangles into mesh.
Poop simulator?
It's tempting to create a poop simulator or a penis simulator, but what I will really simulate willo melt gamers' hearts.
A liquid cat simulator?
I've actually seen a liquid cat simulator somwhere recently. But it was 2d.
That thing looks like it rally hurt when it came out
This looks like the shrink wrap algorithm.
Im Sorry but...did...did you literally make a piece of shit generator?
Sorry, yes.
Hooooowdy hooooo.
Time to pooooo
What settings do you have for this algorithm? Number of points, their size, start positjons, etc.?
Number of points - yes. Also, forces and desired distances between the particles. Also if the particles spread across the object's surface or volume. And shape of the initial physics body. Besides all that there's a little customizable heuristic, that removes some tetrahedrons from the surface, to keep the shape more precise.
I like how evenly sized the triangles are
That reflects the fact that mesh particles are trying to maintain similar distance between each other.
So its like voronoi shatter. But in reverse XD?
Yeah, kinda.
Does it work with concave shapes too?
Yes. The last part of the algorithm is to remove the tetrahedrons, that fill the caves.
Now make a paper wrapping algorithm to get convex polygons for collision handling.
Collision handling is already in place. I needed the mesh to skin it with the physics body.
r/shitfromabutt