PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Software 3D speed goals

Hi there, I am currently working on a 3D library (mainly for myself to make a game) and maybe someday to sell for dirt cheap. However, I am unclear what to expect out of my 200MHz ARM processor in terms of speed. Does anybody know what some of the various libraries out there are pushing in terms of polygons per frame, and FPS?

As in, how many polys can you draw and maintain 25-30FPS in flat, gourad, textured modes respectively? Just curious if anybody can tell me some realistic goals to work to.

I am currently in a VERY unoptimized state doing 1100 flat shaded 1 light source polygons at 22FPS. How much further can I reasonably go? 5000!? 10000!? 20,000!?

I ask this because I'm not sure I have the time to delve into assembly and such, and am coming to terms with maybe just buying PocketGL and starting my game for real. It would be sad, because I've invested many evenings on my own little library, but maybe this is just too much for me...

What does everybody think? Aim high, do it myself? Or cave in to the library that is cheap and already available?

Thanks
Chris
well, the best you could do is still keep testing and optimizing yourself.. i think you can work out some nice things on a 200mhz processor.. quake does work right? that sure means something. it also depends what your targets are. plan the best you can. u gotta think what is that you're working for? good 3d doesnt always make a good game.. still good 3d is something :)
I've not done any benchmarking of that nature. However, if you were to take PocketGL and convert it to use 16 bit textures, and modify the line rasterizers to not do Gourard shading, then it would be about as fast as can be achieved without ASM optimization. In that case blitting would be a direct copy of a short from texture buffer to output buffer. PocketGL is optimized very well. There isn't a single divide in the whole rendering pipeline, and of course it is all integer math. It does make a good starting point to enhance to suite your needs.

Dan East
Dan East wrote:
I've not done any benchmarking of that nature. However, if you were to take PocketGL and convert it to use 16 bit textures, and modify the line rasterizers to not do Gourard shading, then it would be about as fast as can be achieved without ASM optimization. In that case blitting would be a direct copy of a short from texture buffer to output buffer. PocketGL is optimized very well. There isn't a single divide in the whole rendering pipeline, and of course it is all integer math. It does make a good starting point to enhance to suite your needs.

Dan East


Wow, thats pretty nice (no divides). How does one normalize a vector without any divides?

Dan, do you know if PocketGL uses a ZBuffer?

Chris
Using fixed point math you can avoid many divisions using shifts and an inverse table where necessary.

Yes, it has a Z-Buffer. The output color buffer and Z-Buffer are interlaced (16 bits for Z, 16 for color), which helps performance by reducing cache loads. PocketGL resets the z-buffer and color buffer at the same time during the GAPI blit. The downside is you can't do memcpy or the like to do your GAPI blit.

Dan East
Dan East wrote:
Using fixed point math you can avoid many divisions using shifts and an inverse table where necessary.

Yes, it has a Z-Buffer. The output color buffer and Z-Buffer are interlaced (16 bits for Z, 16 for color), which helps performance by reducing cache loads. PocketGL resets the z-buffer and color buffer at the same time during the GAPI blit. The downside is you can't do memcpy or the like to do your GAPI blit.

Dan East


Well thanks for the information. I guess I thought that ZBuffers would be way too slow on a PocketPC. We definitely have the memory to do one unlike PCs in the 486 days, but I thought the memory speed and cache speed would make a ZBuffer useless on the PocketPC. Guess I was wrong.

Instead I did a depth bucket sorting algorithm that makes an OpenGL-like library that I'm trying to do much harder than it needs to be. I think I'll try a ZBuffer approach.

Time for a major revamp of my library. I think I'll keep at my own library for a few weeks longer and see if I can get some speed out of it, otherwise I'll just shell out the $50 and start the actual game :D.

Chris
Conan · 07 May 2003, 21:04 UTC — PocketGL, clearing the buffers etc
Probably obvious to Dan as he's a real good coder but I recently realised that I could jump in at the stage where the buffers are cleared so that I could set the color of the 3d background & even better zap in a bitmap as the background to the 3d.

On the Polys front I get my artist to stick to around 1000 polys for a major item like a space ship. I can draw one of these, various planets, stars in the background and a 2D HUD overlay & still get passable speed on both my iPaq and my nice new Axim with pxa255. I use PocketGL as my maths sucks :(
Dan East wrote:
Using fixed point math you can avoid many divisions using shifts and an inverse table where necessary.

Yes, it has a Z-Buffer. The output color buffer and Z-Buffer are interlaced (16 bits for Z, 16 for color), which helps performance by reducing cache loads. PocketGL resets the z-buffer and color buffer at the same time during the GAPI blit. The downside is you can't do memcpy or the like to do your GAPI blit.

Dan East


Hey Dan,
Is a ZBuffer going to be slow on a PocketPC though, regardless? I mean, to implement, you have to check each pixel during rasterization against the ZBuffer, correct? Are there any tricks to this?

Also, in PocketGL you mentioned the author combines the 16bit Z with 16bit color to provide a speed increase, but this obviously doesn't allow you to memcpy to flip. Is the caching hit more than the memcpy hit if you use two separate buffers? Hmph. Well, I appreciate all of your help thus far!
Chris
DooMer_MP3 · 08 May 2003, 17:01 UTC — PocketGL, clearing the buffers etc
Conan wrote:
...
On the Polys front I get my artist to stick to around 1000 polys for a major item like a space ship. I can draw one of these, various planets, stars in the background and a 2D HUD overlay & still get passable speed on both my iPaq and my nice new Axim with pxa255. I use PocketGL as my maths sucks :(


Thanks for your reply Conan, this is what I was wondering!

Chris
Dave H · 11 May 2003, 12:52 UTC — PocketGL, clearing the buffers etc
Conan wrote:
On the Polys front I get my artist to stick to around 1000 polys for a major item like a space ship. I can draw one of these, various planets, stars in the background and a 2D HUD overlay & still get passable speed on both my iPaq and my nice new Axim with pxa255. I use PocketGL as my maths sucks :(



What do you use to create 3D models of spaceships - 3D Studio?
Conan · 11 May 2003, 16:40 UTC — which package
The 3D artist ( Aron ) uses Lightwave and converts to 3DSMAX's ASE format as required by PocketGL's data preparation tool.

The low poly models help keep file sizes down & performance up but it takes work to lose those vertices & still have a nice ship. Textures help a lot however PocketGL has very low res textures so only certain colors work well.