Re: How to set up a 3D texture with following settings



henryjoye@xxxxxxxxx wrote:

Dimensions: dim[0], dim[1], dim[2]
Texture values: we need to store values in channel R and
channel A,

Use GL_LUMINANCE_ALPHA as format (there is no RED_ALPHA texture
format), with GL_MODULATE texture mode and
glColor3f(1.0,0.0,0.0);

the value range for each channel is (0,
dim[0]*dim[1]*dim[2]) (it is the multiplication of size of data
in three directions).

Texel values are either 8, 12 or 16 bits (integer) per channel,
or 32 bits per channel for a float texture.

512 = 2^9
512^3 = (2^9)^3 = 2^9*3 = 2^27, so you need a 32 bits per channel
texture, which leaves you with float textures.

But there's also another problem: 512^3 * 8 bytes = 1GiB. Only
professional grade cards have that much memory. Unless you got
one of the latest and biggest Quadro cards I doubt that this
will work. And even if so the fill rate will abyssmal, the whole
memory must be sparsely accessed, a chache trash nightmare. If
you are upon high resolution volume date rendering better choose
one of the implicit tesselation approaches, or get some
dedicated volume raycaster hardware (used in medical and
geodesic applications).

Usually 3D textures are 64x64x64 max, oftenly a lot smaller.

Wolfgang Draxinger
--
E-Mail address works, Jabber: hexarith@xxxxxxxxxx, ICQ: 134682867

.



Relevant Pages

  • How to set up a 3D texture with following settings
    ... I need to set up a 3D texture using glTexImage3D, ... we need to store values in channel R and channel A, ... My question is how to set each parameter of glTexImage3D to create ...
    (comp.graphics.api.opengl)
  • Re: How to return Texture Coords at mouse x y posiiton in openGlut/openGL ?
    ... > first half of g channel and for v on half of g and b ... > use this texture to draw you object (textured, ... > without anti-aliasing) in the back buffer. ... If you can store the scene/dataset hierarchically the intersection ...
    (comp.graphics.api.opengl)
  • Re: How to return Texture Coords at mouse x y posiiton in openGlut/openGL ?
    ... First create a texture where you encode u and v in say r channel and ... first half of g channel and for v on half of g and b ... without anti-aliasing) in the back buffer. ... If you can store the scene/dataset hierarchically the intersection ...
    (comp.graphics.api.opengl)
  • Re: How to return Texture Coords at mouse x y posiiton in openGlut/openGL ?
    ... First create a texture where you encode u and v in say r channel and ... first half of g channel and for v on half of g and b ... without anti-aliasing) in the back buffer. ... the drawback of this method is you need to draw your scene twice. ...
    (comp.graphics.api.opengl)
  • Re: multielement textures
    ... > need to use a dot product operator to extract out the individual ... The dot product operator burns up a texture stage, ... > most cards where you have to do FFP that leaves only a single texture ... For the alpha channel, ...
    (microsoft.public.win32.programmer.directx.graphics)