# Hydra Invalidation when updating Materials and Point Instancers

**URL:** <https://forum.aousd.org/t/hydra-invalidation-when-updating-materials-and-point-instancers/1930>\
**Category:** Hydra\
**Tags:** rendering\
**Created:** [October 19, 2024, 12:59am UTC](https://forum.aousd.org/t/hydra-invalidation-when-updating-materials-and-point-instancers/1930 "2024-10-19T00:59:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dhruvgovil](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.aousd.org/dhruvgovil/32/3_2.png) [@dhruvgovil](https://forum.aousd.org/u/dhruvgovil)\
**Post date:** [October 19, 2024, 12:59am UTC](https://forum.aousd.org/t/hydra-invalidation-when-updating-materials-and-point-instancers/1930/1 "2024-10-19T00:59:04Z")

</div>

Hey Hydra Experts,  
We’re seeing Hydra being quite aggressive with the scene invalidation both with and without `USDIMAGINGGL_ENGINE_ENABLE_SCENE_INDEX`.

We’re seeing the following two issues with USD 24.3/24.5

1. When we modify the topology of a material graph, it invalidates the material AND all prims that the material is assigned to. Which calls into the render delegates Create and Destroy methods for each.
2. When we update the transform of a point instance, it invalidates the entire point instances. I see this is called out in `pointInstancerAdapter.cpp` in 24.11 as well. For example, just moving the instance around in space.

Is there any advice folks have for dealing with this aggressive invalidation? We’d like to keep our render updates minimal where possible.

---

<div class="post-metadata">

**Author:** ![dhruvgovil](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.aousd.org/dhruvgovil/32/3_2.png) [@dhruvgovil](https://forum.aousd.org/u/dhruvgovil)\
**Post date:** [November 7, 2024, 6:57pm UTC](https://forum.aousd.org/t/hydra-invalidation-when-updating-materials-and-point-instancers/1930/2 "2024-11-07T18:57:46Z")

</div>

As discussed, filing issues

> <https://github.com/PixarAnimationStudios/OpenUSD/issues/3410>
>
> \### Description of Issue
> 
> We are seeing that when a material has its graph top…ology changed, it causes Hydra to invalidate the material AND all gprims that have the material bound to it. This calls into the render delegates Create and Destroy method for each of the prims.
> 
> This feels somewhat costly for persisting the scene graph itself as artists iterate on shader looked.
> 
> 
> \### System Information (OS, Hardware)
> \* macOS 15.1
> 
> \### Package Versions
> \* USD 24.3 and 24.5 . Our team hasn't updated to 24.11 but I didn't see any code changes that stood out to me regarding it
> \* Attempted with and without \`USDIMAGINGGL\_ENGINE\_ENABLE\_SCENE\_INDEX\`

> <https://github.com/PixarAnimationStudios/OpenUSD/issues/3412>
>
> \### Description of Issue
> 
> When moving point instances around, it causes invali…dations for the entire set of point instances within that instancer inside a Hydra render delegate.
> 
> This seems reflected here in the code:
> https://github.com/PixarAnimationStudios/OpenUSD/blob/9b0c13b2efa6233c8a4a4af411833628c5435bde/pxr/usdImaging/usdImaging/pointInstancerAdapter.cpp#L830
> 
> \### System Information (OS, Hardware)
> \* macOS 15.1
> 
> \### Package Versions
> \* USD 24.3 -\> 24.11
