# Difficulty animating a time-aware reader with an OSPRayPass

**URL:** https://discourse.vtk.org/t/difficulty-animating-a-time-aware-reader-with-an-ospraypass/3004
**Category:** Support
**Created:** [April 9, 2020, 3:10pm UTC](https://discourse.vtk.org/t/difficulty-animating-a-time-aware-reader-with-an-ospraypass/3004 "2020-04-09T15:10:39Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jfavre](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/j/b5ac83/32.png) [@jfavre](https://discourse.vtk.org/u/jfavre)
#### Post date: [April 9, 2020, 3:10pm UTC](https://discourse.vtk.org/t/difficulty-animating-a-time-aware-reader-with-an-ospraypass/3004/1 "2020-04-09T15:10:39Z")

</div>

I have a Python program displaying data from a time-aware reader. I can play my animation without any problem.

Now, if I add an OSPRayPass, my time-aware reader responds to timestep update requests, but my render window never updates. I have tried with another supported reader, the vtkVASPAnimationReader(), re-using the test provided. The same happens. There is no rendering updates. In summary, for the two time-aware readers I have tried, the following loop plays a nice animation if using a normal OpenGL loop,

```
for t in timerange:
  reader.UpdateTimeStep(t)
  renWin.Render()

```

whereas if using an OSPRayPass, my render window never shows any new data and updates.

Yet, ParaView does it right. There must be a trick ParaView does. What am I missing in a pure VTK program?

---

<div class="post-metadata">

### Author: ![utkarshayachit](https://discourse.vtk.org/user_avatar/discourse.vtk.org/utkarshayachit/32/379_2.png) [@utkarshayachit](https://discourse.vtk.org/u/utkarshayachit)
#### Post date: [April 9, 2020, 9:29pm UTC](https://discourse.vtk.org/t/difficulty-animating-a-time-aware-reader-with-an-ospraypass/3004/2 "2020-04-09T21:29:21Z")

</div>

can you try calling that `UpdateTimeStep` on the mapper instead of the reader?

---

<div class="post-metadata">

### Author: ![jfavre](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/j/b5ac83/32.png) [@jfavre](https://discourse.vtk.org/u/jfavre)
#### Post date: [April 14, 2020, 6:32pm UTC](https://discourse.vtk.org/t/difficulty-animating-a-time-aware-reader-with-an-ospraypass/3004/3 "2020-04-14T18:32:33Z")

</div>

Thanks for your reply. So far, the only solution I have found is to call Modified() on the mapper itself. So my loop is the following and the OSPRay renderer shows data being updated.

> ```
> for t in timerange:
> reader.UpdateTimeStep(t)
> molmapper.Modified()
> renWin.Render()
> 
> ```
