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

Wrong Colors when using Vertex Colors exported from Blender #138

Closed
chrisssssy opened this issue Feb 16, 2021 · 3 comments · Fixed by #139
Closed

Wrong Colors when using Vertex Colors exported from Blender #138

chrisssssy opened this issue Feb 16, 2021 · 3 comments · Fixed by #139
Assignees
Labels
bug Something isn't working

Comments

@chrisssssy
Copy link

Hi,

i have problems with displaying corrects colors when using vertex colors. With standard materials and textures exported from blender, everything looks fine. But exporting only the mesh with vertex color results in weird colors like in this picture:

image

But it should look like this (same glb-file in Windows 10 3D-Viewer):

image

Other GLTF-Viewers display the colors correctly. Here is the zipped glb-file:

Suzanne.zip

Also sometimes i get this unity warning "Mesh vertex buffer attributes were supplied in non-standard order". What does this mean? Can you give me a tipp how to fix this problem? Maybe a export setting in blender?

Thanks for your support!

Unity Warning Message:
Mesh vertex buffer attributes were supplied in non-standard order. Layout was adjusted to this order: Position, Normal, Color, TexCoord0.
UnityEngine.Mesh:SetVertexBufferParams(Int32, VertexAttributeDescriptor[])
GLTFast.VertexBufferConfig`1:ApplyOnMesh(Mesh, MeshUpdateFlags) (at Library/PackageCache/com.atteneder.gltfast@5602e1e9c4/Runtime/Scripts/VertexBufferConfig.cs:237)
GLTFast.PrimitiveCreateContext:CreatePrimitive() (at Library/PackageCache/com.atteneder.gltfast@5602e1e9c4/Runtime/Scripts/PrimitiveCreateContext.cs:56)
GLTFast.d__78:MoveNext() (at Library/PackageCache/com.atteneder.gltfast@5602e1e9c4/Runtime/Scripts/GltFast.cs:909)
GLTFast.d__57:MoveNext() (at Library/PackageCache/com.atteneder.gltfast@5602e1e9c4/Runtime/Scripts/GltFast.cs:260)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

@chrisssssy
Copy link
Author

Seems like it's an issue with the exporter (Khronos glTF Blender I/O v1.4.40) in blender 2.91.2. With blender 2.8 LTS (exporter: Khronos glTF Blender I/O v1.2.75) the problem is gone. Export settings where the same.

@atteneder
Copy link
Owner

Hi @chrisssssy ,

Thanks for reporting. Great that you found a workaround in using 2.8 LTS, but I suspect this is clearly a bug on glTFast's side.

I'll look into it soon.

Regards

@atteneder atteneder self-assigned this Feb 17, 2021
@atteneder atteneder added the bug Something isn't working label Feb 17, 2021
@chrisssssy
Copy link
Author

#139 did fix this problem for me. Now i can use the files exported with blender 2.91.2 without any issues, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants