# How to render a glTF model without textures

**URL:** <https://community.cesium.com/t/how-to-render-a-gltf-model-without-textures/1239>\
**Category:** CesiumJS\
**Created:** [May 27, 2014, 3:11am UTC](https://community.cesium.com/t/how-to-render-a-gltf-model-without-textures/1239 "2014-05-27T03:11:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://community.cesium.com/u/11155)\
**Post date:** [May 27, 2014, 3:11am UTC](https://community.cesium.com/t/how-to-render-a-gltf-model-without-textures/1239/1 "2014-05-27T03:11:38Z")

</div>

Hi！

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 .

Can you give me some suggestion?

---

<div class="post-metadata">

**Author:** ![patrick](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/patrick/32/2045_2.png) [@patrick](https://community.cesium.com/u/patrick)\
**Post date:** [May 28, 2014, 12:15am UTC](https://community.cesium.com/t/how-to-render-a-gltf-model-without-textures/1239/2 "2014-05-28T00:15:22Z")

</div>

Hi,

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.

Patrick

---

<div class="post-metadata">

**Author:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://community.cesium.com/u/11155)\
**Post date:** [May 28, 2014, 3:04am UTC](https://community.cesium.com/t/how-to-render-a-gltf-model-without-textures/1239/3 "2014-05-28T03:04:41Z")

</div>

Oh,Thank you!

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?

在 2014年5月28日星期三UTC+8上午8时15分22秒，Patrick Cozzi写道：

---

<div class="post-metadata">

**Author:** ![patrick](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/patrick/32/2045_2.png) [@patrick](https://community.cesium.com/u/patrick)\
**Post date:** [May 29, 2014, 10:43pm UTC](https://community.cesium.com/t/how-to-render-a-gltf-model-without-textures/1239/4 "2014-05-29T22:43:33Z")

</div>

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.

Patrick

---

<div class="post-metadata">

**Author:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://community.cesium.com/u/11155)\
**Post date:** [May 30, 2014, 1:01am UTC](https://community.cesium.com/t/how-to-render-a-gltf-model-without-textures/1239/5 "2014-05-30T01:01:21Z")

</div>

Thank you! I will have a try.

And can you tell me when Cesium will support this function? I really look forward it.

在 2014年5月30日星期五UTC+8上午6时43分34秒，Patrick Cozzi写道：

---

<div class="post-metadata">

**Author:** ![patrick](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/patrick/32/2045_2.png) [@patrick](https://community.cesium.com/u/patrick)\
**Post date:** [May 31, 2014, 1:08am UTC](https://community.cesium.com/t/how-to-render-a-gltf-model-without-textures/1239/6 "2014-05-31T01:08:12Z")

</div>

It’s going to be a ways out. This workaround is the way to go in the meantime.

Patrick
