Cesium: Support for glTF 2.0

Created on 8 Jun 2016  路  15Comments  路  Source: CesiumGS/cesium

Changes from 1.0 to 2.0 are here: https://github.com/KhronosGroup/glTF/issues/605

The 2.0 spec still needs a bit more work, but is converging quickly.


Cesium / glTF Pipeline / COLLADA2GLTF / 3D Tiles updates

TBA

category - gltf priority - high type - enhancement type - roadmap

Most helpful comment

I confirmed that the model of glTF 2.0 will be displayed by Cesium 1.36 (not 1.35).
https://github.com/cx20/gltf-test/tree/2.0

All 15 comments

Copying from #605 to track progress in Cesium.

  • [x] asset is now required (This shouldn't change anything in Cesium)
  • [x] accessor.min and accessor.max are now required, and clarified that the JSON value and binary data must be the same (This shouldn't change anything in Cesium)
  • [x] Added accessor.normalized (#4247)
  • [x] buffer.byteLength and bufferView.byteLength are now required (This shouldn't change anything in Cesium)
  • [x] buffer.type can no longer be "text", which was not used (This shouldn't change anything in Cesium, we never supported that anyway)
  • [ ] skin.inverseBindMatrices is now optional
  • [ ] Attribute parameters can't have a value defined in the technique or parameter
  • [x] Only TEXCOORD and COLOR attribute semantics can be written in the form [semantic]_[set_index] (This shouldn't change anything in Cesium)
  • [x] TEXCOORD and COLOR attribute semantics must be written in the form [semantic]_[set_index], e.g., just TEXCOORD should be TEXCOORD_0, and just COLOR should be COLOR_0 (This shouldn't change anything in Cesium)
  • [x] camera.perspective.aspectRatio and camera.perspective.yfov must now be > 0, not >= 0 (This shouldn't change anything in Cesium, since we don't support glTF cameras)
  • [x] Application-specific parameter semantics must start with an underscore, e.g., _TEMPERATURE and _SIMULATION_TIME (This shouldn't change anything in Cesium)
  • [x] Added glExtensionsUsed property and 5125 (UNSIGNED_INT) accessor.componentType value (#4249)
  • [ ] Properties in technique.parameters must be defined in technique.uniforms or technique.attributes,
  • [ ] technique.parameter.count can only be defined when the semantic is JOINTMATRIX or an application-specific semantic is used. It can never be defined for attribute parameters; only uniforms
  • [ ] technique.parameter.semantic is required when the parameter is an attribute
  • [ ] material.parameter.value and technique.parameter.value must be an array
  • [ ] Mesh-only models are allowed, e.g., without materials (#4251)
  • [ ] Skeleton hierarchies (nodes containing jointName) must be separated from non-skeleton hierarchies.
  • [x] Removed technique.functions.scissor and removed 3089 (SCISSOR_TEST) as a valid value for technique.states.enable (#4248)

@pjcozzi Do we want to completely pull support from SCISSOR_TEST throughout, or just when loading from a model?

@pjcozzi Do we want to completely pull support from SCISSOR_TEST throughout, or just when loading from a model?

Remove it completely from glTF since it was never used, but do not remove it from the lower-level Cesium renderer.

I tested the display of the tutorial model of glTF 1.1 with Cesium 1.29.
Some glTF 1.1 models can not be displayed, please confirm.
https://github.com/cx20/gltf-test#gltf-11-tutorial-models

An error occurred while rendering. Rendering has stopped.
TypeError: Cannot read property 'nodes' of undefined
TypeError: Cannot read property 'nodes' of undefined
    at ye (https://cx20.github.io/gltf-test/libs/cesium/1.29/Cesium.js:453:20512)
    at de.update (https://cx20.github.io/gltf-test/libs/cesium/1.29/Cesium.js:454:27770)
    at a.update (https://cx20.github.io/gltf-test/libs/cesium/1.29/Cesium.js:469:14800)
    at Ue (https://cx20.github.io/gltf-test/libs/cesium/1.29/Cesium.js:472:20935)
    at Ve (https://cx20.github.io/gltf-test/libs/cesium/1.29/Cesium.js:472:19556)
    at Be (https://cx20.github.io/gltf-test/libs/cesium/1.29/Cesium.js:472:17516)
    at qe (https://cx20.github.io/gltf-test/libs/cesium/1.29/Cesium.js:472:23594)
    at de.render (https://cx20.github.io/gltf-test/libs/cesium/1.29/Cesium.js:472:28774)
    at P.render (https://cx20.github.io/gltf-test/libs/cesium/1.29/Cesium.js:478:9308)
    at t (https://cx20.github.io/gltf-test/libs/cesium/1.29/Cesium.js:477:29290)

Thanks @cx20. glTF 1.1 support is not integrated into mainline Cesium yet

I confirmed that the model of glTF 2.0 will be displayed by Cesium 1.36 (not 1.35).
https://github.com/cx20/gltf-test/tree/2.0

@cx20 very nice, thanks for checking so quickly (also, I think you mean 1.36)!

@lilleyse can you please update the above tasklist? Some of the items are finished.

@lilleyse can you please update the tasklists in this issue? What's left?

Updated the task list. The major things left are:

  • Sparse accessors
  • Spec gloss extension
  • Update 3d-tiles samples and projects to use 2.0 (in progress)
  • [ ] Support multiple (or at least two) UV maps (test model).
  • [ ] Generate missing normals (#6506) per spec as flat-shaded instead of unlit.

@ggetz could you please update the tasklists above? Perhaps we can close this and submit/update other issues.

I guess this can safely be closed since a while :)
Thanks for all your efforts!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

OmarShehata picture OmarShehata  路  4Comments

OmarShehata picture OmarShehata  路  4Comments

worlddai picture worlddai  路  3Comments

puckey picture puckey  路  4Comments

mcenirm picture mcenirm  路  4Comments