Add MeshRasterizerOpenGL
Summary: Adding MeshRasterizerOpenGL, a faster alternative to MeshRasterizer. The new rasterizer follows the ideas from "Differentiable Surface Rendering via non-Differentiable Sampling". The new rasterizer 20x faster on a 2M face mesh (try pose optimization on Nefertiti from https://www.cs.cmu.edu/~kmcrane/Projects/ModelRepository/!). The larger the mesh, the larger the speedup. There are two main disadvantages: * The new rasterizer works with an OpenGL backend, so requires pycuda.gl and pyopengl installed (though we avoided writing any C++ code, everything is in Python!) * The new rasterizer is non-differentiable. However, you can still differentiate the rendering function if you use if with the new SplatterPhongShader which we recently added to PyTorch3D (see the original paper cited above). Reviewed By: patricklabatut, jcjohnson Differential Revision: D37698816 fbshipit-source-id: 54d120639d3cb001f096237807e54aced0acda25
|
Before Width: | Height: | Size: 32 KiB |
BIN
tests/data/test_cow_image_rectangle_MeshRasterizer.png
Normal file
|
After Width: | Height: | Size: 97 KiB |
BIN
tests/data/test_cow_image_rectangle_MeshRasterizerOpenGL.png
Normal file
|
After Width: | Height: | Size: 120 KiB |
BIN
tests/data/test_joinatlas_1_MeshRasterizer.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
tests/data/test_joinatlas_1_MeshRasterizerOpenGL.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
tests/data/test_joinatlas_2_MeshRasterizer.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
tests/data/test_joinatlas_2_MeshRasterizerOpenGL.png
Normal file
|
After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
BIN
tests/data/test_joinatlas_final_MeshRasterizerOpenGL.png
Normal file
|
After Width: | Height: | Size: 72 KiB |
BIN
tests/data/test_joined_spheres_splatter.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
tests/data/test_joinuvs0_MeshRasterizerOpenGL_final.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
BIN
tests/data/test_joinuvs1_MeshRasterizerOpenGL_final.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
BIN
tests/data/test_joinuvs2_MeshRasterizerOpenGL_final.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
BIN
tests/data/test_joinverts_final_MeshRasterizerOpenGL.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
BIN
tests/data/test_rasterized_sphere_MeshRasterizerOpenGL.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 3.0 KiB |
BIN
tests/data/test_rasterized_sphere_zoom_MeshRasterizer.png
Normal file
|
After Width: | Height: | Size: 568 B |
BIN
tests/data/test_rasterized_sphere_zoom_MeshRasterizerOpenGL.png
Normal file
|
After Width: | Height: | Size: 568 B |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 758 B After Width: | Height: | Size: 758 B |
|
After Width: | Height: | Size: 758 B |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
BIN
tests/data/test_texture_atlas_8x8_back_MeshRasterizerOpenGL.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
BIN
tests/data/test_texture_map_back_MeshRasterizerOpenGL.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
BIN
tests/data/test_texture_map_front_MeshRasterizerOpenGL.png
Normal file
|
After Width: | Height: | Size: 32 KiB |