newton-pbr
Physically based camera sensor for Newton, rendered by mujoco_warp_pbr. Install it in a Newton project to render any Newton scene (built in code, or imported from USD, URDF or MJCF) with PBR shading, image-based lighting and ray-traced shadows, batched over all worlds.
import newton
import warp as wp
import newton_pbr
model = builder.finalize() # any Newton model; worlds must have the same visible shapes
state = model.state()
camera = newton_pbr.SensorPbrCamera(model, width=128, height=128, fovy=60.0, envmap="studio.hdr")
color = camera.allocate_image_color() # (world_count, height, width), packed RGBA
depth = camera.allocate_image_depth()
camera_transforms = wp.array([...], dtype=wp.transformf) # one per world, -Z forward, +Y up
camera.update(state, camera_transforms, color_image=color, depth_image=depth)
update mirrors newton.sensors.SensorCamera.update: one view per world, the same camera
convention and the same output formats:
color_image: packed RGBAuint32;depth_image: ray distance;forward_depth_image: planar depth;shape_index_image: shape index;hdr_color_image: linear HDR.
The pinhole image size and field of view are fixed at construction, instead of being passed as a ray bundle.
How it works. At construction the visible shapes of one world (plus global shapes such as the ground) become a MuJoCo model. Each frame, a kernel writes their world poses from Newton's body transforms into MuJoCo Warp's data; the BVH is refitted and the frame rendered. MuJoCo kinematics are never used.
Materials come from the Newton model:
- shape colours (sRGB) and opacity;
- mesh base-colour textures with UVs;
- scalar mesh metallic / roughness, as imported from USD.
Newton drops normal, ORM and emissive maps at import, so they are not available here.
Limits of Newton's importers. For MJCF loaded with add_mjcf:
- materials collapse to a colour and scalars, and textures are kept only when the UVs map one per vertex;
- lights are dropped;
- planes are collision-only.
newton_pbr.lights_from_mujoco(mjm, mjd) and the headlight= option restore an MJCF scene's
lighting. Newton shape colours are sRGB, while mujoco_warp_pbr reads MuJoCo rgba as linear, so the
same MJCF looks darker through Newton.
Lights. Newton models carry no lights. Pass envmap= for image-based lighting and / or
lights=[newton_pbr.Light(...)]. Without either, a key and a fill directional light are used.
Any other mujoco_warp_pbr.create_render_context option passes through as a keyword, e.g.
tier=mujoco_warp_pbr.Tier.PATH, samples_per_pixel=2 or light_model=....
Supported shapes: planes, spheres, capsules, ellipsoids, cylinders, boxes, meshes, convex meshes and cones (meshed). Height fields and Gaussians are not rendered yet (a warning is printed).
Metadata
Release files for newton-pbr 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| newton_pbr-0.1.0.tar.gz | 19.3 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| newton_pbr-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.0 kB
Release files / newton_pbr-0.1.0.tar.gz
| Download URL | newton_pbr-0.1.0.tar.gz |
|---|---|
| Size | 19.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3c00994bd69cbe771a2e88933c3256913c53cbdc2f1493d0a67dae4b32fc8417
|
|
BLAKE2b-256 checksum How to use checksums |
06c7499e6f871cc394288a94686092db5a76067ba3e1b77218c89b11a6fe98dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.
Transparency logRelease files / newton_pbr-0.1.0-py3-none-any.whl
| Download URL | newton_pbr-0.1.0-py3-none-any.whl |
|---|---|
| Size | 17.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
368e1c311759a8c65611a23d0dd005fa385311654b27d95c72a1813874a0284d
|
|
BLAKE2b-256 checksum How to use checksums |
d07cee58cda0e157747667479fdef457f3ca1eed09106fe56cd5eb9ba634d2e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.
Transparency logSecurity for newton-pbr 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for newton_pbr-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.