PS3D - Simple 3D For PlayBasic V1.64 Those reading the PlayBASIC development blogs here on the forums, will recall the mention of the wanting to combine the various software 3d rendering stuff into a bit of 3D library for PlayBASIC. The library should allow the user to create 3D scenes quickly and easily However, given this is software rendering (affine / with no perspective correction), the purpose is
not to create 3d games with, more to augment your existing 2D applications with some 3D effects.
Bellow is picture that you're probably familiar with the terrain demo, except this version is tweaked up to use PlayBasic V1.64's filtering to smooth out the terrain. What's also new to this, is that I've added an "object" rendering part to the library. Which currently only supports CUBES/BOXES, but it's relatively easy to create your own geometry. Ideally, it'd be nice to be able to load some MD2 models in and display them. Got all the code just laying around, just a matter of wedging it all together at some point.
Watch On PlayBasic Software 3D V001 (http://www.youtube.com/watch?v=3sfxp4qDmJk) You Tube
PS3D V0.02
Put a couple more hours into the library today, added support for loading the MD2 models. While it can load the meshes, the texture has to be user supplied. Anyway, the library gives the user basic functionality over a simple 3D scene.
Performance wise it's not too bad, considering everything in the shots bellow is filtered and there's no mesh level rejection in them. So basically every polygon in the scene is being processed each frame, which is really not ideal. Adding some early rejection methods will really negate the impact of the meshes that are outside of the current view. I could take this into the lib or tack it into the engine, it's prolly best done in the engine.
PS3D V0.02 Demo
This little release is to kill two birds with one stone. First, it's a hands on working demo of the P3D library, and secondly this demo is a packaged exe (built with PlayPackager (http://www.underwaredesign.com/forums/index.php?topic=3436.0)) for a bit of real world testing. That's about it.
The demo has a few keys.
Mouse = Mouse look
UP ARROW = Move Forward
ESC = QUIT
SPACE = Add Cubes to Scene
ENTER = Toggle Vsync
Download
[plink] Download P3D Demo V0.02 (http://www.underwaredesign.com/files/demos/RunPlay3D.zip)[/plink] (1.39 Meg)
5000 cubes - PS3D Software Rendering This an updated capture of the PS3D demo, only difference is this version is running in PlayBASIC V1.65C and object count is bumped up.. It's all software rendering of course, affine texture mapping, so think PlayStation One style scene..
http://PlayBASIC.com
PS3D (Play 3D) software 3d rendering libraries ( 2010 03 10)
This is an 'as is' release of the PS3D libraries which are set of high level functions for rendering 3D objects into PlayBASIC 2D camera. It includes a simple height map terrain, cube primitives and MD2 loader, allowing the user to create a scene but a lot of necessary high level code is missing for the casual user, collisions for example .
Download
Get Source Code (https://www.underwaredesign.com/forums/index.php?topic=4457.0)