Panda3D on Mac OS X
Latest Version: 0.5 (September 1st, 2006)
Users of 0.5: if you are interested in audio support there is now a hack to enable FMOD with the same build - see the Known Issues section below for further information
New in this version:
- Builds for PPC and new Intel-based Macs available!
- Updated to lastest CVS head revision.
- Various dependencies/packages updated.
Removed fftw (see http://panda3d.org/phpbb2/viewtopic.php?t=1568).
- Compiled against FMOD Ex (though this is currently not working as intended).
If you upgrade from 0.4 or below, you might want to follow these instructions:
- Upgrade Xcode to 2.4 (previously 2.2.1)
- Upgrade the NVIDIA Cg Toolkit to 1.5 beta 2 (previously 1.4): the OS X Tiger version of the 1.5 beta 2 build is an Universal package, so it can also be used on Intel Macs
Upgrade DarwinPorts to latest version (1.3.2 at the time of this writing)
sudo port -d selfupdate
- Panda3D is not compiled/linked against fftw anymore, so you might want to remove the package (if you do not need it for any other purposes)
sudo port uninstall fftw
- Upgrade libpng to 1.2.10_2+darwin 8 (previously 1.2.8_2+darwin8)
sudo port upgrade libpng
- Upgrade tiff to 3.8.2_0+darwin 8 (previously 3.8.0_0+darwin8)
sudo port upgrade libpng
- Additionally you can preliminary install the FMOD FX sound library, though the support is unfortunatly not working at this moment, but the 0.5 Panda3D package already includes the necessary libraries
Contents
What is Panda3D?
From the Panda3D site:
Panda3D is a 3D engine: a library of subroutines for 3D rendering and game development. The library is C++ with a set of Python bindings. Game development with Panda3D usually consists of writing a Python program that controls the the Panda3D library.
Panda3D is unusual in that its design emphasis is on supporting a short learning curve and rapid development. It is ideal whenever deadlines are tight and turnaround time is of the essence.
If you are interested in Panda3D in general go to the main Panda3D site.
This page allows users to install a preliminary version of Panda3D for Mac OS X, until an official release will be available.
Currently this has only been tested on Mac OS X 10.4 (PPC and Intel) with Python 2.4.3 (Universal build). For creating the binary package below a CVS head revision of Panda3d had been used with local modifications. To build Panda3D yourself, please follow this thread. Local modifications include a subset of what has been discussed in here.
Prerequisits
- Mac OS X 10.4
- Xcode 2.4
- bash as default terminal shell (see below)
Installation
Install DarwinPorts and needed libraries
Get and install DarwinPorts - follow installation instructions
- Open a terminal window and enter these commands to install needed libraries:
sudo port install jpeg sudo port install libpng sudo port install tiff sudo port install freetype
- Following libraries are now installed on your system:
- freetype @2.1.10_1 (active)
- jpeg @6b_1 (active)
- libpng @1.2.10_2+darwin_8 (active)
- tiff @3.8.2_0+darwin_8 (active)
- zlib @1.2.3_0 (active) (this was automatically installed, while the tiff or png package was installed)
Install the NVIDIA Cg Toolkit
Get and install the NVIDIA Cg Toolkit 1.5 beta 2 - make sure to install the Tiger version, which is Universal and can be installed on PPC or Intel Macs.
Install the FMOD Ex Sound System
Get and install FMOD Ex 4.04 - this is optional
Install Python
Get and install Python 2.4.3 (universal build) - follow installation instructions
Install Panda3D
For PPC Macs: Get and install Panda3D 0.5 PPC (updated: September 1st, 2006)
For Intel Macs: Get and install Panda3D 0.5 Intel (updated: September 1st, 2006)
Configure .bash_profile
The bash configuration file is located in ~/.bash_profile (in the root of your home directory). Just open it with any text editor and edit according to the instructions below:
- Make sure the Panda3D binaries and the latest Python is in your path (Python should do that automatically, my Panda3D package doesn't do that yet; additionally other paths might be already there too):
export PATH=''/usr/local/panda/bin:/usr/local/bin:/opt/local/bin:$PATH''
- Let Python know where to find the Panda3D libraries:
PYTHONPATH=/usr/local/panda/lib; export PYTHONPATH
- Extend the dynamic library path:
DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:/usr/local/panda/lib ; export DYLD_LIBRARY_PATH
For Maya users: if you want to use the Maya tools, additional add this (replace <Application Path> with the path to Maya.app - I believe you have to make sure that the path does not contain any spaces):
DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:<Application Path>/Maya.app/Contents/MacOS ; export DYLD_LIBRARY_PATH MAYA_LOCATION=<Application Path>/Maya.app/Contents; export MAYA_LOCATION
The tools are linked against Maya 7, you will need this version to use maya2egg and co.
The Intel build does currently not support the Maya tools
Compiling Panda3D on Mac OS X from Source Code
I will try to provide the collected instructions from the forum threads and a patch file as soon as I can. I hope that the patch will be feed back into Panda3Ds CVS repository.
Included Panda3D Tools
Have a look at /usr/local/panda/bin to see which Panda3D tools are included in your package.
ls /usr/local/panda/bin
Samples
Download the original samples from here.
To run a sample script, open the script with the PythonLauncher for Python as shown in the picture below:
Previously I adapted the samples locally to run with the PythonLauncher, until Bob Ippolito realized that the problem is not with the samples or Panda3D, but with the PythonLauncher. This will be fixed in an upcoming distribution of Python (Python 2.5 should have this already fixed). For more information see this thread on the PythonMac SIG mailing list and this bug report.
I'm not providing a package with the local modification anymore because hopefully this will not be needed anymore in the near future.
Here is a list of all Panda3D 1.2.3 samples and their status on Mac OS X (last update: June 28th, 2006).
Basic-Tutorials--Lesson-1-Solar-System |
OK |
Basic-Tutorials--Lesson-2-Carousel |
OK |
Feature-Tutorials--Actors |
OK |
Feature-Tutorials--Animated-Textures |
OK |
Feature-Tutorials--Cartoon-Shader |
OK - Tut-Cartoon-Shader - OK, FAIL - Tut-Cartoon-Variant |
Feature-Tutorials--Collision-Detection |
OK |
Feature-Tutorials--Deferred-Shading |
FAIL - seems to be the same problem encountered with Feature-Tutorials--Cartoon-Shader/Tut-Cartoon-Variant |
Feature-Tutorials--Fog |
OK |
Feature-Tutorials--Glow-Filter |
OK |
Feature-Tutorials--Joint-Manipulation |
OK |
Feature-Tutorials--Lighting |
OK |
Feature-Tutorials--Motion-Trails |
FAIL - the sample starts without any problems, but the graphical result is broken, no effect is seen |
Feature-Tutorials--Normal-Mapping |
OK - it's slow, does Cg on Mac OS X have any known preformance issues? |
Feature-Tutorials--Particles |
FAIL - Pmw megawidgets needs to be installed, the particle editor runs, but is unusable, because the UI does not react to any input (probably due to a conflict between tcl/tk and Panda3D? I had no time to investigate yet as this is no priority for me at the moment) |
Feature-Tutorials--Picking |
OK |
Feature-Tutorials--Procedural-Geometry |
OK - Tut-Procedural-Cube - OK, FAIL - Tut-Fractal-Tree (throws an assertion in geomVertexReader) |
Feature-Tutorials--Profiling-Tool |
OK - though I don't see anything happening when drawing 1000 teapots (option 3), couldn't compare to Windows version yet |
Feature-Tutorials--Render-To-Texture |
OK |
Feature-Tutorials--Roaming-Ralph |
OK |
Feature-Tutorials--Sound |
FAIL |
Feature-Tutorials--Tasks |
OK |
OK - without sound though |
Known Issues
tcsh vs. bash: the instructions assume that you are using bash as the default terminal. From Jaguar to Panther the default terminal was switched from tcsh to bash but upgraded systems kept the old default (AFAIK). See these instructions for bash on Mac OS X to switch.
Audio support hack: FMOD EX support has been added with 0.5 though unfortunatly it doesn't yet work as intended. To activate the provided FMOD Ex support follow the following steps
Please be aware that this a very ugly hack!
make sure the FMOD dynamic libraries are on your DYLD_LIBRARY_PATH (replace <Path To FMOD> with your FMOD installation path):
DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:/usr/local/panda/lib:<Path To FMOD>/api/lib ; export DYLD_LIBRARY_PATHEdit /usr/local/panda/etc/Config.prc so Panda3D imports FMOD at startup time:
audio-library-name fmod_audio
Edit //usr/local/panda/lib/direct/showbase/Showbase.py, jump to line 1191:
self.musicManager = AudioManager.createAudioManager()
and change the line, so it saysself.musicManager = None
Now FMOD can be used for audio output. The basic audio API seems to work as expected (as described in http://www.panda3d.org/wiki/index.php/Loading_and_Playing_Sounds_and_Music).
You only can use base.sfxManagerList[0] (see http://www.panda3d.org/wiki/index.php/Manipulating_Sounds) to play music and sound. Be aware that you can play music and sound, you are just limited to use one AudioManager, which reduces the number of different sounds to 16 (or to any value set via the configuration variable audio-cache-limit).
See also this thread.
License
Panda3D comes with this license. The package provided on this page shares the same license. So use at your own risk.
Contact
Please use the Panda3D Forums regarding any Panda3D related issues. There is an active thread for Panda3D on Mac OS X.
If you have any problems with the package provided on this page, you can contact me at kaweh (dot) kazemi (at) teamvienna (dot) at.
History
0.5 (September 1^st^, 2006)
- Builds for PPC and new Intel-based Macs available!
- Updated to lastest CVS head revision.
- Various dependencies/packages updated.
Removed fftw (see http://panda3d.org/phpbb2/viewtopic.php?t=1568)
- Compiled against FMOD Ex (though this is currently not working as intended).
If you upgrade from 0.4 or below, you might want to follow the instructions below
- Upgrade Xcode to 2.4 (previously 2.2.1)
- Upgrade the NVIDIA Cg Toolkit to 1.5 beta 2 (previously 1.4): the OS X Tiger version of the 1.5 beta 2 build is an Universal package, so it can also be used on Intel Macs
Upgrade DarwinPorts to latest version (1.3.2 at the time of this writing)
sudo port -d selfupdate
- Panda3D is not compiled/linked against fftw anymore, so you might want to remove the package (if you do not need it for any other purposes)
sudo port uninstall fftw
- Upgrade libpng to 1.2.10_2+darwin 8 (previously 1.2.8_2+darwin8)
sudo port upgrade libpng
- Upgrade tiff to 3.8.2_0+darwin 8 (previously 3.8.0_0+darwin8)
sudo port upgrade libpng
- Additionally you can preliminary install the FMOD FX sound library, though the support is unfortunatly not working at this moment, but the 0.5 Panda3D package already includes the necessary libraries
0.4 (June 28^th^, 2006)
- Maya support and more tools added (bash configuration needs to be updated to make this work).
- Fixed keyboard support (the Escape key is now working as expected).
- Added mousewheel support.
- Package size reduced (the package only includes the stripped libraries).
0.3 (June 16^th^, 2006)
- Updated to latest CVS.
- Linked against Cg Framework - shader support is now enabled.
- Included many Panda3D tools.
- Added correct license to installer.
When upgrading from 0.2 to 0.3 make sure to install the NVIDIA Cg Toolkit (installation instruction have been updated).
0.2 (June 7^th^, 2006)
- Fixed: package was not liked vs. Darwin Ports libraries but some old (and obselete) libraries on my system.
0.1 (June 6^th^, 2006)
- Initial release.
