Motion blur ghosting when rendering submeshes with unique transforms

Hello!

I have my own SceneProxy class (for my own component) which is derived from FPrimitiveSceneProxy. In my DrawDynamicElements I construct FMeshBatch and construct multiple FMeshBatchElement objects for it (these correspond to my submeshes). For each submesh I have a unique transform. Here’s how it is rendered:

DrawDynamicElements(FPrimitiveDrawInterface* PDI, const FSceneView* View) {

FMeshBatch Mesh; ..... set vb, vertex factory and other stuff...
FMeshBatchElement& BatchElement = Mesh.Elements[0]; .... set ib, counts here..

// set transform for this submesh
FMatrix TransformMatrix = MyTransform * GetLocalToWorld();

BatchElement.PrimitiveUniformBuffer = CreatePrimitiveUniformBufferImmediate(TransformMatrix, GetBounds(), GetLocalBounds(), false);

PDI->DrawMesh(Mesh);
}

Objects are correctly placed in the scene, but I experience a really weird ghosting effect when I move them in the editor using gizmos (either translate or rotate). If I disable motion blur in editor ghosting goes away. Has anyone encountered this problem or maybe can suggest a solution / work around?

Thanks.

Would be nice to know how to solve this issue. For the moment I solved this by baking transforms into vertex positions for each submesh…

The editor motionblur is not always working like it should be. We want to not have any camera motionblur but we want to have object motionblur. When using Matinee we also change this behavior to be more game like.
TemporalAA also shares the motionvectors with motionblur which complicates things further.
Objects that gets moved in the editor normally get partly recreated but we try to maintain some state (importan for motionblur as the former frame state decides over the amount of motionblur).
Your case might be different or conntected to this issue. To see clearer what issues you have: toggle antialiasing and/or motionblur and try in standalone game and in editor.

It shows up in either standalone or editor. It goes away with motionblur turned off. We solved this problem by baking transformation into vertices on load. Also, thanks for your explanation.