Procedural mesh is black when metallic

While developing a nine slice mesh component, I came across the issue that materials which are metallic are rendered as black on the procedural copy.


(left: regular static mesh, right: procedural mesh copy)

The normals are identical, as are the base color, metalness and roughness.

32d8644bba34faf0990a595dfa6c67f3b148c450.jpeg

When the material is fully non-metallic, the visuals match.

4990f205f4711317ae6a6029c9a349c4c9461b7b.jpeg

Any idea what the matter is?

Gonna go ahead and give this a little bump - the issue is still unresolved.

Can you post screenshots of the material setups?

Oh, I didn’t get a notification that someone replied! My bad. The material is as basic as can be:

I still have no idea what’s causing the problem.

Do you have a reflection capture actor and a skylight on the level?

Edit: I’m blind, you do have. Have you tried updating reflections?

I have, to no avail.

That’s incredibly weird. Have you tried viewing the assets in a new map?

Just tried that, still as black as before. Is there a piece of mesh information that’s used for metalness that might be missing / is copied incorrectly in the procedural mesh?

FYI, the reflections visualization mode works fine.

What do your vertex normals look like? Are they also a direct copy or computed?

I copy them using &SourceMesh->RenderData->LODResources[0].VertexBuffer->VertexTangentZ(). I tested that previously using the world normal visualization mode (see OP), but testing it now using PixelNormal in the material, I see that something’s wrong:


(left: source mesh, right: procedural copy)


(from the other side)

4c7e86969c456cb74b50f7a4c55a8d065f2cd113.jpeg

I got that way of retrieving the vertex normal data from this answer, but maybe it’s not correct, or I’m doing it wrong. Ideas?

Did you ever find a solution to this?

I did, but I can’t remember what it was. I reckon there was something wrong with the way I copied the normals, judging by my last post. I’d have to check out the source code to see how I ended up copying the normals, but I’m on vacation for two weeks.