"Mark Render State dirty" in "Update Instance Transform" Node has "wrong" default value

I just tried to find out for some hours why some of my Instanced Static Meshes stopped working.

After trying out a lot of things I noticed there is this new bool “Mark Render State dirty” in the “Update Instance Transform” Node. There is no documentation on what this bool does, because it’s new in 4.8. I guess it’s for performance reasons. The problem with this is that all the old nodes from 4.7 which were placed without this bool behaved in 4.7 and older as if this bool would be true. Now all the nodes have this bool and it is false, which makes the nodes not work.

So the nodes from 4.7 and earlier should get updated with this bool being set to true, not false, the current setting breaks all the placed nodes.

Now regarding this bool, what exactly is it doing? I know that I get 4.7 behavior if I set it to true. But when should it be true? When should it be false?

With my basic understanding of instances I think that with disabled “Mark Render State dirty” it is doing something like updating the Instance Transform in the memory (RAM), but not send the new information to the GPU because all the Instance transforms have to be saved in the GPU memory to get the performance improvements of instances. So the transform get’s updated internally, but the GPU does not process the change. This improves performance a lot if multiple instances get updated in one frame, because it does not make sense to let the GPU update the instances multiple times per frame. I’m only guessing since I can’t find any info on this, so it might be completely wrong what I write.
So if I update multiple Instances a frame (what I do) then this is a really nice feature, but if my assumption on how this works is true then I don’t understand why the engine is not just automatically “batching” the commands at the end of a frame?
So I update a lot of instances in one frame, and if I have “Mark Render State dirty” disabled to get better performance I have to manually make the GPU get the updates. I have no idea how to do it, I guess there has to be a function to “Mark the Render state dirty” without updating an instance transform. The updating of the transform is happening in a loop, so I can’t define the last instance to have “Mark Render State dirty” enabled and instead I need a way to manually make the “Render state dirty”. But how?

I actually think this tiny little bool is super useful, especially for me because I need to update a lot of Instances in a Hierarchical Instanced Static Mesh Component in one frame and this is a really great performance saver for me (if it works the way I suppose it works)!

But now the other problem is: It does not seem to have any impact on Hierarchical Instances Static Mesh Components (HISMC), only on regular Instanced Static Mesh Components (ISMC). If I update the transform of a ISMC with this bool disabled, I see nothing. So the transform does not update. If the bool is set to true, the transform is updating and I see the new size. I guess this is the way it is supposed to work.
In a HISMC I even see the new transform with the bool disabled, same as if the bool would be enabled. So it does not affect the way HISMCs are updated on the GPU, although HISMCs are the most important ones for me…

Hi ,

I just wanted to let you know that I am looking into this. I’m looking into more specific information on the node, boolean value, and how they interact with both instanced and hierarchical instanced meshes. Once I have this information I will post here again.

Hi ,

I finally got more information on this. The boolean is meant to be used on batches of instanced meshes that are being updated as opposed to individual meshes. HISMC components were not designed to be altered at runtime, however this boolean was added so that, if in the event someone needed to alter them at runtime, they would be able to batch render them as dirty instead of per component alterations to improve overall performance.

Thanks !

Are you sure this is right? Because it does not do anything on HISMCs, only on ISMCs. On HISMCs the render state get’s marked dirty (the instances get updated visually) even with the bool not being ticked.
The way you describe it would be ideal for me (because I update them a lot on runtime as you know…) but the bool is not doing anything on a HISMC. So is it a bug?

It was designed for Instanced meshes in particular, it may work with HISMC, but because they were not designed for this type of use it is difficult to say whether or not this would be considered a bug or a works as intended.