Steps to Reproduce

A licensee reported that the world normal is not consistent on a skeletal mesh with SkinCache recompute tangent enabled. You could see the issue on the picture below. I upload the mesh in attachment.

The repro steps are:

  1. Create a project and enable the skin cache(Support Compute Skin Cache) in project settings.
  2. Import the Cloth.fbx as skeletal mesh.
  3. Drag the Cloth into the scene and change to World Normal in the buffer visulaization.
  4. Toggle the recompute tangent in the LOD0 section of the Cloth mesh and see the world normal.

I did some debug and suspected the issue is because of the following shader codes in RecomputeTangentsPerTrianglePass.usf

Orientation = (cp > 0) ? 1 : -1;
// Multiply by additional flip if the triangle had it's tangent space inverted
Orientation *= Corner[0].OriginalOrientation;

 

I did some change and it looks fine for now.
Orientation = (cp > 0) ? Corner[0].OriginalOrientation : -1 * abs(Corner[0].OriginalOrientation);

[Image Removed][Link Removed]

Have Comments or More Details?

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

0
Login to Vote

Backlogged
ComponentUE - Graphics Features
Affects Versions4.275.0
CreatedJan 19, 2022
UpdatedJan 24, 2024
View Jira Issue