# ISMC rebuild all render data on any instance data change?

**URL:** <https://forums.unrealengine.com/t/ismc-rebuild-all-render-data-on-any-instance-data-change/468097>\
**Category:** Asset Creation\
**Tags:** hism, unreal-engine, question\
**Created:** [July 13, 2020, 12:03pm UTC](https://forums.unrealengine.com/t/ismc-rebuild-all-render-data-on-any-instance-data-change/468097 "2020-07-13T12:03:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![8moGames](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@8moGames](https://forums.unrealengine.com/u/8moGames)\
**Post date:** [July 13, 2020, 12:03pm UTC](https://forums.unrealengine.com/t/ismc-rebuild-all-render-data-on-any-instance-data-change/468097/1 "2020-07-13T12:03:37Z")

</div>

So I’ve got a ISMC with a lot of instances…in this case 50,000 of them. They all move around independently, so I’m doing a batch update of the instance transforms every tick using BatchUpdateInstancesTransforms(). I’ve turned off collision and nav mesh updates for the instances (because that just grinds everything to a halt) and only mark the ISMC dirty after all the updates are done. All that gives me a batch update of around 8ms, which is fine.

BUT I’m getting hit with really long BuildRenderData calls in the PostTickComponentUpdate phase. These calls get longer and longer over a period of a few seconds before dropping down, then ramping up again (my framerate graph looks like a sawtooth wave).

However, if I make ten copies of the ISMC and set them to 5,000 each, I don’t see this behavior; same total number of instances, but it runs much more smoothly and much faster overall. There seems to be something non-linear related to number of instances in whatever ISMC is doing with the render data.

I did a separate test where I don’t add or delete instances and leave the xforms alone, but instead only update the per-instance-custom-data (we need a batch version of this command, btw!) – and still see a big hit in BuildRenderData. The hit stays the same if I update a single instance or all of them.

The mesh is single quad, and material lightweight, so rendering is not a bottleneck.

My questions are:

- What’s going on with that BuildRenderData lag ramping?
- Does changing a transform or custom data of even a single instance trigger a complete rebuild of the render data under the hood?
- How does one handle large numbers of instances updating their xforms or custom data?

Thanks!  
Lars

---

<div class="post-metadata">

**Author:** ![Bolad\_Daurian](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bolad_daurian/32/989869_2.png) [@Bolad\_Daurian](https://forums.unrealengine.com/u/Bolad_Daurian)\
**Post date:** [December 29, 2022, 4:41am UTC](https://forums.unrealengine.com/t/ismc-rebuild-all-render-data-on-any-instance-data-change/468097/2 "2022-12-29T04:41:34Z")

</div>

I know it has been a while, I am coming into the same problem and just been thinking of splitting it into multiple meshes

I tried updating in batches, I have a grid of instances 256x256, and tried updating one row at a time, but it was taking as long to render 256 updated instances as it was to render 65,000 of them
