Hi, i have been looking into normal mapping, and with geometry it seems that the tangent and binormal are passed into hardware and computed from the mesh.
I was wandering if it is possible to compute the tangent and binormal on the fly in some way.
For example, in volume rendering, i would like to address a normal map, but only have object space position and normal vector.
My math is not great, is this at all possible, perhaps with partial derivitives ?
Any help appreciated
tangent and bitangents are computed using the vertex normal and texture coordinates.
take a look at this, worked fine for me: http://www.terathon.com/code/tangent.php
From looking at the code it seems that the three vertices of a triangle are used to arrive at the tangent vector.
I dont have a triangle mesh of any sort, instead just a scalar field. Would it still be possible to get a tangent vector from simply one normal and position in some manner?
Yes, this is correct. i already have methods such as iso-surfacing with lighting working for volumes with a normal worked out with central differences.
Ideally i would like to port existing techniques such as normal mapping into the volume pipeline.
My current technique uses a proxy object representation to derive the tangent space, however it would be better to derive a better tangent direction on the fly, im just not sure if this is possible with the information at hand