Timeline for Simplst possible TBN-Matrix giving weird results
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 27, 2016 at 11:15 | vote | accept | RenX | ||
Aug 25, 2016 at 19:12 | comment | added | Stormwind | Hmok, yes the order must be correct. And it's always good to ensure it is homogenous throughout the application. Ie. if you try with your other 3D models and normal textures, they all behave well :-). | |
Aug 25, 2016 at 18:17 | answer | added | RenX | timeline score: 1 | |
Aug 25, 2016 at 18:17 | comment | added | RenX |
Found the problem. The TBN apparently needs to be constructed as the following: mat3(worldspaceNormal, biTangent, tangent); . So tangent and normal need to be flipped. Don't know why, maybe a Vulkan thing.
|
|
Aug 25, 2016 at 17:23 | comment | added | Stormwind | Ok.. (nm lookat). I just wonder if you should have worldspaceNormal.yxz or worldspaceNormal.zxy everywhere Plus that the normals in the texture must fit accordingly. You have the .xyz components correctly, not such that for example .y is omitted? | |
Aug 25, 2016 at 16:06 | comment | added | RenX | Yes, green is usually up, its just the lookAt matrix with z being up. | |
Aug 25, 2016 at 12:45 | comment | added | Stormwind | Red (.x) is up in world space? Is that common in opengl? TBN vs -> ps looks like mine usually (in HLSL), but ofc i use mul() instead of *. But i guess i'd expect green (.y) to be up? | |
Aug 24, 2016 at 20:18 | answer | added | Andreas | timeline score: 0 | |
Aug 24, 2016 at 18:50 | history | asked | RenX | CC BY-SA 3.0 |