KhronosGroup / KhronosGroup/COLLADA2GLTF

Wrong Tangent and Binormal After Conversion

Open
#294 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
573
Forks
154
PR merge metrics
No merged PRs in 30d

Description

Converting a model exported from 3DS Max using the Open Collada plugin will give a file generating errors when checked in https://gltf-viewer.donmccurdy.com/

The two reported errors are :
```
MESH_PRIMITIVE_INVALID_ATTRIBUTE Invalid attribute name. /meshes/0/primitives/0/attributes/BINORMAL
MESH_PRIMITIVE_ATTRIBUTES_ACCESSOR_INVALID_FORMAT Invalid accessor format '{VEC3, FLOAT}' for this attribute semantic. Must be one of ('{VEC4, FLOAT}'). /meshes/0/primitives/0/attributes/TANGENT
```
I am using COLLADA2GLTF version 2.1.5

The command line uses to generate the file:

`COLLADA2GLTF-bin.exe -b --doubleSided true -i test.dae -o test.gltf `

As a note (and because I come from there), CesiumJS will fail to render the file and crash with a shader exception. (which is very troublesome since Cesium is dropping support for GLTF 1.0)

Attached, test files to demonstrate the issue (both DAE and GLB)
[test.zip](https://github.com/KhronosGroup/COLLADA2GLTF/files/9748314/test.zip)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by running the reported COLLADA2GLTF 2.1.5 command on the attached test.dae and inspect test.gltf or the generated GLB. Use the glTF viewer's BINORMAL and TANGENT validation errors to trace the conversion behavior. Done means the converted asset uses valid attribute semantics and no longer triggers those errors or the reported CesiumJS shader failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.