bevyengine / bevyengine/bevy

Need to manually set thickness property when importing gltf scene

Open
#10,931 5 comments 0 reactions 0 assignees View on GitHub
A-Assets C-Bug S-Needs-Investigation
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## Bevy version

0.12.1

## What you did

1. Create new principled BSDF material in Blender
2. Set transmission close to 1
3. Set IOR to something other than 1 to get some refraction going
4. Export gltf
5. Load the scene in Bevy using the following code:
```rust
commands.spawn(SceneBundle {
scene: asset_server.load("scene.glb#Scene0"),
..default()
});
```

## What went wrong

No refraction is seen when the scene is loaded in the Bevy app. Need to manually set the `thickness` property of the StandardMaterial to achieve a similar look to the Eevee renderer in Blender. The StandardMaterial documentation does not seem to include how to approach this exactly. But ideally it would work out of the box.

![transmission](https://github.com/bevyengine/bevy/assets/23659539/5186cc4f-422d-44da-8f9a-43e8915a0e7a)

## Additional information

Let me know if a reproducer would help, wanted to post first in case I just missed some export setting in Blender.

Contributor guide

Open the contributing guide

Research direction

Start with the reported Blender-to-glTF workflow, the SceneBundle loading example, and StandardMaterial's transmission, IOR, and thickness documentation. Reproduce the scene in Bevy 0.12.1 and compare the imported material with the Blender Eevee result; done means the imported scene provides the expected refraction without manually setting thickness, or the required export limitation is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.