gd-3d / bless

blender level editor software suite
MIT License
22 stars 2 forks source link

godot: convex shapes are sometimes incorrect when using blenders mesh #44

Open yankscally opened 3 months ago

yankscally commented 3 months ago

There are extra triangles sometimes generated with the mesh.

Some faces on the collision shape have "missing" or bugged collisions where there seems to be an extra vertex making a cross over an existing face.

Previously, I would save a lot of data in the gltf by recycling the mesh, and surely this mesh should generate a convex mesh quite fine as its using the same vertexes.

it could be one of these reasons:

1) Godot is adding the extra vertex, as a bug.

2) The blender mesh is not suitable for a collision shape, maybe the vertexes are being generated in some incorrect order, leading to an extra vertex to try and "fill" the shape (basically not godot's fault)

3) The BoxShape character controller I'm using for tests possibly might have issues against this kind of shape.

~4) The mesh is somehow incorrect because I did something wrong with the file and it can be fixed in blender.~

yankscally commented 3 months ago

https://github.com/godotengine/godot/issues/95690

I need to provide a MRP / .gltf example

still have no idea about this, but I'm leaning more towards blenders shapes being "incorrect" for convex shapes. possibly to do with vertex clockwise vs counter clockwise ordering? will have to test more.

yankscally commented 3 weeks ago

it seems like blender is making funky shapes when using the convex hull geometry node. more testing needed.