facebookresearch / pytorch3d

PyTorch3D is FAIR's library of reusable components for deep learning with 3D data
https://pytorch3d.org/
Other
8.67k stars 1.3k forks source link

Problems about Camera position optimization using differentiable rendering #224

Closed caozhenxiang-kouji closed 3 years ago

caozhenxiang-kouji commented 4 years ago

I 'm working on Windows 10 and I 'm trying the example of Camera position optimization using differentiable rendering. I use phong_renderer to render the object and the background is white but I notice that your pictures have a black background. Can you tell me how to change the background? Thanks a lot!

gkioxari commented 3 years ago

We have added support of a variety of background colors defined in BlendParams

https://github.com/facebookresearch/pytorch3d/blob/e5ac38aa87efd440b356cb8d8e2d424efac3d523/pytorch3d/renderer/blending.py#L18-L21

This allows you to specify the color of the background.