Material sloping not working on UProceduralMeshComponent

Hi Guys,

I have spent the past week re-inventing (mostly for fun) the wheel and creating voxel worlds.

Currently i have just finished marching cubes :slight_smile: quite fun, however
the material is killing me, i am trying to blend materials, more specifically on a slope so its rock on the sides

the below image I have tried to reduce it to just the world aligned blend which on the left the preview is fine

but the render itself it refuses to blend anything on the sides

I have tried about 6 different methods and all the same. I have tried ommiting normals/tangents from the create CreateMeshSection_LinearColor and tried about 6 different ways to generate normals and tangents

Am I barking up the wrong tree, is there something obvious I am missing?

well sorted it, clearly what i was doing with normals and tangents wasnt correct

ended up using

UKismetProceduralMeshLibrary::CalculateTangentsForMesh(_verts, _tris, _uv, _normals, _tangents);

before i called the create mesh section just and that fixed it instantly, material needs some work now but at least it functions

leaving this here for anyone else :slight_smile:

1 Like