Results 1 to 4 of 4

Thread: 3D Textures and automatic texture coordinate gener

  1. #1
    Senior Member Regular Contributor
    Join Date
    Sep 2008
    Posts
    139

    3D Textures and automatic texture coordinate gener

    Hello there,
    i have programmed a simple volume renderer. At this time
    it uses the 2D texture mapping for creating the volume.
    Now i want to implement 3D texture mapping. does anyone has experience with it ? I've read on the internet some things about
    this topic. but it never has been explained in detail how to get the texture's created out of the volume data and what happens when
    the camera rotates. In 2D texture mapping you have to switch the
    x y and z axis acoording to the view vector. In 3D texture mapping
    you have one 3D texture that builds the model. but it is also said the textured slices will be build perpendicular along the viewvector inside a cube.
    Can some one explain it to me , please ?

    This is a code snippet from ATI's example of a very simple
    direct volume rendering. You can find the example here
    http://atitech.ca/developer/sdk/Rade...eonVolVis.html

    Code :
    glBindTexture(GL_TEXTURE_3D_EXT,names[0]); 
      glTexParameteri(GL_TEXTURE_3D_EXT,GL_TEXTURE_WRAP_S,GL_CLAMP_TO_EDGE_EXT);    
    glTexParameteri(GL_TEXTURE_3D_EXT,GL_TEXTURE_WRAP_T,GL_CLAMP_TO_EDGE_EXT);    
    glTexParameteri(GL_TEXTURE_3D_EXT,GL_TEXTURE_WRAP_R_EXT,GL_CLAMP_TO_EDGE_EXT);    
    glTexParameteri(GL_TEXTURE_3D_EXT,GL_TEXTURE_MAG_FILTER,GL_LINEAR);    
    glTexParameteri(GL_TEXTURE_3D_EXT,GL_TEXTURE_MIN_FILTER,GL_LINEAR);    
    glTexImage3DEXT(GL_TEXTURE_3D_EXT,0,GL_ALPHA8,tWidth,tHeight,tDepth,0,GL_ALPHA,
                        GL_UNSIGNED_BYTE,image1);

    I know I have to load the 3d texture extension. Thats not the question here.


    greetings,
    lobbel

  2. #2
    Senior Member Frequent Contributor plasmonster's Avatar
    Join Date
    Mar 2004
    Posts
    739

    Re: 3D Textures and automatic texture coordinate gener

    Hi,

    Are you wanting to texture a 3D model, or generate one from a field of some sort?

    Lots of interesting ways to generate texture coordinates in 3D. Pretty much any mapping you can imagine is possible now.

    Great course on the general subject (and their book is a must have):
    http://www.vrvis.at/via/resources/co...graphics-2004/

  3. #3
    Senior Member Regular Contributor
    Join Date
    Sep 2008
    Posts
    139

    Re: 3D Textures and automatic texture coordinate gener

    Hello thanks for your reply. I've already seen these papers.
    They are about ray casting and other iso surface generation
    algorithms. In volume rendering with 3D texture you have a single 3d texture that contais all voxel data. Then you have to build slices perpendicular to the view vector. And thats my problem.
    I have seen some examples but i yet dont know how to compute the texture coordinates for those slices and so on.
    2D texture volume rendering works fine. i have goo results with it. But of course it has disadvantages. i.e when switching between to texture stacks.

    greetings,
    lobbel

  4. #4
    Junior Member Newbie
    Join Date
    May 2008
    Posts
    10

    Re: 3D Textures and automatic texture coordinate gener

    I'm also interested in generating these perpendicular slices.

    Can anyone offer some insight on this?

    EDIT:

    The answers lie with the glTexGen command, i think.

Similar Threads

  1. Automatic Texture-coordinate Generation
    By Cuaitl in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 09-08-2008, 12:51 AM
  2. Automatic Texture Coordinate Generation in fragment Program
    By unreal in forum OpenGL: Advanced Coding
    Replies: 6
    Last Post: 04-18-2005, 01:16 PM
  3. automatic texture-coordinate generation
    By gemelli_d in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 07-08-2004, 04:17 AM
  4. Automatic texture coordinate generation
    By GameMaker in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 12-07-2002, 08:17 PM
  5. Automatic Texture-Coordinate Generation Problem
    By lsdi in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 02-03-2002, 10:54 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