Skip to content

Commit

Permalink
fix some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
lizhiqi49 committed Nov 5, 2024
1 parent 456c2ee commit 04d4a12
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ system:
lambda_normal: 0.
lambda_normal_smooth: 0.
lambda_normal_consistency: 100.
lambda_normal_depth_consistency: 1.
lambda_normal_depth_consistency: 0.
lambda_laplacian_smoothing: 0.
lambda_arap_reg_key_frame: 10.
lambda_arap_reg_inter_frame: 10.
Expand Down
8 changes: 4 additions & 4 deletions custom/threestudio-dreammesh4d/geometry/sugar.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ def load_surface_mesh_to_bind(self, mesh=None):
vert_colors = np.array(o3d_mesh.vertex_colors)
if len(vert_colors) == 0:
vert_colors = np.ones_like(verts) * 0.5
# verts, faces, vert_colors = self.prune_isolated_points(
# verts, faces, vert_colors
# )
verts, faces, vert_colors = self.prune_isolated_points(
verts, faces, vert_colors
)
self.register_buffer(
"_surface_mesh_faces", torch.as_tensor(faces, device=self.device)
)
Expand Down Expand Up @@ -519,7 +519,7 @@ def quaternions(self):

@property
def get_face_normals(self) -> Float[Tensor, "N_faces 3"]:
return - F.normalize(self.surface_mesh.faces_normals_list()[0], dim=-1)
return F.normalize(self.surface_mesh.faces_normals_list()[0], dim=-1)

@property
def get_gs_normals(self) -> Float[Tensor, "N_gs 3"]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def forward(
cov3D_precomp=cov3D_precomp,
)
normal = F.normalize(normal, dim=0)
normal = - normal # the mesh extracted by sugar has inward-pointing normals
# normal = - normal # the mesh extracted by sugar has inward-pointing normals
normal_map = normal * 0.5 * rendered_alpha + 0.5
mask = rendered_alpha > 0.99
normal_mask = mask.repeat(3, 1, 1)
Expand Down

0 comments on commit 04d4a12

Please sign in to comment.