N-Dimensional texturing

Just had a thought, with the advent of programmable pixels shaders and the like, would it not be plausible to be able to support a texture of an arbitrary number of dimensions?

This may be useful for many things, but off the top of my head, how about a 5 dimensional texture for the shadowing of an object. You have 3 dimensions for the texture relative to its light source, the depth behind the object along the tangent between the light and the obect, plus the x/y dimensions allowing this object to have size. That 3D texture projected will create a shadow for the object at that given angle.

Now add the dimensions theta and phi angle to the vertical and horizontal. Hey presto you have a texture you can blend from any angle to produce a shadow for that object.

You also don't have such a massive texture, because it need only be 8 bits as you do not need to include colour as the light source you are shadowing out will have the colour component. So with 5 dimensions thats 40 bits, not much more than a 32 bit texture. The texture would be very large in terms of number of pixels, but that is going to make compression much more effective, particularly because there will most probably be large areas of complete shadow and complete ermm.. non-shadow.

Just a thought, im sure there are other uses too - like animated 3D textures. Would be good for a steam chute or something.
 
Dave B:
You're mixing up input dimension with output dimension.

At first you talk about 5 input dimensions, and 1 output dimension. But then you're thinking of 5 output dimensions.

To clarify what I mean with input and output dimension: A typical texture has input dimension 2, and output dimension 3 (RGB) or 4 (RGBA).
 
This is what PRT is all about, it really is just a bit of magic to make working with high dimensional lookups feasible (you are underestimating the storage requirements as basic said).
 
Yeah, irradiance volumes using spherical harmonics would be 6-dimensional data (erm, I admit, that's a bit of a guess):

http://www.ati.com/developer/gdc/GDC2005_PracticalPRT.pdf

Page 46 refers to a VS constant store. On the next page it says

>If you have enough constant store available, you can send all nearby samples and their gradients to the vertex shader and do the interpolation per-vertex

>If this is too costly for you, interpolate on the CPU and send a single interpolated sample and interpolated gradient to the vertex shader
-->We did this for Ruby: Dangerous Curves and were very pleased with the results

It sounds to me like these complex data structures are really beyond the bounds of "generalisability" for current GPUs. The 3rd order SH model in a 1024-float VS constant store is only gonna hold 9 samples.

Jawed
 
_xxx_ said:
Only 8 additional bits, how?

Yurright, I may have made a mental booboo. :oops:

The size of a (equal dimensional lengths) texture is bit depth x (length^# of dimensions)

With this it would be an 8bit texture, so it would be 8xL^5

This is as apposed to a 32bit texture which would be 32xL^3


So they would be equal size at L^5=4L^3 .... L^2=4 L=2 LOL

So you would save space when using a 1x1 texture, yurright, I got my dimensions mixed up. :oops:


So yes, this texture would be jigglinourmous. Only viable if you can produce a compression algorithm that has a compression ratio that increases at a similar exponent to texture size. ;)


Still think it's a good idea :rolleyes:
 
If it makes you feel any better there is an extension in OpenGL called "GL_EXT_TEXTURE4D" (or something like that). I think only one or two software visualization firms support it, and it is intended primarily for color space transformations.
 
pack a N dimensional texture in a 3d texture and then calculate the texture lookup in shader. Now your using angular texture co-ordinates which might make it more fun but you could do animated textures easy enough.

Say you have 8x8x8x8 with axies x,y,z,w and you just want to do nearest texture look ups you could just set up a 64x8x8 and then look up (x+w*8,y,z) instead of (x,y,z,w).
 
Back
Top