Skip to content

Normals, tangents, and bitangents #3463

Answered by romainguy
jwwalker asked this question in Q&A
Discussion options

You must be logged in to vote

You can use our geometry library which provides utilities (SurfaceOrientation) to generate those quaternions either from a full orthonormal basis or from vertex data. And you should definitely use our implementation to ensure edge cases are properly handled. Excerpt from the API docs:

     * Clients provide pointers into their own data, which is synchronously consumed during build().
     * At a minimum, clients must supply a vertex count. They can supply data in any of the
     * following combinations:
     *
     *   1. normals only ........................... not recommended, selects arbitrary orientation
     *   2. normals + tangents ..................... sign of W determines bitang…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jwwalker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants