Add blender_principled BSDF as a Python plugin - #1822
Open
Speierers wants to merge 1 commit into
Open
Conversation
Speierers
force-pushed
the
blender_principled_bsdf
branch
from
December 17, 2025 11:17
d08fafa to
cb08ce6
Compare
ConnorBaker
added a commit
to ConnorBaker/mitsuba3
that referenced
this pull request
Sep 3, 2026
…aster Cluster P2 of the feature port (PORT_LOG.md): the mitsuba-renderer#1822-derived mitsuba.python.ad.bsdfs package (blender_principled, lobes/tables incl. the GGX energy tables, refraction, translucent, common) plus the C++ surface it stands on: - BSDFSample3::sampled_roughness_squared (b3c64fb) with its zero-sentinel and default-member-initializer reasoning intact; DRJIT_STRUCT and the wo-ctor updated; binding + docstr entry. Resolved against master's doc-conversion churn (the `//! @}` group markers are gone on master; the conflict was only ever about those). - SurfaceInteraction::min_alpha (faec917's interaction half) -- blender_principled READS it (attr.min_alpha = si.min_alpha), which is why it cannot wait for the P5 path.cpp cluster. Resolved against a291652's instance -> instance_index rework and the new frame_flipped field: the DRJIT_STRUCT/binding lists keep master's members and append min_alpha. - microfacet.h filter_glossy_alpha + the rough*/principled*/pplastic floor and reporting sites, applied clean (3-way) except principled.cpp's comment -style collision. - NOT ported: principledhelpers.h (the fork's delta there IS upstream 366de60, already on master). Registration: ad/__init__ re-exports .bsdfs; set_variant's JIT reload list gains mitsuba.python.ad.bsdfs (same mechanism as P1). Tests: the nine python_tests suites that exercise this cluster, at their fork-final state (incl. 26615f7's instance-class monkeypatch fix). Evidence: pre-compile overlay run against the 0cba523 binary -- 16 passed, 16 failed, and every failure is the SAME AttributeError: SurfaceInteraction3f has no min_alpha in the old binary. That is the expected signature of a Python tree running ahead of its C++; the compile of this commit is the gate, and the P2 row flips to compiled/tested only after it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PebCbQxKGLJZiynQmV1U44
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR provides a reference implementation of a Principled BSDF that matches the implementation in Blender 4.5 Cycles.