Skip to content

Conversation

@dvicini
Copy link
Member

@dvicini dvicini commented Jul 6, 2025

This PR updates the plugin to use the latest Mitsuba APIs. Mainly, the Properties API has been slightly modified.

Moreover, it improves the testing scripts to better support local runs of unit tests.

(work in progress, not yet ready to merge. This will require a Mitsuba release to use the latest APIs)

@dvicini
Copy link
Member Author

dvicini commented Jul 6, 2025

At the moment, there appears to be an issue with Mitsuba picking up Blender's embree library (version 4). I can work around by running with LD_PRELOAD, but probably that's not ideal:

LD_PRELOAD=~/code/mitsuba3/build/blender-dbg/libembree3.so $BLENDER -b -noaudio --factory-startup --python scripts/run_tests.py --mitsuba ~/code/mitsuba3/build/blender-dbg/ -- -v --cov=mitsuba-blender

@bathal1 How come this wasn't an issue in the past? Any idea?

@dvicini
Copy link
Member Author

dvicini commented Jul 8, 2025

The embree symbol issue was now fixed in Mitsuba itself: mitsuba-renderer/mitsuba3#1663

@bathal1 bathal1 changed the title [WIP] Update to latest Mitsuba (& testing improvements) [WIP] v0.5.0 Jul 15, 2025
@bathal1
Copy link
Collaborator

bathal1 commented Jul 15, 2025

I'll be pushing some commits to prepare for the next release of the add-on here @dvicini.

Regarding testing, it would be nice to add more extensive round-trip tests. IIRC we also only test one round-trip, but two might pose an issue. For example, exporting a scene from blender will wrap all BSDFs into twosided Mitsuba plugins, but when re-importing that scene, this will create additional nodes in the shader graph for each material to emulate that plugin. This is not necessary and may pose issue when exporting once again.

@dvicini
Copy link
Member Author

dvicini commented Jul 15, 2025

Sounds good! I don't have local changes, feel free to use this branch. We can later maybe cleanup the history a bit and squash some of my earlier commits into fewer ones.

For testing: Not just round trip tests, but it would also be good to more rigorously test that the renderings match. For example, Blender at some point changed its definition of the light source intensities, which leads to very different outputs if not handled correctly. My suggestion would be to test some of those things by programmatically creating simple blender scenes, rendering them, exporting, and rendering with Mitsuba and comparing final images.

@merlinND
Copy link
Member

By the way, is #105 (same title) deprecated or should it be combined with this PR?

@bathal1 bathal1 force-pushed the mitsuba_version_update branch from 9b4d664 to 12d0644 Compare August 11, 2025 15:25
@bathal1 bathal1 force-pushed the mitsuba_version_update branch 2 times, most recently from b974e5f to 691f0b4 Compare August 12, 2025 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants