PerInstanceCustomData not working in HISM

There’s a new feature in UE 4.25 which lets us send an array of custom data per instance to the material. However, it doesn’t work reliably in hierarchical instanced static mesh (it works perfectly in ISM). Does anybody know what’s the problem? Or is there a workaround for it? Or is it a work-in-progress to bring it also to HISM?

Having the same issue, thought it was related to culling. Would be great if someone could chime in here.

Same issue in foliage instancing :frowning:

I was looking into this bug today, and it turns out that Epic committed a fix for it ~3 weeks ago on GitHub: https://github.com/EpicGames/UnrealEngine/commit/a2e9daf7280cbd7f395e0e03c0c430fabb168d40

I pulled the change locally and it fixes the bug for me.

Is this also fixing LOD problems for PerInstanceCustomData? I saw target fix 4.26 for some other PerInstanceCustomData and PerInstanceRandom HISM related issues. For now I am sticking to ISM. I had to revert so much code because of that :confused:, because of time constrains and uncertainty I would rather not pull custom local changes.

I’m digging this up because I am currently trying to use **PerInstanceCustomData **with foliage instanced static meshes and the changes I make go all over the place depending on LOD.
I’m on 25.3. Should this work now and I’m doing something wrong or is this still bugged?

I tested **PerInstanceCustomData **for foliagein 4.26 and while the issue with LOD seems to fixed, i encountered another bug, where the render state doesn’t get updated when changing a value at runtime when starting a standalone or cooked game. In PIE it works fine though.
I have submitted a bug report, but it hasn’t been approved yet. Hopefully won’t have to wait for 4.27 to get it fixed…

I had the same issue and was able to find a fix for it that you can find here:

1 Like