UVs? Normals? Seam down center of mesh

I’m using triplanar mapping to project a megascan texture onto the surface of my procedural mesh. The surface looks great with the exception of a seam down the center on one side of the mesh. The shape of the seam follows the triangles in the mesh exactly. What could this be a result of? Bad UV or normals calculations? Any advice would be greatly appreciated.

Photo of my issue:

1 Like

Triplanar doesn’t use UVs, so it can’t be that.

But it does depend how you did the mapping.

If you used the standard ‘world aligned normal’ node, it could be that, as it has problems with normal rotation.

1 Like

I’m not currently using the world aligned normal node. I have been following a tutorial series by Ben Cloward on YouTube for triplanar projection. Here’s how I have that implemented:

My Material:

The triplanar projection normals material function:

I then collapsed his swizzling logic into another material function to clean up some of the spaghetti:

1 Like

I haven’t tried Ben’s functions.

Give it a go with the conventional nodes. Not as a solution, but to see if there’s something up with these functions.

I think Ben’s swizzle function gets around the problem with the ‘world aligned normal’ node :slight_smile:

1 Like

Here’s the result from the “WorldAlignedNormal” node. I don’t think I see any difference.

I’m honestly at a total loss over with this haha

1 Like

Can you show the normal texture? As a 2D image, doesn’t have to be full res… Does it have a border in it?

1 Like

Sure! It’s one of the megascans (Dry Trampled Sand) as far as I can tell, there is no border.

1 Like

I get this with the typical node

There is a seam, but no gap like yours…

Hmm, Looks like this artifact is a result of of this function in my code:

UKismetProceduralMeshLibrary::CalculateTangentsForMesh(Vertices, Triangles, UV0, Normals, Tangents);

I commented it out and the seam disappeared, albeit at the cost of my shadows looking considerably worse.

I removed UV0 from the the function and replaced it with an empty argument, now the seam/ gap is gone and the shadows look great! Thanks for all the help!

UKismetProceduralMeshLibrary::CalculateTangentsForMesh(Vertices, Triangles, {}, Normals, Tangents);
1 Like