mitsuba-renderer / mitsuba3

Mitsuba 3: A Retargetable Forward and Inverse Renderer
https://www.mitsuba-renderer.org/
Other
2.09k stars 246 forks source link

Dr.jit has no wrap function #1400

Closed XiongFenghhh closed 1 day ago

XiongFenghhh commented 2 days ago

Hello, I installed mitsuba3 with pip and I followed this tutorial. Then I encountered thie error

AttributeError: module 'drjit' has no attribute 'wrap'

Then I tried to compile mitsuba3 myself according to this, but I still got the same problem.

How can I fix this problem?

ziyi-zhang commented 1 day ago

Hi, When you compile Mitsuba from the source code, which commit are you using? There have been many changes recently. Does this error only occur with dr.wrap? Could you try to run other tutorial? Best

merlinND commented 1 day ago

Hi @XiongFenghhh,

As a quick note, the tutorial that you linked is expected to work with the latest Mitsuba master branch. For a version of the same tutorial that should work with the latest released Mitsuba version (i.e. what you can install from pip), see: https://mitsuba.readthedocs.io/en/stable/src/inverse_rendering/pytorch_mitsuba_interoperability.html

XiongFenghhh commented 1 day ago

Hi, When you compile Mitsuba from the source code, which commit are you using? There have been many changes recently. Does this error only occur with dr.wrap? Could you try to run other tutorial? Best

I tried v3.5.2 and the commitid is 29d6537; the corresponding dr.jit commitID is 4b022cb. I haven't tried other tutorial. At present, I'm attempting to use the latest Mitsuba.

merlinND commented 1 day ago

I'm attempting to use the latest Mitsuba

If you're attempting to use the latest Mitsuba (= upcoming version, not released yet), then you should compile master. The commit you pointed to should work with the older version of the tutorial that I linked above.

XiongFenghhh commented 1 day ago

I'm attempting to use the latest Mitsuba

If you're attempting to use the latest Mitsuba (= upcoming version, not released yet), then you should compile master. The commit you pointed to should work with the older version of the tutorial that I linked above.

@merlinND @ziyi-zhang I pulled the latest commit of mitsuba( and its submodule), recompiled it, and the drjit.wrap works normally now as in the tutorial .

Thanks!