Filling vertex color with a mask doesn't fill fillcolor but maskcolor to its LOD models incorrectly

It seems that this is caused just by a typo in MeshPaintHelpers::SetInstanceColorDataForLOD().

void MeshPaintHelpers::SetInstanceColorDataForLOD(UStaticMeshComponent* MeshComponent,.....
				// Initialize vertex buffer from given color
				ComponentLodInfo.OverrideVertexColors = new FColorVertexBuffer;
				ComponentLodInfo.OverrideVertexColors->InitFromSingleColor(MaskColor, RenderData.GetNumVertices());

I guess InitFromSingleColor(MaskColor...) is wrong and it should be InitFromSingleColor(FillColor...).

JFYI, As a test, I shelved a super small CL to fix it on 4.21. (4575538)

Steps to Reproduce
  1. Download the attached project and open it.
  2. Put SM_Sphere_test01 onto the scene.
  3. Go to Paint mode (Shift 2)
  4. Set PaintColor to (1.0, 0.0, 0.0, 0.0)
  5. Uncheck Red/Green/Blue channels
  6. Confirm that "LOD Model Painting" is unchecked.
  7. Click "Fill" icon
  8. Change "Color View Mode" to "Alpha Channel"
  9. Check "LOD Model Painting" and change the value to 1, 2, 3
  10. You can see the alpha channel of LOD1, 2 is white(1.0). (We expect the value is 0)
  11. Change "Color View Mode" to "RGB Channels"
  12. You can see the RGB channels of LOD 1, 2 is black (We expect the color is white).

Have Comments or More Details?

There's no existing public thread on this issue, so head over toAnswerHub just mention UE-66702 in the post.

Login to Vote

ComponentTools - Editor Properties
Affects Versions4.204.21
Target Fix4.22
Fix Commit4627582
CreatedNov 19, 2018
ResolvedDec 4, 2018
UpdatedDec 4, 2018