Add tangent generation to stride dynamic mesh

If you use a material with normal mapping (AKA bump mapping) the mesh needs to have tangent data otherwise it will be black.

As reported here .

Stride has a built in tangent calculation, which it uses on primitive meshes.

Feature request is to add the same calculation as an option on DynamicMesh nodes
It’s not too complex, code looks like this (3.5 MB)

Here’s a working patch demonstraton. Its a modification of the ‘dynamic model from noise’ helppatch with UV coordinates and the tangent fix.
Note that it references directly Stride.Graphics.dll
Includes textures for a test material for normal mapping

If it’s working it should look like this

Texture source


Yes, very good point. I’ve already added a few things regarding tangents for a project in this branch: GitHub - studiobruell/VL.StandardLibs at feature-merge-compiled


Nice, hope to see it in the StandardLib soon.

In case any future VL.PolyTools user stumbles across this thread in future I added a hidden ‘Calculate Tangents’ option to the PolygonPlane and PolygonExtrude nodes. And new helppatches about the entire topic of texturing these 3D poly things.


This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.