Skip to content

Commit

Permalink
Update panda3D install documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
SamFlt committed Sep 19, 2024
1 parent f14d375 commit 90e288f
Showing 1 changed file with 33 additions and 2 deletions.
35 changes: 33 additions & 2 deletions doc/tutorial/rendering/tutorial-panda3d.dox
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ vpPanda3DBaseRenderer, which implements basic functions for a panda renderer.
\section tutorial-panda3d-install Panda3D installation
\subsection tutorial-panda3d-install-ubuntu Installation on Ubuntu

- It is recommended to install the assimp package before installing Panda3D. This will allow you to load .obj files, which are a common and easily exportable format.
Without it, you will be restricted to .bam files, which is a panda specific format. To convert to a .bam file, see \ref tutorial-panda3d-file-conversion.

To install assimp, run:
\code{.sh}
$ sudo apt install libassimp-dev
\endcode

- Installer are available for Ubuntu browsing the [download](https://www.panda3d.org/download/) page.

- Hereafter you will find the instructions to build and install Panda3D from source on Ubuntu 22.04
Expand All @@ -38,7 +46,7 @@ vpPanda3DBaseRenderer, which implements basic functions for a panda renderer.
$ cd $VISP_WS/3rdparty/panda3d
$ git clone https://github.com/panda3d/panda3d
$ cd panda3d
$ python3 makepanda/makepanda.py --everything --installer --no-egl --no-gles --no-gles2 --no-opencv
$ python3 makepanda/makepanda.py --everything --installer --no-opencv --threads `nproc`
\endcode
At this point you can either:
1. install the produced Debian package (recommended) with
Expand Down Expand Up @@ -90,6 +98,14 @@ vpPanda3DBaseRenderer, which implements basic functions for a panda renderer.

- Hereafter you will find the instructions to build Panda3D from source on macOS.

- It is recommended to install the assimp package before installing Panda3D. This will allow you to load .obj files, which are a common and easily exportable format.
Without it, you will be restricted to .bam files, which is a panda specific format. To convert to a .bam file, see \ref tutorial-panda3d-file-conversion.

To install assimp, run:
\code{.sh}
$ brew install assimp
\endcode

- On macOS, you will need to download a set of precompiled third-party packages in order to compile Panda3D.
Navigate to PandaED [download page](https://www.panda3d.org/download/), select the lastest SDK
(in our case SDK 1.10.14), and under `</> Source Code` section, download
Expand All @@ -113,7 +129,7 @@ vpPanda3DBaseRenderer, which implements basic functions for a panda renderer.
\endcode
- Build Panda3D from source
\code{.sh}
$ python3 makepanda/makepanda.py --everything --installer --no-egl --no-gles --no-gles2 --no-opencv --no-python --threads $(sysctl -n hw.logicalcpu)
$ python3 makepanda/makepanda.py --everything --installer --no-opencv --no-python --threads $(sysctl -n hw.logicalcpu)
\endcode

- At this point you can either
Expand Down Expand Up @@ -165,6 +181,21 @@ vpPanda3DBaseRenderer, which implements basic functions for a panda renderer.

- Installer are available for Windows browsing the [download](https://www.panda3d.org/download/) page.

\section tutorial-panda3d-file-conversion Converting a mesh to Panda's file format

If you did not install assimp before installing Panda, you are fairly restricted in what mesh format you can load with Panda.

Panda's recommended format is .bam, a binary format specific to the engine itself.
If you have Python, you can easily convert your model to a .bam file by doing the following:

1. Installing the panda3D-gltf package: `pip install panda3d-gltf`
2. From your favorite 3D modelling software export your model to GLTF (available in blender)
3. Running the converter tool:
\code{.sh}
$ gltf2bam source.gltf output.bam
\endcode
4. If you encounter issues, check the tool's settings with `gltf2bam -h`

\section tutorial-panda3d-usage Using Panda3D for rendering

An example that shows how to exploit Panda3D in ViSP to render a color image with support for textures and lighting, a
Expand Down

0 comments on commit 90e288f

Please sign in to comment.