Optimizing concave polygons (3D)

Godot Version



My goal is to set up a process for generating fairly accurate collision shapes for custom Sprite3Ds (for mouse detection). So far I’ve more or less solved it: I’ve found an amazing plugin for generating meshes from sprites, although it is fairly slow - so I run it in the editor, export the meshes, and then convert them to ConcavePolygon3Ds at runtime using create_trimesh_shape(). However, this feels like an overly complicated process - it beats manually drawing the shapes (since I want my process to work regardless of specific sprites), but since I’m preparing stuff in advance anyway, I might as well skip the conversions and export the collision shapes. Especially since I end up with a 500KB mesh for a 50KB sprite; for a thing that is supposed to be just an array of coordinates, something definitely isn’t right. Is there a better semi-automatic way of generating those polygons? Not necessarily in Godot itself, I’m down to using Blender or whatever - although in that case I’d appreciate some keywords to investigate because I’m only learning the basics of 3D.