Download

Vertex paint not visible in viewport/capturecomponent unless mesh is selected on world outliner

Hello!

I’m trying to color my static meshes using vertex painting with random colors and then store it using ScreenCapture2D. However, I’m seeing a weird behavior. The vertex painting is successful, but my capturecamera or the gameclientviewport is not able to see the paints unless I select the mesh in editor.

SO, it’s something like this
This figure shows setup after vertex painting (Note that I’m not able to see any paint)

](filedata/fetch?id=1876245&d=1617237553)

This shows the same setup after I’ve selected/clicked on few meshes in the editor.

](filedata/fetch?id=1876246&d=1617237822)

What could be causing this issue? I am not able understand why/how selecting the mesh, shows the paint color.

I’d appreciate any inputs regarding this.

UE4.25

Cheers!

To add to the above, I’m changing the FEngineShowFlags of the viewport to see the painted changes as follows:



ShowFlags.SetMaterials(false);
ShowFlags.SetLighting(false);
ShowFlags.SetBSPTriangles(true);
ShowFlags.SetVertexColors(true);
ShowFlags.SetPostProcessing(false);
ShowFlags.SetHMDDistortion(false);
ShowFlags.SetTonemapper(false);
GVertexColorViewMode = EVertexColorViewMode::Color;


Am I missing anything here?