Description

This is a regression tested in //UE4/Release-4.27 CL#18319896

Update Mesh Section incorrectly sets vertex colors for a Procedural Mesh. The closer a colors R, G, or B value is to 1.0 or 0.0 the more similar the values are between the updated mesh section and the non-updated section.

Steps to Reproduce
  1. Create or open any project
  2. Create and open a new Material named M_VertexColor
  3. Create a Vertex Color node then connect it to Base Color on the Result Node
  4. Save and close the material
  5. Create a New Blueprint Actor:
    1. [Link Removed] into the Construction Script of the Actor then right click the missing variables to create new ones OR follow these steps:
      1. Create 2 Vector Array variables named Verts1 and Verts 2
      2. Create 2 Integer Array variables named Tris1 and Tris2
      3. Create 2 Linear Color Array variables named Colors1 and Colors2
      4. Create a Linear Color variable named VertColor
        1. Set VertColor to R 0.5, G 0.0, B 0.0, A 0.0
      5. From the 'Construction Script' node drag off to create a 'Sequence' node
      6. Get a 'Set Verts1' connecting it to the 'Then 0' execution pin
      7. Create a 'Make Array Node' add 2 more elements and connect it to the input pin on 'Set Verts1'
      8. Set the elements to:
        1. [0] 100.0, 0.0, 0.0
        2. [1] 100.0, 100.0, 0.0
        3. [2] 0.0, 100.0, 0.0
      9. Get a 'Set Tris1' connecting it to the 'Set Verts1' node
      10. Create a 'Make Array' node add 2 more elements and connect it to the input pin on 'Set Tris1'
      11. Set the elements to [0] 0, [1] 2, [2] 1
      12. Get a 'Get VertColor' node then create a 'Make Array' node off of it
      13. Add 2 Elements then connect 'Get VertColor' to each
      14. Get a 'Set Colors1' node then connect the 'Make Array' node to the Colors1 input pin then connect up the execution pin
      15. Off of 'Set Colors1' create an 'Add Procedural Mesh Component' node and Split the Transform Structure Pin
      16. Promote the Return Value to PMC1
      17. From the 'Add Procedural mesh Component' node create a 'Create Mesh Section' node
        1. Set Target to PMC1
        2. Set Vertices to Verts1
        3. Set Triangles to Tris1
        4. Set Colors to Vertex Colors
      18. Drag off of 'Create Mesh Section' and create a 'Set Material' Node
        1. Set Target to PMC1
        2. Set Material to M_VectexColor
      19. Copy everything after the 'Sequence' and paste it below
      20. Connect the pasted content to 'Then 1' of the 'Sequence' node
      21. In the 'Then 1' flow replace:
        1. Verts1 with Verts2
          1. Verts2 make array:
            1. [0] 100.0, 0.0, 0.0
            2. [1] 0.0, 0.0, 0.0
            3. [2] 0.0, 100.0, 0.0
        2. Tris1 with Tris2
          1. Tris2 make array: [0] 0, [1] 1, [2] 2
        3. Colors1 with Colors2
        4. Promote the return value of the 'Add Procedural Mesh Component' node to PMC2
        5. Replace PMC1 with PMC2
      22. At the end of the 'Then 1' sequence add an 'Update Mesh Section' node
        1. Set Target to PMC2
        2. Set Vertices to 'Verts2'
        3. Set Vertex Colors to 'Colors2'
  6. Compile, save, and close the blueprint
  7. Place the blueprint actor in the world and move the camera so you can see the Red Square.

Expected Results:
The square is one solid color.

 

Actual Results:
Half of the square is darker than the other half. The closer the R value is to 1.0 or 0.0 the more alike the 2 halves are.

Have Comments or More Details?

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

2
Login to Vote

Fixed
ComponentUE - LD & Modeling - Modeling Tools
Affects Versions5.0.2
Target Fix5.1
Fix Commit22253152
Main Commit22264087
Release Commit22253152
CreatedJun 21, 2022
ResolvedSep 29, 2022
UpdatedNov 2, 2022
View Jira Issue