-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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 2.0 models appear dark #6412
Comments
I also think IBL will help here. Cesium does look much darker, so I am keen on a quick workaround in the meantime. For example, compare Cesium to the other engines here: KhronosGroup/glTF-Sample-Models#154 (comment) Perhaps @emackey has a few minutes to spare to work on this? 😄 |
I tried displaying Polly.gltf in the following version. It seems that it is dark when it is the latest version (v1.44). |
The Polly model there (the dog alone) isn't just dark, it's pitch black, even the emissive green lights on the dog have gone out.
Other (non-skinned) models look the same as they have before, so I think the Polly/skinned model bug is separate from the general lighting concerns. EDIT: Cesium (and gltf-pipeline) use a single In addition to It also has a |
Turns out, Polly actually has a material (named "Head" at index 0) that is used for the eyes, which supply tangents, and the rest of the head, which does not supply tangents. As such, a single shader must handle both cases, or we need to move to per-primitive materials. Or, we use the supplied tangents only when ALL of the affected meshes supply tangents, and ignore supplied tangents otherwise. That last option is the least destructive change, I'll try it first. |
We already split materials used by multiple primitives by skinning/vertex colors, so it shouldn't be too bad to also split by tangents. |
@JackD83 Perhaps the reason why it looks dark is that the time of the area displayed by BTW, I think the antenna-like things coming out of Polly's ears are artifacts. |
@JackD83 Would you be able to include a Sandcastle example that replicates the issue? That would help us give us more context to determine the issue. Thanks! |
You where right (and I feel stupid) . That means polly is fine and its only my own gltf models that are black. I dug a little deeper and the models in question where converted from gltf 1.0 to 2.0 using a custom script. The script set the single texture as emissiveTexture:
This worked up to Cesium 1.96 and results now in a black model. Using inside pbrMetallicRoughness is working. emissiveTexture probably was wrong from the beginning, but should work nonetheless. The windows gltf viewer and others have no problem with it. We have large datasets and I would rather not have them repacked and redistributed. You can find a sandcastle with the models here |
Compared to other glTF viewers out there our models usually appear darker. We should experiment with either:
The text was updated successfully, but these errors were encountered: