A small PBR 3D Viewer in CLI powered by ModernGL
python -m pip install requirements.txt
python -m pbrv.main ...
python -m pip install -e .
pbrv [mesh_path ...] [--albedo VALUE_OR_PATH] [--normal PATH] [--roughness VALUE_OR_PATH] [--metallic VALUE_OR_PATH] [--ambient-occlusion PATH] [--emissive VALUE_OR_PATH] [--specular VALUE_OR_PATH] [--specular-tint SPECULAR_TINT] [-ssao] [--env VALUE_OR_PATH] [--directional-light-radiance VALUE] [--directional-light-direction VALUE] [--point-light-radiance VALUE] [--point-light-position VALUE] [-auto-sun] [--bloom] [--tone-mapping {simple,aces,reinhard,uncharted2,none}] [--exposure EXPOSURE] [--renderer RENDERER]
The window is a moderngl window so you can also use its arguments. For instance, set GLFW backend by adding --window glfw.
-
Interactive window
- Trackball camera (with path indepedance)
- Lclick: rotate
- Rclick: pan
- Dblclick: focus
- Ctrl+Lclick: rotate object
- Shift+Lclick: rotate environment
- Alt+Lclick: rotate directional light
-
Deferred Shading
-
Metal/roughness workflow
-
Normal mapping (tangent space)
-
SSAO (if no AO map)
-
Image based lighting
- Cubemaps
- Equirectangular panoramas (converted to cubemap)
- Cubemap prefiltering
- Irradiance (Cosine)
- Specular (GGX)
-
1 Directional light
-
1 Point light
-
Procedural Environment
- Sun (sunrise/dusk)
- Based on directional light direction
- Stars at night
- moderngl
- moderngl-window
- trimesh
- numpy
- pyrr
- opencv-python



