Results 1 to 4 of 4

Thread: Bump mapping using Ray tracing

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2003
    Location
    INA
    Posts
    9

    Bump mapping using Ray tracing

    Hi guys, I'm a very begginer in computer graphics programming. Quite familiar with visual c++ but never even once write an opengl code. Now I have a school project to make an opengl program which implement bump mapping using ray tracing on mathemathical 3D object. I try to explain the problem as clear as possible with my limited English.

    A few years ago someone in my shool has already made it using classic height field bump mapping method - if you already knew it, just pass to next paragraph. This method calculates normal vectors of object's surface as new height field. Then this new surface's normal is used to calculate diffuse and specular lightning. This calculation is implemented on every pixel on the object's surface.

    But this method has a serious weakness. If the 3D object is maped on 2D surface, the effect doesn't work at the edge of the object at all (it's still perfectly smooth, since it's a mathemathical one). This is caused the method only change the normal vectors, and the bump effect is completely an eye illusion.

    The project objection is to make bump mapping method that totally eliminates that weakness.

    Is there anyone here has a concept how the algorythm will work? Or perhaps there's already a reference for this method?

    Thx.

  2. #2
    Senior Member Regular Contributor
    Join Date
    Apr 2003
    Location
    Toulouse, France
    Posts
    133

    Re: Bump mapping using Ray tracing

    bump mapping just modify the normal of the surface. the geometry is not moved so the edge of the object are still flat.
    the effect you want is called displacement mapping.
    it work with an height field too but modify the normals and the fragments position.

    the current opengl hardware won't help you ( http://www.opengl.org/discussion_boa...ML/009932.html )

    if you use ray tracing, you have to implement an intersection method which take care of the displacement... not very easy

  3. #3
    Senior Member OpenGL Guru Relic's Avatar
    Join Date
    Apr 2000
    Posts
    2,450

    Re: Bump mapping using Ray tracing

    Bumpmapping is only perturbing normal vectors. The geometry doesn't change, if it's flat, it remains flat.
    Sounds like you need to implement displacement mapping.
    The simplest method is to generate a heavily refined geometry using the base geometry displaced by the height informations on the texture.
    Raytrace the result and you're done.
    OpenGL is not involved, except if you want a fast preview of the mesh.

    edit: Perfect double post.

    [This message has been edited by Relic (edited 07-22-2003).]

  4. #4
    Junior Member Newbie
    Join Date
    Jul 2003
    Location
    INA
    Posts
    9

    Re: Bump mapping using Ray tracing

    Wow, I never thought that it'll be that complicated. *sigh*
    Anyway, thanks a lot for your help guys. I really really appreciate it.

Similar Threads

  1. opengl bump mapping (normal mapping) problem with VBO and GLSL
    By emrekaya413 in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 03-29-2018, 03:52 AM
  2. Bump mapping
    By debinair in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 11-12-2013, 08:02 AM
  3. Some Bump Mapping Questions (cube-mapping)
    By Whooster in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 01-14-2012, 11:55 PM
  4. Bump mapping.
    By glAntony in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 09-11-2003, 05:08 AM
  5. Discussion about plastic bump mapping ...ooops ...dot3 bump mapping
    By raverbach in forum OpenGL: Advanced Coding
    Replies: 23
    Last Post: 03-31-2003, 02:31 PM

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