A simple, lightweight PBR render pipeline for Panda3D
Project description
panda3d-simplepbr
This is a simple, basic, lightweight, no-frills PBR render pipeline for Panda3D. It is currently intended to be used with panda3d-gltf, which will output textures in the right order. 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 potatoes with an easy OpenGL 2.1+ requirement
- Forward rendered metal-rough PBR
- All Panda3D light types except ambient (point, directional, and spot)
- Filmic tonemapping
Notable Todos
There are a few big things still missing and are planned to be implemented:
- Normals
- Shadow mapping
- Environment maps
Other missing features
The goal is to keep this simple and lightweight. As such, the following missing features are not currently on the roadmap:
- Something to deal with many lights (e.g., deferred, forward+, tiling, clustering, etc.)
- Fancy post-process effects (temporal anti-aliasing, ambient occlusion, screen-space reflections)
- Environment probes
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
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, but the following can be modified via keyword arguments:
render_node
: The node to attach the shader too, defaults to base.render
if None
window
: The window to attach the framebuffer too, defaults to base.win
if None
camera_node
: The NodePath of the camera to use when rendering the scene, defaults to base.cam
if None
Textures
The shader currently assumes that the following textures are in these slots:
- BaseColor
- MetalRoughness
- Normals (not currently supported)
Example
For an example application using panda3d-simplepbr
check out the viewer in the panda3d-gltf repo.
Running tests
python setup.py test
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 Distributions
Built Distribution
Hashes for panda3d_simplepbr-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f981ed4cf7c279ed10f2426c60b0b172b7f43d87339f60b9f6884454c86f4078 |
|
MD5 | aa3f532c5dac3d7f2559f94f24502873 |
|
BLAKE2b-256 | 4195d8082370207825af010e3223cd02ab9e441125cf29608e27140b0dd7054a |