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 7 of 7

Thread: bump mapping...

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2001
    Posts
    27

    bump mapping...

    Hi,

    I thought I had solved this problem already, but no... I'm trying to implement bump mapping on a model, but look at the result:
    http://pwp.netcabo.pt/0233155401/sc01.jpg

    the man is kinda black, and the bump mapping isn't very believable...

    Here is the most important code:
    MainWnd.cpp
    Normalisation Cube Map.cpp
    Normalisation Cube Map.h

    Thank you really, really a lot

    [This message has been edited by pedrosl (edited 07-08-2003).]

  2. #2
    Super Moderator OpenGL Guru dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    4,388

    Re: bump mapping...

    It may or may not be correct, off had I'd say your tangent space basis may screwed up w.r.t. your color triplets or the light source is inside the model. You gotta make sure your normal triplets in the image are compatible with the coordinate frame used for transform [normal, tangent & binormal] & your derivitives of s & t on the model, it's all gotta be on the same page. On the whole though it looks like a lot of it is at least partly correct.

  3. #3
    Senior Member OpenGL Guru
    Join Date
    Dec 2000
    Location
    Reutlingen, Germany
    Posts
    2,052

    Re: bump mapping...

    Well, i already wrote you something on flipcode about it, but here is another guess:

    Maybe you forgot to clamp the tangent/binormal to [0,1] range? If you don´t do it, it sometimes looks ok, if the normals point in the right direction, but if they point in a slightly different direction, the result gets messy (especially on complex objects like models).

    Jan.
    GLIM - Immediate Mode Emulation for GL3

  4. #4
    Junior Member Regular Contributor
    Join Date
    Jun 2000
    Location
    Portugal
    Posts
    223

    Re: bump mapping...

    Afinal ainda nao conseguiste por isso a funcionar....
    Mas estás a utilizar o código que eu te dei... Modificas-te alguma coisa?

    [This message has been edited by KRONOS (edited 07-08-2003).]

  5. #5
    Junior Member Newbie
    Join Date
    Jul 2001
    Posts
    27

    Re: bump mapping...

    exacto... como já disse no gamedev-pt, ainda não consegui ...

    não modifiquei muita coisa... mas consegues ver algum problema no código?

  6. #6
    Junior Member Newbie
    Join Date
    Jul 2001
    Posts
    27

    Re: bump mapping...

    did it already!!

    but now... there is another problem... the model doesn't look very smooth:

    http://pwp.netcabo.pt/0233155401/sc05.jpg

    why?

    [This message has been edited by pedrosl (edited 07-09-2003).]

  7. #7
    Senior Member OpenGL Pro
    Join Date
    Aug 2000
    Location
    Portsmouth, Hampshire, England
    Posts
    1,063

    Re: bump mapping...

    Because it's bump mapped?!

    Looks like your normals aren't smoothed. i.e. you're using face normals.

Posting Permissions

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