Jump to content

[SOLVED] How to convert tangent,normal and binormal vectors into a quaternion


photo

Recommended Posts

Hello,

I want to create a ObjectDynamic which uses the deferred pass from the built in mesh base material.

The vertex shader in core\shaders\mesh\common\vertex.h requires the tangent space to be encoded as quaternion.

How can I produce such a quaternion? I wonder if a function exists which does this job for me, either in UUSL or inside the C#/C++ Mathlib or in Unigine Script.

Many thanks

Helmut

Link to comment

Hello sweetluna,

thank you very much, I will try that.

If I'm understanding the docs correctly the normals will be autogenerated as well - which in theory could become an issue, because they are provided by the content creation tool. Anyways, the ObjectMeshDynamic is a very good point to start.

Best regards

Helmut

Link to comment
  • bmyagkov changed the title to [SOLVED] How to convert tangent,normal and binormal vectors into a quaternion
×
×
  • Create New...