Sample Programs in the Distribution

The Panda3D Distribution includes quite a few sample programs. The following is a list of what’s included, and which features of the engine each sample demonstrates. If you are just learning Panda3D, take a look at the ones marked as “Beginner” difficulty.

To run a sample program, you need to install the Panda3D SDK. If you’re a Windows user, you’ll find the sample programs in your start menu. If you’re a Linux user, you’ll find the sample programs in /usr/share/panda3d. On macOS, you’ll find them in /Developer/Examples/Panda3D/ (or /Library/Developer/Examples/Panda3D as of Panda3D 1.10.5). Alternatively, you can download the samples separately from the download page.

Sample Programs: Asteroids

  • Difficulty: Advanced

  • Creating tasks (routines that get called every frame)

  • Using 2D graphics

Sample Programs: Ball in Maze

  • Difficulty: Intermediate

  • Using the collision detector

  • Reading the mouse

Sample Programs: Boxing Robots

  • Difficulty: Intermediate

  • Loading animated actors and playing animations

Sample Programs: Bump Mapping

  • Difficulty: Intermediate (or Advanced)

  • Enables per-pixel lighting

  • Explicit Shaders

Sample Programs: Carousel

  • Difficulty: Beginner

  • Relative positioning

  • Intervals (automatic movement)

Sample Programs: Cartoon Shader

  • Difficulty: Intermediate (or Advanced)

  • Enables per-pixel lighting

  • Explicit Shaders

  • Image Postprocessing

  • Render-to-Texture

Sample Programs: Chessboard

  • Difficulty: Intermediate

  • Selecting an object with the mouse

Sample Programs: Disco Lights

  • Difficulty: Intermediate

  • Using vertex lighting

  • Enables per-pixel lighting

Sample Programs: Distortion

  • Difficulty: Advanced

  • Creates an interesting shader effect where the entire screen is rendered into a texture.

Sample Programs: Fireflies

  • Difficulty: Very Advanced

  • Deferred shading - a complex shader-based algorithm

Sample Programs: Fractal Plants

  • Difficulty: Very Advanced

  • Creates a 3D model without loading it from disk

Sample Programs: Glow Filter

  • Difficulty: Intermediate (or Advanced)

  • Enabling per-pixel lighting

  • Explicit Shaders

  • Image Postprocessing

  • Render-to-Texture

Sample Programs: Infinite Tunnel

  • Difficulty: Intermediate

  • Using fog to hide artifacts in the distance

Sample Programs: Looking and Gripping

  • Difficulty: Intermediate

  • Controlling a character’s head procedurally

  • Causing a character to grip an object

Sample Programs: Media Player

  • Difficulty: Beginner

  • Loading a texture from an AVI file

  • Loading a sound from an AVI file

  • Synchronizing audio and video

Sample Programs: Motion Trails

  • Difficulty: Intermediate (or Advanced)

  • Creating a trail behind a moving object.

  • Captures contents of screen and reuses it later.

Sample Programs: Music Box

  • Difficulty: Intermediate

  • Playing sounds

  • GUI buttons and sliders

Sample Programs: Particles

  • Difficulty: Advanced

  • Demonstrates the particle system

Sample Programs: Procedural Cube

  • Difficulty: Advanced

  • Creates a 3D model without loading it

Sample Programs: Roaming Ralph

  • Difficulty: Advanced

  • A character walks around a terrain

  • Uses collision system to detect height of terrain

Sample Programs: Shadows

  • Difficulty: Advanced

  • Explicit Shaders

  • Dynamic Shadows: shadow mapping

Sample Programs: Solar System

  • Difficulty: Beginner Tutorial

  • Tutorial structure shows development steps

  • Shows how objects can move relative to other objects

Sample Programs: Teapot on TV

  • Difficulty: Intermediate

  • Render-to-texture

  • Places rendered texture on model in scene