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

Valid objects cause ArgumentException: Invalid vertex attribute dimension value (0, should be [1,4]) #162

Closed
hybridherbst opened this issue Apr 6, 2021 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@hybridherbst
Copy link
Contributor

I'm getting an exception with a specific mesh:

ArgumentException: Invalid vertex attribute dimension value (0, should be [1,4])
UnityEngine.Mesh.SetVertexBufferParams (System.Int32 vertexCount, UnityEngine.Rendering.VertexAttributeDescriptor[] attributes) (at <42a5878ce129403083acccf18e43363f>:0)
GLTFast.VertexBufferConfig`1[VType].ApplyOnMesh (UnityEngine.Mesh msh, UnityEngine.Rendering.MeshUpdateFlags flags) (at D:/git/quest-app-launcher/development/com.atteneder.gltfast/Runtime/Scripts/VertexBufferConfig.cs:248)
GLTFast.PrimitiveCreateContext.CreatePrimitive () (at D:/git/quest-app-launcher/development/com.atteneder.gltfast/Runtime/Scripts/PrimitiveCreateContext.cs:55)
GLTFast.GLTFast+<Prepare>d__76.MoveNext () (at D:/git/quest-app-launcher/development/com.atteneder.gltfast/Runtime/Scripts/GltFast.cs:1055)

What I see when debugging the exception from GltFast - looks like duplicate "position" attribute?
210406-154326530-AppLauncher_–VertexBufferConfig cs Debugger

How it looks in Gestaltor:
image

I sent the mesh via the "usual channels" for debugging purposes.

@atteneder atteneder self-assigned this Apr 7, 2021
@atteneder atteneder added the bug Something isn't working label Apr 7, 2021
@atteneder atteneder added this to the 3.2.0 milestone Apr 7, 2021
@atteneder
Copy link
Owner

confirmed!

Bug is triggered if a mesh has two UV sets and vertex colors. This results in faulty vertex attribute descriptors.

atteneder added a commit to Unity-Technologies/com.unity.cloud.gltfast that referenced this issue Jun 28, 2024
…eneder#162)

* fix(export): Base colors are now in correct, linear color space.
* fix: Updated tests and reference values.
* fix(test): Increased error tolerance on color property values. Those usually undergo a gamma to linear conversion introducing some error.
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

No branches or pull requests

2 participants