KhronosGroup / KhronosGroup/glTF

Need more information on properly extracting TEXCOORD_0 from compressed data.

Open
#2,108 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
7.8k
Forks
1.2k
Avg merge
17h 26m
Merged PRs (30d)
5

Description

I am having trouble with this exported GLFT model with Draco Compression and your document is not helping.
The UV coordinate came out all wrong.
There are 3 primitives each pointing to a different BufferView.

```
"meshes": [
{
"primitives": [
{
"attributes": {
"TEXCOORD_0": 1,
"NORMAL": 2,
"TANGENT": 3,
"POSITION": 4
},
"indices": 0,
"material": 0,
"mode": 4,
"extensions": {
"KHR_draco_mesh_compression": {
"bufferView": 0,
"attributes": {
"TEXCOORD_0": 0,
"NORMAL": 1,
"TANGENT": 2,
"POSITION": 3
}
}
}
}
],
"name": "LanternPole_Body"
},
{
"primitives": [
{
"attributes": {
"TEXCOORD_0": 6,
"NORMAL": 7,
"TANGENT": 8,
"POSITION": 9
},
"indices": 5,
"material": 0,
"mode": 4,
"extensions": {
"KHR_draco_mesh_compression": {
"bufferView": 1,
"attributes": {
"TEXCOORD_0": 0,
"NORMAL": 1,
"TANGENT": 2,
"POSITION": 3
}
}
}
}
],
"name": "LanternPole_Chain"
},
{
"primitives": [
{
"attributes": {
"TEXCOORD_0": 11,
"NORMAL": 12,
"TANGENT": 13,
"POSITION": 14
},
"indices": 10,
"material": 0,
"mode": 4,
"extensions": {
"KHR_draco_mesh_compression": {
"bufferView": 2,
"attributes": {
"TEXCOORD_0": 0,
"NORMAL": 1,
"TANGENT": 2,
"POSITION": 3
}
}
}
}
],
"name": "LanternPole_Lantern"
}
],
```

My code to iterate over primitives to extract geometry:

```
for (var k=0; k

Contributor guide

Open the contributing guide

Research direction

Use the provided glTF primitives and the decodeDracoFile call as the reproduction starting point, and compare the existing Draco documentation with the reported TEXCOORD_0 behavior. Done means the documentation explains how compressed attribute mappings and buffer views should be handled, with the supplied model and UV result used to verify the guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.