View Full Version : volume rendering - working out tangent space
09-14-2006, 03:34 AM
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
09-14-2006, 04:05 AM
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
09-14-2006, 04:25 AM
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?
09-14-2006, 05:22 AM
in volume rendering, i would like to address a normal mapIn volume rendering normal map is a 3-d texture that defines normal vector at each voxel. So you don't need any tangents or even per-vertex normals.
Tangents are only needed if you want to apply 2-d normalmap to surface in such way that texture coordinates will change directions.
So if you need tangents for volume rendering then I assume you want to apply 2-dimensional normal map to 3-dimensional volume. Is that right?
09-14-2006, 07:20 AM
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
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.