Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

New glTF models #9

Merged
merged 9 commits into from
Dec 28, 2016
Merged

New glTF models #9

merged 9 commits into from
Dec 28, 2016

Conversation

sbtron
Copy link
Contributor

@sbtron sbtron commented Nov 23, 2016

FYI working on adding new sample models.
Have FBX and Collada versions now but need to generate the glTF versions.
Starting with 3 models for now but many more in queue once we get the conversion process up and going.

Please don't merge yet.

@sbtron sbtron changed the title [WIP} New glTF models [WIP] New glTF models Nov 23, 2016
@pjcozzi
Copy link
Member

pjcozzi commented Nov 23, 2016

@sbtron for the COLLADA files perhaps try converting the big .tga files to .png or .jpg, then try the drag and drop converter here: http://cesiumjs.org/convertmodel.html

For general troubleshooting, check out this section from the Cesium tutorial: https://cesiumjs.org/tutorials/3D-Models-Tutorial/#converting-collada-to-gltf

@sbtron
Copy link
Contributor Author

sbtron commented Nov 30, 2016

Some progress with models rendering in Cesium, Xeo and glBoost. but not in three.js/babylonJS using the gltf-test tools:
sources: https://github.com/sbtron/gltf-test/tree/newsamplemodeltest
live: http://gltf-test.azurewebsites.net/

might be engine specific issues but still looking into it.

@pjcozzi
Copy link
Member

pjcozzi commented Nov 30, 2016

Have you tested the glTF models with the validator (just a heads up it validates glTF 1.1, not 1.0): https://github.com/KhronosGroup/glTF-Validator

Also, I tried some examples like http://gltf-test.azurewebsites.net/examples/cesium/index.html?model=BarramundiFish&scale=0.05&type=glTF-Binary but the console reports:

Failed to load resource: the server responded with a status of 404 (Not Found)
http://gltf-test.azurewebsites.net/sampleModels/BarramundiFish/glTF-Binary/BarramundiFish.glb

@sbtron
Copy link
Contributor Author

sbtron commented Nov 30, 2016

will try the validator. Are any of the tools generating 1.1 yet?

Haven't generated gltf binaries yet. The collada2gltf command line doesn't seem to have that option? The cesium website does seem to allow that are they different codebases?

Incidentally I ended up using assimp to go from FBX to Collada and that seemed like a better conversion than the autodesk fbx to collada converter I was using earlier. Assimp also has a glTF exporter but seems to be generating an older version.

@javagl
Copy link
Contributor

javagl commented Nov 30, 2016

Haven't generated gltf binaries yet. The collada2gltf command line doesn't seem to have that option? The cesium website does seem to allow that are they different codebases?

If I understood this correctly: The online converter uses COLLADA2GLTF to do the actual conversion from DAE to glTF, but then uses https://github.com/AnalyticalGraphicsInc/gltf-pipeline as some sort of "post-processing" step to convert the resulting glTF into binary glTF.

@sbtron
Copy link
Contributor Author

sbtron commented Dec 2, 2016

Was able to generate those glbs using the cesium website. Is there a pointer to how the common material models were created :)

@pjcozzi
Copy link
Member

pjcozzi commented Dec 6, 2016

Are any of the tools generating 1.1 yet?

Not that I am aware of, but gltf-pipeline will be able to convert 1.0 to 1.1 very soon: CesiumGS/gltf-pipeline#191

There is also work towards upgrading COLLADA2GLTF to 1.1, but the pull request is not ready yet: KhronosGroup/COLLADA2GLTF@master...lasalvavida:converter1.1

Both of these are by @lasalvavida.

Is there a pointer to how the common material models were created :)

Which models in particular?

@sbtron
Copy link
Contributor Author

sbtron commented Dec 7, 2016

@pjcozzi
Copy link
Member

pjcozzi commented Dec 14, 2016

@sbtron the milk truck model was converted with COLLADA2GLTF (using the -k option to generate materials common, see the bottom of this page).

So you could go through COLLADA to generate this or we would be happy to still take the sample models without this variation.

@sbtron sbtron changed the title [WIP] New glTF models New glTF models Dec 21, 2016
@sbtron
Copy link
Contributor Author

sbtron commented Dec 21, 2016

@pjcozzi lets get these three in while I work on fixing others

@cx20
Copy link
Contributor

cx20 commented Dec 24, 2016

@sbtron I think that the gltf binary model, which was probably manually modified, is broken.

It seems that 0x20 should be 0x00.

image

See:
https://github.com/KhronosGroup/glTF/tree/master/extensions/Khronos/KHR_binary_glTF#binary-gltf-layout
Figure 1: Binary glTF layout.
image

@javagl
Copy link
Contributor

javagl commented Dec 24, 2016

Indeed, the length indicates 537164250 bytes...

Since the 0x00 bytes have consistently been replaced by 0x20 (a ' ' space), I guess that the file was opened and saved with a text editor, and not with a hex editor.

It seemed to work properly in https://github.com/sbtron/glTF-Sample-Models/blob/4f97c9b9484ca4b9f1f22707d3e7149cdfc9ff13/1.0/SmilingFace/glTF-Binary/SmilingFace.glb , by the way

@sbtron
Copy link
Contributor Author

sbtron commented Dec 25, 2016

Thanks I was manually tweaking those values to test things out. Updated now by regenerating the whole glb.

@cx20
Copy link
Contributor

cx20 commented Dec 25, 2016

@sbtron I confirmed that Avocado.glb and BarramundiFish.glb have been modified.
However, SmilingFace.glb has not been repaired yet.

The problem was with the original collada files. Fixed transparency and
regenerated all models.
@cx20
Copy link
Contributor

cx20 commented Dec 28, 2016

I tested the loading of 3 models with each latest WebGL library and confirmed that they are displayed correctly.
https://github.com/cx20/gltf-test
https://cx20.github.io/gltf-test/

@pjcozzi
Copy link
Member

pjcozzi commented Dec 28, 2016

@sbtron thanks again for these models!

@cx20 @javagl thanks for testing and debugging!

@pjcozzi pjcozzi merged commit 121de17 into KhronosGroup:master Dec 28, 2016
@pjcozzi
Copy link
Member

pjcozzi commented Dec 28, 2016

@sbtron could you open a separate pull request to add these models to the main README.md?

@javagl
Copy link
Contributor

javagl commented Jan 17, 2017

The .GLB versions of these models all seem to have an invalid field:

.techniques.technique0.states.disable

Maybe these could be removed.

@pjcozzi
Copy link
Member

pjcozzi commented Jan 17, 2017

Good eye, @javagl. @sbtron could you fix these in a new PR?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants