0%
Mitsuba 3
编译
- 自己编译:docs
- 编译命令:需要在使用的
python 环境下进行编译
1 2 3 4
| cd mitsuba
cmake -G "Visual Studio 17 2022" -A x64 -B build cmake --build build --config Release -j 4
|
1 2
| cd mitsuba/build/Release setpath.bat
|
- 设置默认的后端:修改文件
mitsuba3/CMakeLists.txt
- 初始默认:
scalar_rgb;scalar_spectral;cuda_ad_rgb;llvm_ad_rgb
- 注意:最少要保留
cuda_rgb
,只有 cuda_rgb
的话,会报错
1 2
| bitmap.obj : error LNK2001: 无法解析的外部符号 "public: bool __cdecl mitsuba::ReconstructionFilter<float,struct mitsuba::Color<float,3> >::is_box_filter(void)cons t " (?is_box_filter@?$ReconstructionFilter@MU?$Color@M$02@mitsuba@@@mitsuba@@QEBA_NXZ)
|
- 目前报错:
Access violation
- 不确定什么问题?
- 原来是
3.10.13
,新建了一个空环境 3.10.16
解决
1
| D:\Code\surui\2025-VFM\mitsuba3\build\src\python\drjit_stub_file_generation.vcxproj]
|
- 换完之后,一调用
mi.render()
就报错,傻逼
drjit
1 2 3 4 5 6
| dr.gather( dtype=dr.cuda.UInt, source=dr.cuda.UInt(1, 2, 3, 4, 5, 6), index=dr.cuda.UInt(0, 0, 1, 1, 5) )
|
1 2 3 4 5 6 7
| a = dr.empty(dr.cuda.Float, 5) dr.scatter( target=a, value=dr.cuda.Float(1, 2, 3, 4, 5), index=dr.cuda.UInt(4, 3, 2, 1, 0) )
|
- NPM 在 mitsuba 上的复现
- 先试试 NRC 的复现【OK】
- NPM 对 \(\lambda_i\)
求导,代码里是不是有点问题
- 减去项的分母应该是 pow2(totalWeight)