patrick mullen (saluk)
Eventually I need to incorporate some 3d effects into one of my projects, but the 3d I need is fairly low poly and only used sparingly. It doesn't seem worth the effort to convert the entire huge system to opengl, as I will lose compatibility. So I thought, why not just render 3d in software.
So far this is just an experiment, but it almost has everything I need. I have optimized for speed as much as I think I can.
* arrow keys - move 4-sided box around the screen
* a/z - zoom in and out - don't zoom in too far it may crash
* r,t,y - rotate the box on it's axis
* surfarray rendering for fast pixels
* 3d math only done on triangle corners
* texture mapped triangles, triangulated quads
* depth buffer for hidden surface removal
* pixel clipping
Shows a 3d texture mapped 4-sided box with one of it's faces scrolling the texture coordinates
I'm curious what kind of speeds you guys get, as well as if anyone has any ideas for further optimization. Short of a c module of course, which it might become eventually.
Pygame.org account Comments
If you wish to leave a comment with your pygame.org account, please sign in first.