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 objects are sometimes all blue or colored red #39

Open
lights0123 opened this issue Apr 24, 2021 · 7 comments
Open

GLTF objects are sometimes all blue or colored red #39

lights0123 opened this issue Apr 24, 2021 · 7 comments

Comments

@lights0123
Copy link

I'm still working on getting my game published, so I'll either get a link to you in an hour or tomorrow. I load three different GLTF files, which you can get here: assets.zip. The file ship.glb should look like this:
Screenshot from 2021-04-23 22-49-21
However, sometimes, it will appear completely blue:
Screenshot from 2021-04-23 22-49-36
And sometimes, colored red:
Screenshot from 2021-04-23 22-49-27

It's pretty much a guessing game as to which will happen.

When this happens, the files ship.glb and Itokawa_1_1.glb (which both have images as their textures) have the same appearance, but cube.glb (which has a material defined by a single color) is completely unaffected. Additionally, any materials with a solid color created directly in Bevy are also unaffected.

This never happens natively, but I've seen it happen on FF and Chrome on Linux (Nvidia and Intel) and Windows (Intel) and Chrome on Chrome OS (Intel).

@lights0123
Copy link
Author

Demo: https://asteroids-3d.netlify.app/

@mrk-its
Copy link
Owner

mrk-its commented Apr 26, 2021

What are the versions of bevy / webgl2?

@lights0123
Copy link
Author

Cargo.lock

[[package]]
name = "bevy"
version = "0.5.0"

[[package]]
name = "bevy_webgl2"
version = "0.5.2"

@mockersf
Copy link
Contributor

mockersf commented Apr 26, 2021

Using your deployed app, I can see the same issue on macOS safari & firefox. But taking your model, I can't reproduce in my own code. Could you share your code with a reproducer as minimal as possible?

@lights0123
Copy link
Author

@lights0123
Copy link
Author

Creating a minimal example is... difficult. I had it for a while that removing one plugin would remove the problem, but that plugin did absolutely nothing, e.g. the fn build within the impl was completely empty. And then tweaking other stuff brought it back. I'll try to cut it down a little bit further though.

@lights0123
Copy link
Author

Here's an example: commit ed5bb6e on that branch will sometimes be red or blue. Commit 4137ea4 will generally always be red—however, comment out either of these two parameters in this empty system, and the problem will now only happen intermittently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants