Description

This is a not a regression.
Tested in UE5(Binary), UE4(Binary), and UE5 Main(P4).

Procedural Meshes have the option for CPDs listed in their details panel under Rendering > Advanced >Custom Primitive Data, but the CPD doesn't work with Procedural Meshes. Additionally, there isn't any documentation suggesting that CPD shouldn't work with Procedural Meshes OR that it only works with Static Meshes.

According to Ryan S. "The code for ProceduralMeshComponent (and SceneProxy) is entirely contained in ProceduralMeshComponent.cpp and I don't see any reference to Custom Primitive Data so it's probably not supported."

Steps to Reproduce
  1. Create a Custom Primitive Data Material
    1. Create a Material
    2. Add a Vector4 (Press 4 and left-click)
    3. Select the Vector4 then Enable Use Custom Primitive Data
    4. Connect the Vector4 to the Base Color
  2. Create a Procedural Mesh Actor with the CDP material
    1. Create a blueprint actor
    2. Add a Procedural Mesh component to the Actor
    3. In the Construction Script create a 'Create Grid Mesh Welded' node
    4. From the 'Create Grid' node connect it to a 'Calculate Tangents for Mesh' then connect the Triangles, vertices, and UVs to the 'Calculate' node
    5. From the 'Calculate Mesh' node connect a 'Create Mesh Section(Procedural Mesh)' node
    6. Connect up the Normals and Tangents from the 'Calculate Mesh' node to the 'Create Mesh' node
    7. Connect Triangles, Vertices, and UVs from the 'Create Grid' node to the 'Create Mesh' node
    8. From the 'Create Mesh' node connect it to a 'Set Material(Procedural Mesh)' node then assign the CPD material to Element 0
  3. In the Event Graph connect a 'Set Custom Primitive Data Vector 4(Procedural Mesh)' node to Event BeginPlay
  4. Split the 'Value' structure pin on the 'Set Custom Primitive' node
  5. Set Value X to 1.0
  6. Place the Actor in the World then Play In Editor

Expected Results:
The procedural mesh turns red during runtime.

Actual Results:
The procedural mesh remains black.

Additional Note - CPD are meant to only work at runtime not compile-time

Have Comments or More Details?

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

3
Login to Vote

Fixed
ComponentUE - LD & Modeling - Modeling Tools
Affects Versions5.0
Target Fix5.0
Fix Commit18674178
Main Commit18679670
Release Commit18674178
CreatedDec 16, 2021
ResolvedJan 20, 2022
UpdatedJan 26, 2023