A straight-forward, easy-to-use, drop-in, PBR replacement for Panda3D's builtin auto shader
Project description
panda3d-simplepbr
A straight-forward, easy-to-use PBR render pipeline for Panda3D. This project aims to be a drop-in replacement for Panda3D's auto-shader. The PBR shader is heavily inspired by the Khronos glTF Sample Viewer. Note: this project does not make an attempt to match a reference renderer.
Features
- Supports running on a wide range of hardware with an easy OpenGL 2.1+ requirement
- Forward rendered metal-rough PBR
- All Panda3D light types (point, directional, spot, and ambient)
- Filmic tonemapping
- Normal maps
- Emission maps
- Occlusion maps
- Basic shadow mapping for DirectionalLight and Spotlight
- Post-tonemapping color transform via a lookup table (LUT) texture
- IBL diffuse and specular
Installation
Use pip to install the panda3d-simplepbr
package:
pip install panda3d-simplepbr
To grab the latest development build, use:
pip install git+https://github.com/Moguri/panda3d-simplepbr.git
Documentation
More detailed documentation can be found here.
Usage
Just add simplepbr.init()
to your ShowBase
instance:
from direct.showbase.ShowBase import ShowBase
import simplepbr
class App(ShowBase):
def __init__(self):
super().__init__()
simplepbr.init()
The init()
function will choose typical defaults.
Details on available options can be found here
Example
For an example application using panda3d-simplepbr
check out the viewer in the panda3d-gltf repo.
Developing
This project uses uv for project management.
After installing uv
, run uv sync
to install dependencies and create a virtual environment.
Linting
This project uses ruff for linting. Running lint checks can be done with:
uv run ruff check
Running Tests
uv run pytest
Building Wheels
uv run build
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file panda3d_simplepbr-0.13.1.tar.gz
.
File metadata
- Download URL: panda3d_simplepbr-0.13.1.tar.gz
- Upload date:
- Size: 6.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
c83766d7c8f47499f365a07fe1dff078fc8b3054c2689bdc8dceabddfe7f1a35
|
|
MD5 |
e5382cf19e03fd306b2e459d628e5b9d
|
|
BLAKE2b-256 |
0dbec4d1ded04c22b357277cf6e6a44c1ab4abb285a700bd1991460460e05b99
|
File details
Details for the file panda3d_simplepbr-0.13.1-py3-none-any.whl
.
File metadata
- Download URL: panda3d_simplepbr-0.13.1-py3-none-any.whl
- Upload date:
- Size: 2.5 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
cda41cb57cff035b851646956cfbdcc408bee42511dabd4f2d7bd4fbf48c57a9
|
|
MD5 |
102cd54ffaf015bdfdf51bb4d3c8ffec
|
|
BLAKE2b-256 |
115d3744c6550dddf933785a37cdd4a9921fe13284e6d115b5a2637fe390f158
|