Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

from_bevy_mesh doesn't support unindexed glTF #490

Open
rlidwka opened this issue Apr 1, 2024 · 0 comments · May be fixed by #491
Open

from_bevy_mesh doesn't support unindexed glTF #490

rlidwka opened this issue Apr 1, 2024 · 0 comments · May be fixed by #491

Comments

@rlidwka
Copy link

rlidwka commented Apr 1, 2024

fn extract_mesh_vertices_indices(mesh: &Mesh) -> Option<(Vec<na::Point3<Real>>, Vec<[u32; 3]>)> {
use rapier::na::point;
let vertices = mesh.attribute(Mesh::ATTRIBUTE_POSITION)?;
let indices = mesh.indices()?;

If mesh.indices() doesn't exist, function returns None.

Turns out, indices can be absent from glTF, and the file will still be valid. In this case, bevy Mesh wouldn't have any indices either (but bevy would display it just fine). You can search the internet by keywords "unindexed mesh gltf", and it's full of bug reports about lack of support from various projects...

I'm using osm2world, and it turns out that it generates unindexed meshes, so... Any ideas how to implement it?

rlidwka added a commit to rlidwka/bevy_rapier that referenced this issue Apr 2, 2024
rlidwka added a commit to rlidwka/bevy_rapier that referenced this issue May 11, 2024
rlidwka added a commit to rlidwka/bevy_rapier that referenced this issue Jul 15, 2024
rlidwka added a commit to rlidwka/bevy_rapier that referenced this issue Jul 15, 2024
rlidwka added a commit to rlidwka/bevy_rapier that referenced this issue Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants