Not logged in, Join Here! or Log In Below:  
News Articles Search    

Submitted by Uthman Apatira, posted on December 02, 2000

Image Description, by Uthman Apatira

Hello! This screen shoot is the output from my software encoded TDK (texture dither kernel) which I am implementing into my 3D OpenGL Engine for use with an upcoming fighting game- ApatiraFo. You might wonder why I don’t just use OpenGL’s blending capabilities. Well, I have been looking into the speedups of many popular console games and have decided that if I used 256 colored bitmaps, my game/engine runs a hellofalot faster. If I just used OpenGL, I ended up getting crude blocky images, so….. I used a _quick_ TDK software filter pass right when I loaded up my textures to convert my nice 32bpp art to the 256bpp substitute my engine uses and I must say, the results were quite impressive. ;). After I post an image of another cool speedup that I have been working on, I’ll post an image of the results of this TDK running in place with a sample ApatiraFo session in Acton.

Image of the Day Gallery


Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.

December 02, 2000, 03:52 PM

What dithering algorithm are you using, and to what sort of palette? I've found that horizontal error-diffusion dithering to a fixed 332 palette is quite speedy and puts out very good results... when I wrote a software renderer many years ago which did all of the rendering in 32bit color and then downsampled to the color depth of the screen at blit time, the 332 error-diffusion actually looked signifigantly *better* than undithered 16bpp downsampling!

The main problem with dithering on textures, btw, is that although dithering in pixelspace looks pretty good due to spatial locality, in texelspace it can look pretty fugly in situations where spatial locality isn't preserved very well (skewed texture coordinates in screenspace, extreme magnification, etc.). However, if done right, it can still look pretty good.

Of course, don't even think about dithering down to 2321 rgba if you need alpha - that would look like total ass. :)

BTW, what do you mean by "just using OpenGL's blending capabilities"? I mean, OpenGL blending is orthogonal to texturing issues... do you mean splitting the texture up into three separate per-channel textures? Well, of COURSE a single paletted texture would be faster than three separate passes... :)


December 03, 2000, 01:14 AM

Looks nice, although your dithering is possibly a tad drastic (resulting in obvious noise). Is this a problem with the lack of colour information? Or did you just go for very high dithering?


December 03, 2000, 02:20 AM

Considering most cards don't even support palettes natively, is there really a speed-up with 8-bit textures outside of Voodoo hardware?

I think Voodoo cards are the only ones that actually support palettes?

I am under the impression that most other cards convert the texture to 32-bit when it uploads to VRAM.


December 03, 2000, 02:42 AM

Following what Cybersalad said and holding it to be true about the lack of palette support on modern accelerators, it seems like reducing your textures to 8bit may be a tad drastic? Perhaps a reduction to a 565 texture using a similar approach might yeild slightly less noisy results, and being 16 bit may provide your size reduction/speed increase that you seek?
Actually - if there is a speed increase to be had by reducing to an 8 bit texture on your particular hardware, it may just be a case of your example texture containing an awfully large ammount of colour data (as opposed to something like say, a brown brick texture) resulting in maybe an extreme example of your technique in action?
Anyhow - good luck with your fighting game - looking forwards to checking out a demo soon. =)


December 03, 2000, 07:25 AM

Actually, for a time it was that nVidia cards where the odd ones out for NOT supporting it :)


December 03, 2000, 08:47 AM

Great keep it up any pics of the engine


December 04, 2000, 10:30 AM

Nice blended image and very nice dithering.
But be realistic, the time you finish your game then we are a few years ahead in time and so are the video cards, which eventually will not support that crappy 256 color mode anymore ! Even the small pocket size computers will not use 256 colors anymore, so it's a nice effort/exercise but not very useful, don't you think ?
But I still wish you best of luck with your game.

This thread contains 7 messages.
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.