View Full Version : Texture gap filtering in Z
04-17-2008, 06:20 AM
I would like to place the 2 2D textures parallel in 3D space, so they each go into their own z plane. When I look at this in 3D space, viewing parallel to the texture planes, I get a gap in between them, that is I only see 2 lines. How can I interpolate the space between those 2 textures using the lowest possible version of OpenGL and extensions?
04-17-2008, 08:34 AM
If you want to blend between 2 textures, then you can use shaders and sample each texture and blend with mix().
If you want to stick with old GL, then use multitexturing.
04-17-2008, 01:42 PM
Isn't multitexturing creating one new texture, blended from the 2 input textures?
What I do need to do is to interpolate the gap space between the 2 (seemingly infintely "thin") input textures.
Say one is placed at z position 0.3 the other at 0.4, how do I interpolate the space between 0.3 and 0.4?
04-17-2008, 02:36 PM
Your mistake is that you think you are drawing textures. Actually, you draw polygons, where the textures are projected upon. So there is no "gap between the textures", you just have two infinitely thin polygons. If you want to fill the space between, you have to draw some sort of a cube.
04-17-2008, 08:46 PM
They are actual in a cube. So what you say, does that mean I have to have 3 2D texture stacks, one each for X, Y and Z direction of the cube? That would be a huge overhead. So how can I fill the voxels between the texture maps with interpolated data from the neighboring texels? Would 3D textures solve this?
04-17-2008, 11:55 PM
Are you trying to do some sort of volumetric effect?
Or do you need to do a blend between the two "texture planes"?
In which case you need to draw additional geometry that does the texture blend.
04-18-2008, 06:17 AM
What I would like to do is be able to look at the cube sideways and not see a gap between the textures. What Zengar said makes all sense to me, in that a sideways look onto the polygons, onto which the textures are projected shows nothing because the projection is infinitely thin.
Yes I am looking for a volumetric effect. I can use a CPU to calculate any cut-plane in the cube, but heck, then I wouldn't need OpenGL :-)
With that again, is there a way (in OpenGL, not using shaders) to fill in the voxels between two textures?
04-18-2008, 06:59 AM
Create gap filling textures and use it for your cube sides. Or use shaders.
04-18-2008, 08:38 AM
How densely will I have to create textures in the gap? The example above has one at z=0.3 and one at z=0.4.
10 in between them or 100 or 1000?
04-18-2008, 03:08 PM
You need to read some documentation on hardware accelerated volume rendering :
And then you have drishti :
04-21-2008, 07:16 AM
Problem is that all of that material uses shaders which I do not want to use.
04-21-2008, 01:04 PM
Too bad bad for you. You are back to 2003. Is that a limitation of budget, limited by your intended market, or that you fear that "shaders are hard to do" (quite the opposite in fact) ?
Anyway you should at least read the "Introduction to GPU Volume Rendering" (1) and (2), as they give useful information for basic texture slices, exactly what you said you want to do.
04-24-2008, 04:12 PM
Ok, will do, but please accept that I do have that limitation.
04-24-2008, 04:20 PM
No problem, I accept everything, but you still did not say *why* you have this limitation ?
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.