Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: volume rendering - working out tangent space

  1. #1
    Intern Newbie
    Join Date
    Jan 2004
    Location
    UK
    Posts
    46

    volume rendering - working out tangent space

    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

  2. #2
    Member Regular Contributor
    Join Date
    Jul 2005
    Location
    Germany
    Posts
    311

    Re: volume rendering - working out tangent space

    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

  3. #3
    Intern Newbie
    Join Date
    Jan 2004
    Location
    UK
    Posts
    46

    Re: volume rendering - working out tangent space

    Thanks,

    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?

  4. #4
    Senior Member OpenGL Pro k_szczech's Avatar
    Join Date
    Feb 2006
    Location
    Poland
    Posts
    1,119

    Re: volume rendering - working out tangent space

    in volume rendering, i would like to address a normal map
    In 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?

  5. #5
    Intern Newbie
    Join Date
    Jan 2004
    Location
    UK
    Posts
    46

    Re: volume rendering - working out tangent space

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •