Edit: seems like there is no problem with the handedness after all, but rather with me not properly understanding tangent space Sorry for capturing the thread, this errant is unrelated..
The method in the paper is especially nice because it is SIMD/SoA vector friendly. With conventional methods that are robust, you would check if the auxiliary vector you chose (e.g. (0,1,0)) is by accident just the vector about which you construct your basis, then find the min_element of that vec3, add 1 to that and renormalize. Finding min_element is however not SIMD friendly because you have to unpack the SoA vec3 for that.
Just wanted to mention for a warning that the robust methods unfortunately don't guarantee that the basis has a certain handedness, which is however necessary for many tangent space operations. I had up until now always used Hughes' and Möller's method and never came across this problem (I e.g. used it for AO rays where the handedness doesn't matter). Will need to find a way to work around this..
Hughes and Möller:
A picture is worth a thousand words.
Who is online
Users browsing this forum: No registered users and 1 guest