Skip to content

Commit

Permalink
Use nvdiffrast for rasterization, split dibr_rasterization in two bas…
Browse files Browse the repository at this point in the history
…e functions (#560)

* make dedicated Rasterize autograd function with support for nvdiffrast

Signed-off-by: cfujitsang <cfujitsang@nvidia.com>

* fix doc build issue

Signed-off-by: Clement Fuji Tsang <cfujitsang@nvidia.com>
  • Loading branch information
Caenorst committed May 5, 2022
1 parent 048e069 commit e916fd3
Show file tree
Hide file tree
Showing 67 changed files with 3,396 additions and 2,132 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "third_party/cub"]
path = third_party/cub
url = https://github.com/NVIDIA/cub
[submodule "third_party/nvdiffrast"]
path = third_party/nvdiffrast
url = https://github.com/NVlabs/nvdiffrast
1 change: 1 addition & 0 deletions docs/kaolin_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def run_apidoc(_):
"kaolin/ops/spc/points.py",
"kaolin/ops/spc/uint8.py",
"kaolin/render/mesh/deftet.py",
"kaolin/render/mesh/dibr.py",
"kaolin/render/mesh/rasterization.py",
"kaolin/render/mesh/utils.py",
"kaolin/render/spc/raytrace.py",
Expand Down
6 changes: 4 additions & 2 deletions kaolin/csrc/bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
#include "./ops/conversions/unbatched_mcube/unbatched_mcube.h"
#include "./metrics/sided_distance.h"
#include "./metrics/unbatched_triangle_distance.h"
#include "./render/dibr.h"
#include "./render/mesh/deftet.h"
#include "./render/mesh/rasterization.h"
#include "./render/mesh/dibr_soft_mask.h"
#include "./ops/conversions/mesh_to_spc/mesh_to_spc.h"
#include "./ops/spc/spc.h"
#include "./ops/spc/feature_grids.h"
Expand Down Expand Up @@ -72,8 +73,9 @@ PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {
py::module render = m.def_submodule("render");
py::module render_mesh = render.def_submodule("mesh");
render_mesh.def("packed_rasterize_forward_cuda", &packed_rasterize_forward_cuda);
render_mesh.def("generate_soft_mask_cuda", &generate_soft_mask_cuda);
render_mesh.def("rasterize_backward_cuda", &rasterize_backward_cuda);
render_mesh.def("dibr_soft_mask_forward_cuda", &dibr_soft_mask_forward_cuda);
render_mesh.def("dibr_soft_mask_backward_cuda", &dibr_soft_mask_backward_cuda);
render_mesh.def("deftet_sparse_render_forward_cuda", &deftet_sparse_render_forward_cuda);
render_mesh.def("deftet_sparse_render_backward_cuda", &deftet_sparse_render_backward_cuda);
py::module render_spc = render.def_submodule("spc");
Expand Down
254 changes: 0 additions & 254 deletions kaolin/csrc/render/dibr.cpp

This file was deleted.

68 changes: 0 additions & 68 deletions kaolin/csrc/render/dibr.h

This file was deleted.

0 comments on commit e916fd3

Please sign in to comment.