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

GLTF: different rendering when loaded from GLB vs. GLTF/ascii #1396

Closed
inodentry opened this issue Feb 4, 2021 · 5 comments
Closed

GLTF: different rendering when loaded from GLB vs. GLTF/ascii #1396

inodentry opened this issue Feb 4, 2021 · 5 comments
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior

Comments

@inodentry
Copy link
Contributor

I have tested this using several models from the glTF sample models repo, for example WaterBottle.

The same model is available in multiple versions, specifically, an ASCII GLTF file with the textures as external PNG files, and a binary GLB file with everything integrated.

Both of them load and render, but the rendering looks visually different between the two:

From GLTF:

2021-02-04-163031

From GLB:

2021-02-04-163118

@inodentry
Copy link
Contributor Author

Coral model:

GLTF:

2021-02-04-181421

GLB:

2021-02-04-181451

I don't know which is "more correct".

@JonahPlusPlus
Copy link
Contributor

JonahPlusPlus commented Feb 14, 2021

Looks like the lighting is different, but probably something different between the files. I tried this out using a scene I created in blender and exported as GLB and GLTF and found no difference. (First image is GLTF, second is GLB (I think? I can't tell them apart)) Doesn't seem like an issue with Bevy.
image
image

@JonahPlusPlus
Copy link
Contributor

It could also be an issue with whatever you did to get the GLTF file to run. I couldn't because it said that Jpegs aren't supported by Bevy. If you converted the textures to a different format, it could have had some affect on the color. It would be good if you explained what you did and uploaded some code.

@JonahPlusPlus
Copy link
Contributor

Nevermind, I see that it is a feature flag that I hadn't enabled.

@JonahPlusPlus
Copy link
Contributor

Ok, got both versions to work and got your problem with the coral model. Since the same setup works still with my Suzanne files, it must just be the textures differ in the coral files, since it can't be lighting since Bevy doesn't support lights from GLTF/GLB files.

@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior A-Rendering Drawing game state to the screen labels Feb 16, 2021
@bors bors bot closed this as completed in 1fcafc4 Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants