Description

The original reported behavior called out that filling individual channels did not apply to LODs when LOD Model Painting = False.
With changes implemented in 4627582, the initial fill will reach LODs; subsequent fills will not.

Original notes from Nori:
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().
(Engine\Source\Editor\MeshPaint\Private\MeshPaintHelpers.cpp)

void MeshPaintHelpers::SetInstanceColorDataForLOD(UStaticMeshComponent* MeshComponent,.....
			else
			{
				// 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 VertPaint_Sample 4.22
  2. Open VertPaint_Sample 4.22 in UE4Editor
  3. Within the Modes Panel, click the Paintbrush (enter Paint Mode)
  4. Make the following changes:
    • Set Color View Mode to RGB
    • Beneath Vertex Painting, disable Blue, Green, and Alpha
    • Confirm LOD Model Painting is disabled
    • Set Paint Color to (R=1, G=0, B=0, A=0)
  5. Select Fill with Selected Color (beneath the Colors button at the top of the dialog)
  6. Enable LOD Model Painting
  7. Scrub the LOD value through all three LODs (they should be red)
  8. Disable LOD Model Painting.
  9. Disable the Red Channel
  10. Enable the Green Channel
  11. Set Paint Color to (R=0, G=1, B=0, A=0)
  12. Select Fill with Selected Color (this will add green to the existing red color, making yellow)
  13. Enable LOD Model Painting. Scrub the LOD value through all three LODs

Result:
LOD0 is filled with Yellow.
LODs 1 and 2 are filled with Red

Expected Result:
All LODs are Yellow

Have Comments or More Details?

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

0
Login to Vote

Fixed
ComponentTools
Affects Versions4.204.214.22
Target Fix4.23
Fix Commit7107557
Main Commit7107564
Release Commit7107557
CreatedNov 19, 2018
ResolvedJun 20, 2019
UpdatedJul 8, 2019