facebookresearch / pytorch3d

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

Add EnvMapLights Class for Environment Map Lighting #1819

Closed ostapagon closed 1 month ago

ostapagon commented 3 months ago

🚀 Feature

Introduce an EnvMapLights class that illuminates a scene using a 2D discrete environment map. This environment map can be derived from spherical harmonics.

Motivation

Currently, PyTorch3D supports various types of lights, but there is no direct way to use 2D discrete environment maps for scene illumination. Adding this feature would enhance the lighting capabilities of PyTorch3D, making it easier to achieve realistic lighting effects in 3D scenes. This is particularly useful for applications in computer graphics and vision where environment lighting plays a crucial role.

Pitch

The EnvMapLights class will allow users to illuminate scenes using a 2D discrete environment map. The environment map can be obtained from spherical harmonics, offering a versatile and efficient way to simulate complex lighting conditions.

Implementation links:

Here is a link to a commit on forked repo with class and notebook. Google Colab Notebook