{"id":8396,"library":"panda3d","title":"Panda3D","description":"Panda3D is a comprehensive, open-source framework for 3D rendering and game development, supporting both Python and C++ programs. It is actively maintained with frequent minor and patch releases, typically focusing on stability, bug fixes, and Python version compatibility. The current version is 1.10.16.","status":"active","version":"1.10.16","language":"en","source_language":"en","source_url":"https://github.com/panda3d/panda3d","tags":["game-development","3d-rendering","engine","graphics","python"],"install":[{"cmd":"pip install panda3d","lang":"bash","label":"Install Panda3D"}],"dependencies":[],"imports":[{"note":"`DirectStart` was deprecated in Panda3D 1.9.0 and replaced by explicit `ShowBase` instantiation. The `DirectStart` import implicitly created a `ShowBase` instance, which is now discouraged for cleaner code.","wrong":"import direct.directbase.DirectStart","symbol":"ShowBase","correct":"from direct.showbase.ShowBase import ShowBase"},{"note":"Using `pandac.PandaModules` is discouraged since Panda3D 1.10.0. Specific modules like `panda3d.core`, `panda3d.egg`, etc., should be imported directly for better clarity and compatibility.","wrong":"from pandac.PandaModules import *","symbol":"core classes (e.g., WindowProperties)","correct":"from panda3d.core import WindowProperties"}],"quickstart":{"code":"from direct.showbase.ShowBase import ShowBase\nfrom panda3d.core import WindowProperties\n\nclass MyApp(ShowBase):\n    def __init__(self):\n        ShowBase.__init__(self)\n\n        # Set window properties\n        props = WindowProperties()\n        props.setSize(1024, 768)\n        self.win.requestProperties(props)\n\n        # Disable default mouse camera control\n        self.disableMouse()\n\n        print(\"Panda3D window opened. Close the window to exit.\")\n\napp = MyApp()\napp.run()\n","lang":"python","description":"This minimal example initializes Panda3D, creates a window with specified dimensions, and disables the default mouse camera control. It prints a message and then enters the main game loop (`app.run()`), which keeps the window open until closed by the user."},"warnings":[{"fix":"Replace `import direct.directbase.DirectStart` with `from direct.showbase.ShowBase import ShowBase` and instantiate `ShowBase` explicitly. Replace `from pandac.PandaModules import *` with specific imports from `panda3d.core` and other relevant `panda3d.*` modules.","message":"The use of `import direct.directbase.DirectStart` and `from pandac.PandaModules import *` is deprecated.","severity":"deprecated","affected_versions":"1.9.0 onwards for `DirectStart`, 1.10.0 onwards for `pandac.PandaModules`"},{"fix":"Optimize 3D models (coalesce meshes), minimize state changes, update text sparingly, and offload heavy Python computations to C++ plugins or optimized Panda3D functions. Utilize Panda3D's PStats tool for profiling to identify bottlenecks.","message":"Performance can suffer significantly from common pitfalls such as excessive meshes, too many state changes, frequent text updates, and performing complex Python calculations in the main loop.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Migrate to GLSL shaders for better compatibility and future-proofing on ARM platforms.","message":"Cg shaders, including the shader generator and `CommonFilters`, do not work on ARM-based machines (e.g., Apple Silicon) due to the unavailability of the NVIDIA Cg Toolkit for arm64 architecture. Cg will be deprecated in future versions.","severity":"gotcha","affected_versions":"All versions on ARM platforms"},{"fix":"Convert Windows-style paths (e.g., `C:\\models\\my_model.egg`) to Panda3D's Unix-style paths (e.g., `/c/models/my_model.egg`) or use `Filename.fromOsSpecific()` for conversion.","message":"When loading models or specifying file paths in Panda3D functions, use Unix-style forward slashes (`/`) even on Windows, and avoid drive letter prefixes like `C:`. Panda3D's internal filename conventions require this for portability.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Ensure `panda3d` is installed via `pip install panda3d`. If using a system-wide Python, verify that `PYTHONPATH` or `LD_LIBRARY_PATH` (on Linux) includes the Panda3D installation directories. On Windows, older SDKs required using their bundled Python or copying a `.pth` file.","cause":"Panda3D's Python modules are not found in the Python path. This can occur if Panda3D was not installed correctly, or if a different Python interpreter (not the one configured for Panda3D) is being used.","error":"ImportError: No module named direct.showbase.ShowBase"},{"fix":"Ensure your environment has up-to-date graphics drivers. When deploying applications with `build_apps`, explicitly include necessary render plug-ins (e.g., `'pandagl'`) in your `setup.py` file. For debugging, use a non-optimized build (`'use_optimized_wheels': False`).","cause":"This error typically occurs when Panda3D cannot find a suitable graphics API (e.g., OpenGL, DirectX) to render the scene. This can happen in packaged applications (`build_apps`) if render plugins are not included or if the system lacks necessary drivers.","error":"Exception: No graphics pipe is available! Have you included a render plug-in, such as `pandagl`, in your setup.py file?"},{"fix":"For `build_apps` applications, specify a log file via `log_filename` in `setup.py` to capture error messages. Debug using a non-optimized build. Common causes are missing files or Python version incompatibilities (e.g., Python 3.8.10 fixed in Panda3D 1.10.10).","cause":"When packaging with `build_apps`, console output might be suppressed, making it difficult to see runtime errors. The application crashes before the window can fully initialize or due to a missing dependency.","error":"Application window closes right away when run (especially after packaging with `build_apps`)."},{"fix":"Verify that the model was correctly exported with animation data. Check the animation names (case-sensitive) used in your code against those embedded in the model. Consult the Panda3D manual for details on exporting animated models.","cause":"This usually indicates that the model file (e.g., `.egg`) does not contain animation data or the specified animation name is incorrect. Animated models require both geometry and a skeleton to be exported together.","error":"KeyError when trying to play an animation on a model."}]}