xinjie.wang commited on
Commit
169b3e7
·
1 Parent(s): eaf0e34
Files changed (1) hide show
  1. asset3d_gen/data/backproject_v2.py +4 -4
asset3d_gen/data/backproject_v2.py CHANGED
@@ -270,9 +270,9 @@ class TextureBacker:
270
  scale: float = None,
271
  center: np.ndarray = None,
272
  ) -> tuple[np.ndarray, np.ndarray, np.ndarray]:
273
- vertices = mesh.vertices
274
- faces = mesh.faces
275
- uv_map = mesh.visual.uv
276
  uv_map[:, 1] = 1.0 - uv_map[:, 1]
277
 
278
  if scale is not None:
@@ -436,7 +436,7 @@ class TextureBacker:
436
  view_normals = self.compute_enhanced_viewnormal(
437
  self.renderer.mv_mtx, vertices, faces
438
  )
439
-
440
  textures, weighted_cos_maps = [], []
441
  for color, mask, dep, normal, uv, weight in zip(
442
  colors,
 
270
  scale: float = None,
271
  center: np.ndarray = None,
272
  ) -> tuple[np.ndarray, np.ndarray, np.ndarray]:
273
+ vertices = mesh.vertices.copy()
274
+ faces = mesh.faces.copy()
275
+ uv_map = mesh.visual.uv.copy()
276
  uv_map[:, 1] = 1.0 - uv_map[:, 1]
277
 
278
  if scale is not None:
 
436
  view_normals = self.compute_enhanced_viewnormal(
437
  self.renderer.mv_mtx, vertices, faces
438
  )
439
+
440
  textures, weighted_cos_maps = [], []
441
  for color, mask, dep, normal, uv, weight in zip(
442
  colors,