3D Models - Errors occur when loading GLTF models.

Hi!
I want to load my GLTF models in Cesium.

I exported DAE models from Sketchup and used the offline Collada2gltf converter to get the GLTF models.

Here are the attached models and folder(.skp, .gltf, .dae, textures folder): https://drive.google.com/drive/folders/0B0rh99fSDowtc0JVWHJnbHVMNXM

I renamed the textures folder to "image" and it was placed in: ".../SampleData/models/DHQG/".

I tried this code to load the models:

" var viewer = new Cesium.Viewer('cesiumContainer');
    var scene = viewer.scene;
    var modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(
    Cesium.Cartesian3.fromDegrees(105.782330, 21.037449, 0.0));
    var model = scene.primitives.add(Cesium.Model.fromGltf({
        url : './SampleData/models/DHQG/part_1.gltf',
        modelMatrix : modelMatrix
        //scale : 200.0
    }));
"

The error message was: http://prnt.sc/em4iw1

What do i miss?

Thanks

PA

I tested the model out and while I’m not receiving that error, the textures in the model are very high resolution and are ultimately exceeding GPU memory and crashing the tab. Even though the total size of the glTF is 22 MB, when the images are decoded for WebGL I am seeing them reach about 2GB of texture memory. Try scaling down some of the textures and that should fix it.

Thanks for your support!

PA

Vào 19:30:50 UTC+7 Thứ Ba, ngày 21 tháng 3 năm 2017, Sean Lilley đã viết: