I want to render a glTF model fast,but textures of the model is so large about 27Mb that the transmission time is too long.As a result,I want to render the the glTF model without
textures,so I can save the time of texutures transmission .
Remove the textures from the original model in a modeling tool like Maya or just resize them in a tool like Gimp to something much smaller. You could also hack the glTF .json and .glsl to remove the textures but I do not recommend it.
My goal is to render the model without textures when the viewpoint is far from the models,and when the viewpoint is close to the models, it immediately draw the models’s
textures in the view range.
So is it possible to revise the class Model.js in Cesium to achieve my goal?
We don’t have support for this yet, but it would be pretty simple for you to create a “CompositeModel” class that has an update() function like the Model class and all other primitives. It would have a reference to two Model instances, one with textures and one without. In the update() function, it would call the update() function for one of the models based on the distance to the camera.
This is something the Cesium API will handle automatically in the future, but in the meantime, this is a short and reasonable workaround.