Demos and support files for pi3d (3D graphics python package for the raspberry pi)
Python GLSL Other
Latest commit 9a9e609 Feb 16, 2017 @paddywwoof paddywwoof Merge branch 'develop'
Permalink
Failed to load latest commit information.
alpine update to v1.10 Oct 27, 2014
android Some changes to show use of relative Camera movments Jul 22, 2016
fonts Water demo uses normal_map argument to Texture Oct 11, 2016
models Starfield now uses 120,000 star database Feb 8, 2016
music new shaders and Jukebox demo Sep 11, 2013
pex after fixing tangential acceleration Nov 17, 2016
screenshots Starter files from pi3d Aug 25, 2013
shaders shaders needed for night vision demo Jul 20, 2016
textures mods in line with changes to pi3d v2.9 and subsequent Texture Jan 21, 2016
.gitignore mods in line with changes to pi3d v2.9 and subsequent Texture Jan 21, 2016
Amazing.py changes in line with alteration to pi3d.Log Jan 24, 2017
Blur.py clarification and explanation wrt getting pi3d logging to show Jan 24, 2017
BuckfastAbbey.py create develop branch to match changes to timpam/pi3d/develop Aug 25, 2013
CastShadows.py demos in line with new, better, shadow casting Aug 12, 2015
ClashWalk.py odd extra line! Oct 27, 2014
ClothWalk.py remove import from ClothWalk Jun 29, 2015
Clouds3d.py create develop branch to match changes to timpam/pi3d/develop Aug 25, 2013
CollisionBalls.py changes in line with alteration to pi3d.Log Jan 24, 2017
ConferenceHall.py create develop branch to match changes to timpam/pi3d/develop Aug 25, 2013
Conway.py create develop branch to match changes to timpam/pi3d/develop Aug 25, 2013
DogFight.py demo changes to cope with latest changes to pi3d; mainly alpha fog fi… Feb 4, 2014
DogFight_rpi_json.php Starter files from pi3d Aug 25, 2013
DogFight_rpi_json.sql Starter files from pi3d Aug 25, 2013
Earth.py demos altered in line with fixed light shader and FastText Oct 17, 2015
EnvironmentCube.py create develop branch to match changes to timpam/pi3d/develop Aug 25, 2013
EnvironmentSphere.py Sphere mapping needs correction with EnvironmentSphere Aug 14, 2015
FilterDemo.py changes in line with alteration to pi3d.Log Jan 24, 2017
FixedString.py Add shadow Font and FixedString demos (tests really) to Shapes and Fi… Feb 9, 2017
ForestQuickNumbers.py String.draw() must be called before quick_change() Oct 11, 2016
ForestStereo.py ForestStereo fix for camera not moving unless rotated! Jul 26, 2016
ForestWalk.py Some changes to show use of relative Camera movments Jul 22, 2016
GtkCube.py switched back to re-rendering constantly as unreliable on Raspberry Pi Apr 21, 2016
Gui.py Use new google noto font Oct 11, 2016
IceGrow.py alterations to use numpy array system for buffers, matrices, textures Mar 15, 2015
Jukebox.py last minute tweak not tested on the RPi had error! Nov 7, 2015
LICENSE copy of LICENSE here too Aug 25, 2013
LoadModelObj.py some fixes to Gui and LoadModels Jan 13, 2016
LoadModelPickle.py some fixes to Gui and LoadModels Jan 13, 2016
MarsStation.py demo changes to cope with latest changes to pi3d; mainly alpha fog fi… Feb 4, 2014
Minimal.py demos altered in line with fixed light shader and FastText Oct 17, 2015
Minimal_2d.py Add Minimal_2d using orhtographic camera Sep 12, 2013
NumpyBalls.py changes in line with alteration to pi3d.Log Jan 24, 2017
Orbit.py some more fixes to Gui after testing on other platforms Nov 6, 2015
Particles.py better class inheritance and more random element Nov 9, 2016
PexDemo.py PexDemo demonstrates PexParticles class Nov 17, 2016
Pi3d2.py numpy version of unif and unib significantly slower in some circs. Re… Mar 30, 2015
Pi3d3.py numpy version of unif and unib significantly slower in some circs. Re… Mar 30, 2015
PictureFrame.py oops, that directory doesnt exist on RPi Mar 15, 2016
Pong.py Use new google noto font Oct 11, 2016
Post.py OffScreenTexture clearing in Post, Keyboard after Display in SpriteBalls Sep 1, 2015
ProceduralTerrain.py numpified noise in procedural terrain Oct 26, 2015
PyQtCube.py PyQt4 version of the gtk image patching demo - works with python3 Apr 24, 2016
README.rst bit of explanation of directory structure Sep 22, 2013
Raspberry_Rain.py Raspberry rain benefits from avoiding texture reload if same Jan 21, 2014
RobotWalkabout.py some more fixes to Gui after testing on other platforms Nov 6, 2015
RunTests.py PexDemo demonstrates PexParticles class Nov 17, 2016
Scenery.py Use new google noto font Oct 11, 2016
Shapes.py additional alternative method of using background_color for Font Feb 16, 2017
Silo.py prior to merge with master Jan 24, 2017
SlideTransition.py changes in line with alteration to pi3d.Log Jan 24, 2017
Slideshow.py changes in line with alteration to pi3d.Log Jan 24, 2017
Slideshow_2d.py changes in line with alteration to pi3d.Log Jan 24, 2017
Slideshow_3d.py changes in line with alteration to pi3d.Log Jan 24, 2017
Snake.py to sync Jun 29, 2015
SpriteBalls.py changes in line with alteration to pi3d.Log Jan 24, 2017
SpriteMulti.py various improvements tie in with alterations to pi3d Jun 29, 2016
Starfield.py Use new google noto font Oct 11, 2016
StringMulti.py changes in line with alteration to pi3d.Log Jan 24, 2017
TConvert.py mods in line with changes to pi3d v2.9 and subsequent Texture Jan 21, 2016
TestEvents.py create develop branch to match changes to timpam/pi3d/develop Aug 25, 2013
TigerShadow.py changes in line with alteration to pi3d.Log Jan 24, 2017
TigerTank.py changes in line with alteration to pi3d.Log Jan 24, 2017
TriceratopsModel.py create develop branch to match changes to timpam/pi3d/develop Aug 25, 2013
VideoWalk.py Some changes to show use of relative Camera movments Jul 22, 2016
Water.py Water demo uses normal_map argument to Texture Oct 11, 2016
__init__.py create develop branch to match changes to timpam/pi3d/develop Aug 25, 2013
alpine.py update demos in line with pi3d master move to v1.10 Oct 27, 2014
camera_environmentsphere.py put camera demos on github Jul 20, 2016
camera_envsphere_fast.py put camera demos on github Jul 20, 2016
camera_minimal_2d.py put camera demos on github Jul 20, 2016
camera_night_vision.py put camera demos on github Jul 20, 2016
demo.py modified version of demo.py sneaked through again! Jan 13, 2016
exercise01.mpg needed for remote sync Jun 29, 2015
stars.py split out code for stars in Starfield.py, also PictureFrame shaders b… Mar 11, 2016
starsystem.py split out code for stars in Starfield.py, also PictureFrame shaders b… Mar 11, 2016
test_egl.py needed for remote sync Jun 29, 2015

