KhronosGroup / KhronosGroup/glTF

Loading multiple primitives from one Draco compressed mesh

Open
#1,333 14 comments 0 reactions 0 assignees View on GitHub
mesh compression needs discussion
Dominant language
HTML
Stars
7.8k
Forks
1.2k
Avg merge
17h 26m
Merged PRs (30d)
5

Description

I have a mesh format which is not that odd IMO. The mesh has:
- global vertex attributes like position, normal, tangent, etc
- global triangle indices
- primitives which have a type (as triangles, lines, etc), start/end index range into the global indices and material assignment.

The GLTF format itself is very flexible when defining buffers and their usage. I'm creating global accessors for the vertex attributes, but per primitive accessors for the indices. The buffers are of course shared. However I'm not sure how to translate this to the draco compression extension. The most obvious way is to create one single draco mesh for all primitives. However the GLTF viewers I've tested (threejs and babylonjs) will not check that there are different primitives with different index ranges and material assignments. They just use one (a bit random) material for all primitives. Technically it seems that all the data is there. I.e. the acessors and their min/max values are present, but this case is just not handled. Is this problem of the specs or the implementations? Will it be supported?

Contributor guide

Open the contributing guide

Research direction

No file, test, or entry point is named. Start by determining whether the limitation is in the glTF/Draco specification or in the three.js and Babylon.js implementations, then define the expected handling of multiple primitives, index ranges, and material assignments before identifying the relevant implementation and tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
threejs
Domain
computer-graphics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.