Hi, after updating to 5.6 we noticed that with lumen HWRT some skeletal meshes would flicker in and out of the ray tracing scene every other frame. We found that this occurs on any skeletal mesh with a disabled section and can be reproduced with the steps attached to this post.
The cause of this appears to be changes to SkeletalRenderGPUSkin.cpp in CL 44391072. Prior to 5.6 any mesh with a disabled section would be removed from/never added to the ray tracing scene due to its null vertex buffer. In that CL a work around was added to instead use the static PositionVertexBuffer for disabled sections so that those skelmeshes would get added to the RT scene. However, on subsequent frames the vertex buffer for each section needs to be updated. The new vertex buffer data for the disabled section will always be null and cause it to be removed from the scene again. It will then get added and removed on each subsequent frame due to the changes in CL 44391072 and this vertex buffer update logic.
As a work around we have added a change to the code updating sections with new vertex buffer data in UpdateRayTracingGeometry_Internal in SkeletalRenderGPUSkin.cpp. If the new vertex buffer data is null then we use the static PositionVertexBuffer instead to be consistent with the changes in CL 44391072. This seems to be sufficient as a temporary fix for now. Based on the TODOs in this function it sounds like the plan is to allow sections to have null vertex buffer without removing them from the scene which should also resolve this issue. However, I’ve not noticed any changes to it in more recent CLs and haven’t seen the issue reported elsewhere so thought it was worth making you aware of it.
Thanks
Innes Brown