Culling issue with InstancedStaticMeshComponent

Hi,

I’d like to report that UInstancedStaticMeshComponent is not taking the Max WPO Offset into account after an instance transform update. It is correct initially after calling AddInstance(), but as soon as you call UpdateInstanceTransform(), the offset gets lost.

These are two ISMs, the left one is animated, the right one is not. Note that the bounds are wrong on the left one:

[Image Removed]

I think, the bug is that FPrimitiveSceneProxy::UpdateInstances_RenderThread doesn’t take padding into account, unlike the FPrimitiveSceneProxy::SetTransform method above. My understanding is that the proxy bounds (RT) should include padding, whereas the bounds on the component (GT) should not.

[Image Removed]

Could you please confirm whether this is the correct fix? It looks like FPrimitiveSceneProxy::UpdateInstances_RenderThread is only called for ISM components, but I’m not 100% sure.

Thank you,

Georg

PS: This affects the combined bounds for the ISM component itself. The bounds for the individual instances seem to be correct.

Steps to Reproduce

  • Run PIE with the attached project

  • Look up until the left cube gets culled. Note that it gets culled too early.

  • Press F8

  • Enable bounds visualization

  • Select both ISM cubes (these have a ISM component each)

  • Note that the bounds are too small for the left one

Hi there, thanks for the bug report and reproduction project.

To answer your question briefly, yes that seems like an appropriate fix for the issue.

You are right that FPrimitiveSceneProxy::UpdateInstances_RenderThread is only called for ISM components.

I will create a bug report for this case and get back to you with the public issue tracker link once that is available.

Regards,

Lance Chaney

Here is the link to the public bug tracker for your reference

I’m closing off the case now.

Regard,

Lance

Thank you Lance. Much appreciated!

(I hope, I’m not reopening the ticket by replying)