mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-19 22:00:35 +08:00
Fix softmax_rgb_blend() when mesh is outside zfar
Summary: This fixes two small issues with blending.py:softmax_rgb_blend(): 1) zfar and znear attributes are propagated from the camera settings instead of just using default settings of znear=1.0 and zfar=100.0 2) A check is added to prevent arithmetic overflow in softmax_rgb_blend() This is a fix in response to https://github.com/facebookresearch/pytorch3d/issues/334 where meshes rendererd using a SoftPhongShader with faces_per_pixel=1 appear black. This only occurs when the scale of the mesh is large (vertex values > 100, where 100 is the default value of zfar). This fix allows the caller to increase the value of cameras.zfar to match the scale of her/his mesh. Reviewed By: nikhilaravi Differential Revision: D23517541 fbshipit-source-id: ab8631ce9e5f2149f140b67b13eff857771b8807
This commit is contained in:
committed by
Facebook GitHub Bot
parent
6eb158e548
commit
f8ea5906c0
BIN
tests/data/test_simple_sphere_outside_zfar_100.png
Normal file
BIN
tests/data/test_simple_sphere_outside_zfar_100.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 758 B |
BIN
tests/data/test_simple_sphere_outside_zfar_10000.png
Normal file
BIN
tests/data/test_simple_sphere_outside_zfar_10000.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.7 KiB |
Reference in New Issue
Block a user