bevyengine / bevyengine/bevy

When loading skinned primitive from gltf the programm crashes

Open
#11,091 2 comments 0 reactions 0 assignees View on GitHub
A-glTF A-Rendering I-Crash
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## Bevy version

0.12.1

## \[Optional\] Relevant system information
```
2023-12-26T11:16:49.945923Z INFO bevy_winit::system: Creating new window "App" (0v0)
2023-12-26T11:16:50.591403Z INFO bevy_render::renderer: AdapterInfo { name: "NVIDIA TITAN Xp", vendor: 4318, device: 6914, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "537.58", backend: Vulkan }
2023-12-26T11:16:51.724808Z INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "Windows 10 Pro", kernel: "19045", cpu: "AMD Ryzen 7 2700X Eight-Core Processor", core_count: "8", memory: "63.9 GiB" }
2023-12-26T11:16:54.858069Z INFO bevy_window::system: No windows are open, exiting
2023-12-26T11:16:54.859490Z INFO bevy_winit::system: Closing window 0v0
```
## What you did

Program crashing when i trying to load primitive with joints and weights attributes.

Im trying to load the PUG gltf file from [Kenney's](https://kenney.nl/assets) (Can be downloaded from https://drive.google.com/drive/folders/1UNNT0MeVX0O04RGgu8aLkKe3fwB9_t-A )

I want to load Mesh0/Primitive0 with Material0. But on load program crash. If i remove joints and weight from primitive, then program works.

```rust
fn setup(
mut commands: Commands,
mut asset_server : Res,) {
commands.spawn(Camera3dBundle::default());

let mesh_handle = asset_server.load("Pug.gltf#Mesh0/Primitive0");
let material_handle = asset_server.load("Pug.gltf#Material0");

commands.spawn((
PbrBundle {
mesh: mesh_handle,
material: material_handle,
..default()
}
));
}
```

## What went wrong

```rust
2023-12-26T11:21:06.501637Z INFO bevy_winit::system: Creating new window "App" (0v0)
2023-12-26T11:21:07.099166Z INFO bevy_render::renderer: AdapterInfo { name: "NVIDIA TITAN Xp", vendor: 4318, device: 6914, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "537.58", backend: Vulkan }
2023-12-26T11:21:08.271808Z INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "Windows 10 Pro", kernel: "19045", cpu: "AMD Ryzen 7 2700X Eight-Core Processor", core_count: "8", memory: "63.9 GiB" }
2023-12-26T11:21:09.345420Z ERROR wgpu::backend::direct: Handling wgpu errors as fatal by default
thread '' panicked at 'wgpu error: Validation Error

Caused by:
In a RenderPass
note: encoder = ``
In a draw command, indexed:true indirect:false
note: render pipeline = `pbr_opaque_mesh_pipeline`
The pipeline layout, associated with the current render pipeline, contains a bind group layout at index 2 which is incompatible with the bind group layout associated with the bind group at
2

', C:\Users\rewin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.17.1\src\backend\direct.rs:3056:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Encountered a panic in exclusive system `bevy_render::renderer::render_system`!
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', C:\Users\rewin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_render-0.12.1\src\pipelined_rendering.rs:145:45
error: process didn't exit successfully: `target\debug\examples\minamal_gltf_test.exe` (exit code: 101)
```

## Additional information
I tried another random files from Kenney's models. All failed.

Primitive from gltf file
```json
"meshes" : [
{
"name" : "Cube.004",
"primitives" : [
{
"attributes" : {
"POSITION" : 0,
"NORMAL" : 1,
"COLOR_0" : 2,
"JOINTS_0" : 3, <-- if i remove this line, program will not crash
"WEIGHTS_0" : 4 <-- if i remove this line, program will not crash
},
"indices" : 5,
"material" : 0
},
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.