xxlong0 / Wonder3D

Single Image to 3D using Cross-Domain Diffusion for 3D Generation
https://www.xxlong.site/Wonder3D/
GNU Affero General Public License v3.0
4.49k stars 351 forks source link

Render dataset normal map color question #141

Closed Jinzhe-Zhang closed 4 months ago

Jinzhe-Zhang commented 4 months ago

I rendered a cube-like object with render_batch_ortho.sh. The normal map colors are around rgb(127,127,255) viewed from both front and back. However, when I inference object the normal map results are around rgb(127,127,255) viewed from front and rgb(127,127,0) viewed from back. Which kind of normal map did you use for training?

我这里结果显示数据集渲染时生成的法向图颜色以相机坐标系为准,比如从后边看长方体后面,法向图和从前面看长方体前面一样都为rgb(127,127,255);但模型推理时生成的法向图颜色不随观察者视角变动,而是以世界坐标系为准,物体上同一个点从不同方向看法向图颜色是一样的。 数据训练使用的数据集具体使用哪一种标准?

flamehaze1115 commented 4 months ago

在dataloader里面会转换一下normal的坐标系

Jinzhe-Zhang commented 4 months ago

OK, thanks for reply. The code "normal = trans_normal(img2normal(normal), RT_w2c, RT_w2c_cond)" in mvdiffusion/data/objaverse_dataset.py convert the coordinate. I didn't find it before.