# CZML model disable interpolation

**URL:** <https://community.cesium.com/t/czml-model-disable-interpolation/13919>\
**Category:** CesiumJS\
**Created:** [June 2, 2021, 1:22pm UTC](https://community.cesium.com/t/czml-model-disable-interpolation/13919 "2021-06-02T13:22:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![fation](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/fation/32/3458_2.png) [@fation](https://community.cesium.com/u/fation)\
**Post date:** [June 2, 2021, 1:22pm UTC](https://community.cesium.com/t/czml-model-disable-interpolation/13919/1 "2021-06-02T13:22:48Z")

</div>

How to disable interpolation of a CZML model?

---

<div class="post-metadata">

**Author:** ![Eli](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/eli/32/4980_2.png) [@Eli](https://community.cesium.com/u/Eli)\
**Post date:** [June 5, 2021, 12:07am UTC](https://community.cesium.com/t/czml-model-disable-interpolation/13919/2 "2021-06-05T00:07:21Z")

</div>

Hi @fation - does this thread answer your question? - [Stopping CZML data interpolation - #2 by Matt\_Amato](https://community.cesium.com/t/stopping-czml-data-interpolation/732/2)

The suggestion there was to use the `availability` property - here’s a [Sandcastle example](https://sandcastle.cesium.com/?src=CZML%20Polygon%20-%20Intervals%2C%20Availability.html).

---

<div class="post-metadata">

**Author:** ![fation](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/fation/32/3458_2.png) [@fation](https://community.cesium.com/u/fation)\
**Post date:** [June 5, 2021, 8:06pm UTC](https://community.cesium.com/t/czml-model-disable-interpolation/13919/3 "2021-06-05T20:06:39Z")

</div>

I have done this way but i am using a model and a polygon they move along, and the way the model is moving is showing a flickering . For the polygon this is not happening. The poligon looks like is updating the position and the model looks like is destroyed and recreated.

---

<div class="post-metadata">

**Author:** ![Eli](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/eli/32/4980_2.png) [@Eli](https://community.cesium.com/u/Eli)\
**Post date:** [June 8, 2021, 1:16am UTC](https://community.cesium.com/t/czml-model-disable-interpolation/13919/4 "2021-06-08T01:16:22Z")

</div>

Hm, that doesn’t sound right… could you please post a [Sandcastle](https://sandcastle.cesium.com/) example of your code?

---

<div class="post-metadata">

**Author:** ![fation](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/fation/32/3458_2.png) [@fation](https://community.cesium.com/u/fation)\
**Post date:** [June 8, 2021, 9:50am UTC](https://community.cesium.com/t/czml-model-disable-interpolation/13919/6 "2021-06-08T09:50:37Z")

</div>

[Test](https://sandcastle.cesium.com/#c=7VhNb+IwEP0rFieQwDiBAKG02opW6kq72kqt9tCmWpnEgFXHRrZDCyv++5okUD5TQlEPq3JAtsd+M/PmJR4YYwn8acjA+aPHAQB/42/z8Qo08AptrxAIPwoJ116h/GbjOCSxtfvw8we4FWwyEBxUwHeuiRxjpgDmAbgcY8pwjzKqJ2vHx0QqKniMYEG0ZvOZ8J+NZRlJEkwKHB+xkW1VkFOxnXsLtW2nbbvQQc5DdctQs6Bjo4cVB4mPSEqT0j1Ns9gHuHEuHc7iway8h7AXLDnlg+7NdQUhay23UULUVnbkVcsoIMENoYOhYbptWesBj4Si2jCmjO1xxbIawAnYQhBZ9kbWS86w1GIg8WhI/SsykITsCCb5NKHttKyaXd5ldCxot+y6U9tpReX9gM0svHpuuEy8WrORFxA13SzAlps7wuMY3Fp8Wl+ZlT8qoFQnOwXkWI1TCci2MtPPXSCrkSmg/ApCmQpq5RZQI1NArp07wOMY/BQBzXWy832NLPdUAsrMPr986m6mfvLX283WT+43JHKyBeTkf0ceweAnyCdRyYHX/bHyQW4rM/v8F1gt8wZzcj/fqJUtoGZuwHq2gNz8Ej+Kw3cltDJ9eq8tw2td6McaolAEhLXf0AdM99vGB4TVOxyOGLnCGlfjXaraJYpG4SWV6eiPGcIB663IU/mYkTYwel4uhZTTMApv6Sthd3Q6t9oLEmdrvWTSEm41kwfpPH28N++8tC7WZtXQaQk/vIH4zwhHewjfuqhPT/iBF+6Xwk9D+MFX1JfCtwn3+NOZxz0+xhKMKXkhEpwDTl5AkjX8Ha8VTWDxvCu4xpQTaWhIiFRDEbHg0qSNtUm3j5kixv+stIQ1P/9N8Qxsgg/jOSUK4iAoxhgjYbqQBRE7GGg/Lnqkt4YIoDiV2dxV7CkBnwoR3oti4rO0XA5MZe9EJE0W81Ox6zTD7jRkV0szZAIHxfn/NKVSvFMPCS/2I+7PywWKgSotBJRCa4n9ZxJcL7JMXJ/FwSUkFMqFjtITRi4W5H+j4UhIDSLJikZ9mhj1GfpUtRcZLA19pUpnyeZOdfVoJ6BjQIPzHfUAPsNKGUs/YrH2vMJFp2r2bx2dp0j54NeYSIYn821D6+JHsggh7FTNdPdJLQTrYbmCnOz4Bw)

It happens when the viewer animates for the first time.

---

<div class="post-metadata">

**Author:** ![fation](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/fation/32/3458_2.png) [@fation](https://community.cesium.com/u/fation)\
**Post date:** [June 15, 2021, 10:54am UTC](https://community.cesium.com/t/czml-model-disable-interpolation/13919/7 "2021-06-15T10:54:04Z")

</div>

Have you tested?

---

<div class="post-metadata">

**Author:** ![Eli](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/eli/32/4980_2.png) [@Eli](https://community.cesium.com/u/Eli)\
**Post date:** [June 18, 2021, 10:48pm UTC](https://community.cesium.com/t/czml-model-disable-interpolation/13919/8 "2021-06-18T22:48:20Z")

</div>

@fation I believe this is happening because the model is being loaded from scratch at each interval. We have an example [multi-part CZML Sandcastle](https://sandcastle.cesium.com/?src=Multi-part%20CZML.html) that looks similar to what you’re doing. A few things of note -

- the model is only loaded in the first (part1) .czml file
- note the logic to use a `preloadTimeInSeconds` to load czml slightly before it’s needed:

```auto
partsToLoad
    .filter(function (part) {
      return (
        !part.requested &&
        timeOffset >= part.range[0] - preloadTimeInSeconds &&
        timeOffset <= part.range[1]
      );
    })
    .forEach(function (part) {
      processPart(part);
    });

```

Let us know if you have any questions!