README.rst

pi3d_demos

Demos and support files for pi3d (3D graphics python package for the raspberry pi)

In order to run these demos you need to have pi3d. You should look at pi3d.github.io/html/index.html for instructions on install and using it.

The zip file is currently about 28MB and unzips to about 40MB of which a small number of large files used in ConferenceHall, Triceratops, Silo, TigerTank and Jukebox contribute half.

These demos give examples of how you can structure your work and allow different projects to share resource. i.e. directory structure:

/home/pi/
   |-MyWork
   |---images             # general1.jpg
   |---models             # house.obj house.mtl house.jpg
   |---python
   |-----roller           # rollercoaster.py
   |-------roller_images  # rollpic1.jpg
   |-------roller_shaders # rollshader1.vs, .fs
   |---test_results
   |---xyz
   |-Music
    ... etc
   |-pi3d
   |---experiments
   |---images
   |---pi3d
   |-----constants
   |-----event
    ... etc
   |-pi3d_demos
   |---fonts
   |---models
   |-----AllSaints
   |-----Buckfast Abbey
   |-----ConferenceHall
   |... etc
   |---textures
   |-----biplane
   |-----ecubes
   |-------Cloudy
    ... etc

then, say, in /home/pi/MyWork/python/roller/rollercoaster.py:

...
import sys
sys.path.append("/home/pi/pi3d")
import pi3d
...
mymodel1 = pi3d.Model("../../models/house.obj")
mymodel2 = pi3d.Model("/home/pi/pi3d_demos/models/teapot.obj")
mytex1 = pi3d.Texture("../../images/general1.jpg")
mytex2 = pi3d.Texture("roller_images/rollpic1.jpg")
myshader1 = pi3d.Shader("uv_flat") # generic from pi3d package
mypost = pi3d.PostProcess("roller_shaders/rollshader1")
...