3D Textures

Started by
14 comments, last by robirt 21 years, 8 months ago
*burp*
Advertisement
how does such and such opengl thing work? Try the spec it tells you everything, thats the point. Google is great if you''re not sure exactly what you''re after, but knowing GL_TEXTURE_3D is part of the spec you should start there.

I think thats what siaspete was trying to say about ''levels'' - if you can find the correct and primary source of info on OpenGL, then you already have the info on 3D textures.

Aside from that, they''ve been supported since gl1.1 I think, and so are probably described in your redbook.

And as an aside (just to make myself look stupid, most likely) I can''t see why you woukld use 3D textures for lighting / shading. Surely alpha blended geometry / fogcoords would give similar effects at much less storage and processing cost? Can anyone explain?
[size="1"]
3d textures are very often used for volume rendering (texture based volume rendering). the advantage is that you can save then lots of memory compared to the use of 2d textures and there are easier to use because some overhead drops out which is used for 2d textures. but this is the only usecase i now.

someone nows more usecases for 3d textures?
quote:Original post by siaspete
Anyway, if someone can''t find information on their own about 3D textures then I think it''s a fair assumption that they''re not at the level of using them yet, and If you can find info on bumpmapping you can find info on 3D textures.


In other words, "If you need to ask, you don''t need to know." God knows how many times I''ve heard that before. It''s a kind of accidental elitism that''s just all-too-prevalent among game-dev types (and even more so among "hackers"). I think you''re right about Doom3 not using 3d textures for lighting, but that''s no reason to disrespect robirt. Researching plausible disinformation does not make someone stupid.

With that said, robirt, developer.nvidia.com is a good resource, and should help you answer your questions. I do remember seeing a paper there about using 3d textures for lighting. However, I would take the advice of other people here: There are better ways to do lighting. Dot3 bumpmapping, for example, is excellent for doing per-pixel lighting, even on surfaces that aren''t bumpy. The NVidia developer site should help you with that too.
Just to clarify, Doom 3 uses register combiners to achieve per pixel lighting.
and uses 3dtextures to look up some values specifically to the lighting as well.

little hint: if you know how to use 2dtextures, you know how 3dtextures work. its the same, just with 3 coordinates, and a 3darray of texels in, even the syntax is 99% the same.

so, how to use them is not the problem (if it is, you should learn till that, i agree with the others that its beyond your level then, but then i can just say _TRY_TO_GET_THERE_ just with this problem. try to solve all the problems then you get on your way just to solve that.. you learn that much with this way..)

so, what usage you can get from it.. well, if you know what a texture is, simply an Kd-lookuptable for a function, you can now think about usages.. you could for example pass in the point_to_light vector as 3dtexturecoordinates, and get back, stored in rgb, the normalized vector, and in a, the distanceattentuation. there are others.. its just if you have to calculate a function f(x,y,z) you can use a 3dtexture to lookup that values..

"take a look around" - limp bizkit
www.google.com
If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia

My Page davepermen.net | My Music on Bandcamp and on Soundcloud

This topic is closed to new replies.

Advertisement