mitsuba-renderer/mitsuba-blender

Cannot render in Blender using mitsuba as renderer

kvuong2711 opened this issue · 10 comments

Issue Title
When render a simple scene with mitsuba as the renderer, the image is empty.

Bug Description

Traceback (most recent call last): File "/home/khiem/.config/blender/3.3/scripts/addons/mitsuba-blender/engine/final.py", line 42, in render self.converter.scene_to_dict(depsgraph) TypeError: SceneConverter.scene_to_dict() missing 1 required positional argument: 'window_manager'

Resources
Blender file: https://drive.google.com/file/d/1sOkORFJkd8oHzvQwA1Raqm6vMcOON5Z0/view?usp=sharing

Environment (please complete the following information):

  • OS: Pop OS 20.04
  • mitsuba-blender v0.1alpha registered (with mitsuba v3.0.1)
  • Blender Version: 3.3.9

Hi,
Rendering with mitsuba within blender is under development, so it is not expected to work for the time being.

But how to render a scene, please?
I exported the blend to Mitsuba.xml and re-open with Mitsuba v0.5 but I had the traceback:
capture
For what version of Mitsuba I must download to render a scene, please?

EDIT: OK Without answer I respond to me:
Today the last version of Mitsuba is 0.5.0. You must download an old version of Mitsuba like 0.3.0 on the main windows FTP link: https://www.mitsuba-renderer.org/releases/0.3.0/windows/
And change in the preferences of the blender addon the last checkbox: "Use custom Mitsuba path (supported version is 3.0.1)" and navigate to the folder of your 0.3 relase of Mitsuba.
As you can read there are an ERROR here: (supported version is 3.0.1)
### The supported version is 0.3.0 !!!!!

EDIT 2: All is very confusing here! Sorry, your xml file work only with MITSUBA 3 here : https://mitsuba.readthedocs.io/en/stable/index.html

This is an exporter for Mitsuba 3, not Mitsuba 0.6. See the docs here.

You don't answer to my question please: How to render this xml file with MITSUBA 3 with blender?
Today you must export your scene in XML file but how to run MITSUBA 3 with this file please?

  1. Install Mitsuba 3 following the docs (using pip is recommended)
  2. Export the scene as XML using this addon
  3. Render the scene in the command line using mitsuba <exported_scene_name>.xml

No I have this:

PS C:\Users\Patrick\Mes Applications\blender-3.3.0-windows-x64\3.3\python\bin> .\python
Python 3.10.2 (main, Jan 27 2022, 08:34:43) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> mitsuba "E:\Users\Patrick\Bureau^untitled.xml"
  File "<stdin>", line 1
    mitsuba "E:\Users\Patrick\Bureau^untitled.xml"
                                                  ^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
>>>

You seem to be trying to run this command inside a python interactive prompt. If you just want to run mitsuba, you need to run it in the command line, not inside python.

No In command line you must go the folder of MITSUBA3 and type

.\mitsuba.exe "your file.xml"

How did you install mitsuba 3 ? If you did so using pip, you should be able to use mitsuba as I've explained above. If you built it from source, then you will need to run the setpath.bat script that will add this folder to your PATH environment variable, as explained in the docs.

If giving explanations pisses you off, you have to say it right away: I'm going to stop worrying about your damn MITSUBA3, which isn't worth it! Byebye.