nice
Inkwalker
13
Posts
76
Followers
16
Following
A member registered Feb 23, 2014 · View creator page →
Creator of
Idle game where you run a shop in a typical roguelike dungeon.
Simulation
Play in browser
Recent community posts
Sure.
- Get all external edges of your mesh.
- Find all intersection points with the cutting line.
- Split vertices into two sets divided by the cutting line.
- Add intersection point to both sets.
- Use the gift wrapping algorithm to find new edges.
- Use any meshing algorithm to generate new geometry.
- Create new sprites with that geometry.
There is also an edge case where the cutting line directly hits a vertex. You need to handle that. Also it is a good idea to force minimum length of sprite edges otherwise it can produce nasty meshes.
This algorithm only works for convex meshes and full cuts. For concave geometry it's a lot more complicated.
Colors, Potions and Cats comments · Replied to ADumbInternetgirl in Colors, Potions and Cats comments