Skip to content

A straight-forward, easy-to-use, drop-in, PBR replacement for Panda3D's builtin auto shader

License

Notifications You must be signed in to change notification settings

Moguri/panda3d-simplepbr

Repository files navigation

Build Status

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.

IBL

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

B3D 3-Clause

About

A straight-forward, easy-to-use, drop-in, PBR replacement for Panda3D's builtin auto shader

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published