Results 1 to 7 of 7

Thread: Tangent Space.

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2002
    Location
    Denmark
    Posts
    12

    Tangent Space.

    Hi.

    My quest on bump-mapping has come to a dead end.

    I have met the tanget space, and I do quite well understand what it is.

    I can figure out how to generate good(well behaved) binormal/tangent vectors for my triangles...

    Any hints or pointers to articles about the subject would be greatly appreciated.

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Mar 2001
    Posts
    3,574

    Re: Tangent Space.

    Well, if you understand the concept of tangent-space, and you can generate appropriate tangent and binormal vectors, what's the problem? At this point, it is just a matter of implementation.

  3. #3
    Junior Member Newbie
    Join Date
    Jan 2002
    Location
    Denmark
    Posts
    12

    Re: Tangent Space.

    Well, the thing that has me confused is the
    fact that the tangent/binormal should be "well behaved", as Cass Everitt calls it, on page 34 of his "Mathematics of per-pixel lighting" presentation.

    I have seen a few examples that creates tangents/binormals, but they are all either spheres or quads, where it is easy to create well-behaving tangent/binormals.

    I wanted to know how to make sure the tangent/binormal is wellbehaved, when creating them for an arbitrary mesh of triangles.

  4. #4
    Junior Member Newbie
    Join Date
    Jan 2002
    Location
    Denmark
    Posts
    12

    Re: Tangent Space.

    Doh.
    In the first post where I write
    "I can figure out...",
    should have been

    "I CAN'T figure out."

  5. #5
    Senior Member Frequent Contributor
    Join Date
    Feb 2000
    Posts
    569

    Re: Tangent Space.

    Essentially, you have to make sure, you your s and t coordinates are as continuous as possible. Remember that you are trying to interpolate a Differential equation.

    So you want your s and t coordinates to vary in almost the same direction from vertices to vertices.

    Anyway, The truth is, it depends on how your texture maps are setup for your your models.

    If you look at the example Cass gave, the object in the texture is tightly pack and pieces are all over the place. So in this case, you will get section of your models where the s and t from adjacent will vary in very different directions, some times in completly opposite direction!!!

    So, if you use a smoother texturing, like the texture map for Unreal characters, where you can pretty much wrap the texture around your object, you do not need to worry about that.

    If you need to worry about it, then presentation talks about some technique, but I am not sure how to implement it.

  6. #6
    Super Moderator OpenGL Guru imported_dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    3,966

    Re: Tangent Space.

    The tangent space coordinate frame will be well behaved if it is created correctly by the artist.

    Really this just means that you probably don't want to much sheer on the coordinates and perhaps the derivative shouldn't change too much from poly to poly.

    Ideally the coordinate frame (consisting of the normal, tangent and binormal vectors) should from a nice right angled set of vectors, but this isn't always what is modelled with the application of texture. The other issue is that when you average these across polygons, each polygon has fixed linear texture derivatives which change suddenly across the polygon boundary, this is unavoidable without subdivision. However to avoid shading discontinuities you need to to average the tangent and binormal vectors, just as you average the surface normal for 'smooth' shading. So you have the inevitable situation where depending on the change in texture derivative across facets, you get a slight mismatch between the tangent and binormal vectors and their respective texture derivatives. Keeping this 'well behaved' just means minimizing the deviation, which is done when you build the model.

    Summary, worry about this when you create the content. Of course you still need to compute these vectors correctly.

  7. #7
    Junior Member Newbie
    Join Date
    Jan 2002
    Location
    Denmark
    Posts
    12

    Re: Tangent Space.

    Okay, thank you for the answers, that
    clears things abit up.

Similar Threads

  1. tangent space
    By giugio in forum OpenGL: General
    Replies: 1
    Last Post: 03-20-2012, 04:37 AM
  2. Regarding Tangent space
    By myk45 in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 01-24-2012, 08:01 AM
  3. Texture space is not tangent space: Discussion
    By ste3e in forum OpenGL: General
    Replies: 2
    Last Post: 04-28-2011, 06:03 AM
  4. how calculate tangent and binormal for tangent space ?
    By airseb in forum OpenGL: General
    Replies: 2
    Last Post: 08-09-2005, 05:12 AM
  5. Tangent-Space to World-Space
    By adamnation in forum OpenGL: General
    Replies: 2
    Last Post: 06-09-2005, 06:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean