Pi3D (vsn 0.07) written by Tim Skillman, Copyright (c) 2012
EGG & OBJ file loader written by Paddy Gaunt, Copyright (c) 2012
There's plenty of 3D code flying around at the moment for the Raspberry Pi, but much of it is rather complicated to understand and most of it can sit under the bonnet!
pi3d is a Python module that aims to greatly simplify writing 3D in Python whilst giving access to the power of the Raspberry Pi GPU. It enables both 3D and 2D rendering and aims to provide a host of exciting commands to load in textured/animated models, create fractal landscapes, shaders and much more.
This is the third release of the pi3d module which has various demo's of built-in shapes, landscapes, model loading, walk-about camera and much more! See the demos included with this code and experiment with them ..
- ForestWalk.py Walk about a forest on a landscape generated from a bitmap
- Triceratops.py Large model loading with several bitmaps
- BuckfastAbbey.py Explore a model of the beautiful Buckfast Abbey in Buckfastleigh, Devon
- Earth.py Demonstrates semi-transparent clouds and hierarchical rotations
- BouncingBalls.py 2D rendering with a title bar and 2D text
- Raspberry_Rain.py Raining Raspberries, full-screen, over the desktop
- Clouds3D.py Blended sprites in perspective view
- CollisionBalls.py More bouncing balls across the screen - this time bouncing off each other on the desktop
- EnvironmentCube.py New environment cubes to try out in texture/ecubes - some high quality ones!
- RobotWalkabout.py Another off-planet example of a basic avatar robot drifting about
- Shapes.py Demos available shapes and text in a 3D context
- MarsStation.py Navigate around an abandoned Mars base-station with open/shut doors. Implements a new Level-Of-Detail (LOD) feature and TKwindow interface
- TigerTank.py Ever played World Of Tanks (WOT)? This tank emulates how a WOT tank works. Uses realistic modelling and LODing in a TKwindow
- Amazong.py Can you find yourself around the amazing maze? Written by Paddy Gaunt.
- Pong.py A snazzy 3D version of landscape pinball and pong against a Raspberry! Written by Paddy Gaunt.
- HelloWorldWindow.py A simple demo showing how to add a window to your Pi3D project
- ConferenceHall.py Walkabout a realistic baked-texture conference hall
- pi3d.py The main pi3d module
- include Contains pi3d support files
- textures Various textures to play with
- models Demo egg models
- fonts Bitmap fonts that can be using for drawing text
- screenshots Example screenshots of the demos included
- images used for ReadMe.html
- ChangeLog.txt Latest changes of Pi3D
- ReadMe.md This file
- ReadMe.html HTML readme
- Memory Split setup
Although most demos work on 64MB of memory, you are strongly advised to have a 128MB of graphics memory split, especially for full-screen 3D graphics. In the latest Raspbian build you need to edit the config.txt file (in the boot directory) and set the variable 'gpu_mem=128' for 128MB of graphics memory.
- Install Python Imaging
Before trying any of the demos or Pi3D, you must download the Python Imaging Library as this is needed for importing any graphics used by Pi3. To install on the terminal, type:
sudo apt-get install python-imaging python-imaging-tk
- Install Geany to run Pi3D
Geany is by far the easiest and most compatible application to use for creating and running Python scripts. Download and install it with:
sudo apt-get install geany xterm
- Load and run
Load any of the demos into Geany and run (using the cogs icon)
Models, code, news and resources are continually updated on http://www.pi3d.net (or .co.uk,.org)
A short 'manual' on using pi3d can be found on this github. Please note that Pi3D functions may change significantly during it's development.
Bug reports, comments, feature requests and fixes are most welcome!
Please email on timskillman@gmail.com or contact me through the Raspberry Pi forums.
Pi3D started with code based on Peter de Rivaz 'pyopengles' (https://github.com/peterderivaz/pyopengles) with some tweaking from Jon Macey's code (jonmacey.blogspot.co.uk/2012/06/).
The Panda3D loaderEgg.py and LoaderObj.py modules are written by Paddy Gaunt (Copyright (c) 2012)
Many Thanks, especially to Paddy Gaunt, Peter de Rivaz, Tom Swirly, Jon Macey and others who have contributed to Pi3D - keep up the good work!
A new version of Pi3D implementing Shaders will be available in the near future. Keep watch!
PLEASE READ LICENSING AND COPYRIGHT NOTICES IF USING FOR COMMERCIAL PURPOSES ESPECIALLY