question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Vertex colors don't load

See original GitHub issue

Description

I’ve been working on #16 and run into an issue where vertex colors don’t load either for meshes or point clouds.

The vertex attribute descriptors appear correct: VertexAttribute=Color, VertexAttributeFormat=UInt8, numComponents=4, elementSize=4

Attempting to access unityMesh.colors results in:

Unsupported conversion of vertex data (format 6 to 0, dimensions 4 to 4)
UnityEngine.Mesh:get_colors ()

If the resulting array (from unityMesh.colors) is read the results are all rgba(0,0,0,0), hence the black.

This applies to both point clouds (in my WIP implementation) and meshes (in main)

There’s minimal discussion of MeshData online, but I did see this which suggests it could be a Unity issue.

Colors do load correctly in GLTFast when models are not draco compressed.

Environment

Unity 2020.3.15f2 DracoUnity main https://github.com/atteneder/DracoUnity/commit/9f5161b5eec0c99425ec0e207ec1e7df5eea5cd1

Expected Behaviour

In three.js: image Point Cloud (vertex colors) on left, Mesh (vertex colors) in center, Mesh (no colors) on right.

Actual Behaviour

In GLTFast/DracoUnity: image

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
camnewnhamcommented, Sep 13, 2021

Thanks @atteneder, good find! Confirming that this works for me.

1reaction
benvvalkcommented, Sep 13, 2021

It works!

I just confirmed that the vertex colors load correctly in Piglet using the HEAD DracoUnity version. I tested with Unity 2020.3.9f1, using the bunny model above and also with the example model that my customer shared privately.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vertex Color not showing up in Cycles Render
Update: This is due to the naming of the vertex color set. Naming it something else than "color" fixes the issue.
Read more >
Vertex Colors Not Importing from Blender : r/unrealengine
Vertex Colors Not Importing from Blender · In Blender, head to File > Export > glTF 2.0... · On the right hand side,...
Read more >
Vertex colors not appearing in studio - Building Support
Hello. I was trying to make a submission for jailbreak, and when I tried to vertex color the mesh, it doesn't appear in...
Read more >
Replacing vertex color does not work - Asset Creation
In Static mesh browser, import settings, checking 'replace vertex color' does not let me reimport mesh with original vert colors.
Read more >
Vertex colors not working, 3ds or UDK problem?
Don't have UDK here at work so I cant confirm where it was. I think it defaults to off. If you just re-import...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found