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

Thread: Two texture on a model with different transparency

  1. #1
    Junior Member Newbie ajith srikukan's Avatar
    Join Date
    May 2011
    Location
    Sri Lanka
    Posts
    3

    Two texture on a model with different transparency

    Hi all,

    I followed the 3ds loader tutorial to create my application that loads a 3D face with texture from 3ds file. Now I want to add another texture on top of the previous texture with some transparency so I can reflect some new patters on the model.

    Can I have overlapping texture on a model with different transparent level? How can I achieve this?

    When I call the 2nd texture with transparent level it just replaces the first texture
    glBindTexture(GL_TEXTURE_2D, LoadBitmap("texture2.bmp");

    Thanks in advance.

  2. #2
    Senior Member OpenGL Pro BionicBytes's Avatar
    Join Date
    Mar 2009
    Location
    UK, London
    Posts
    1,171

    Re: Two texture on a model with different transparency

    Either you can use a new material shader to handle multiple textures and combine them in some fashion, or you may have to enable GL blend and use a multi-pass approach to render the model.

  3. #3
    Junior Member Newbie ajith srikukan's Avatar
    Join Date
    May 2011
    Location
    Sri Lanka
    Posts
    3

    Re: Two texture on a model with different transparency

    Thanks a lot BionicBytes.
    i did it using multi-pass approach[1][2].

    when the textures added together the color of the original texture changes, it can be solved by adjusting contrast level[3]

    some related links
    [1]http://gritche.chez-alice.fr/OpenGL/...esb/multi.html
    [2]http://www.yaldex.com/game-programmi...8lev1sec6.html
    [3]http://www.opengl.org/discussion_boa...;Number=284362

Posting Permissions

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