NCJ commited on
Commit
42295cc
1 Parent(s): 22e530a

try other color

Browse files
Files changed (1) hide show
  1. gradio_demo.py +1 -1
gradio_demo.py CHANGED
@@ -91,7 +91,7 @@ def mesh_gen(tmp_dir, simplify, num_inference_steps):
91
  vertex_normals = mesh.vertex_normals
92
  colors = (-vertex_normals + 1) / 2.0
93
  colors = (colors * 255).astype(np.uint8) # Convert to 8-bit color
94
- mesh.visual.vertex_colors = colors[..., [2, 0, 1]] # RGB -> BRG
95
  mesh.export(f"{tmp_dir}/mesh_normal.ply", file_type="ply")
96
 
97
  color_path = ply_to_glb(f"{tmp_dir}/mesh.ply")
 
91
  vertex_normals = mesh.vertex_normals
92
  colors = (-vertex_normals + 1) / 2.0
93
  colors = (colors * 255).astype(np.uint8) # Convert to 8-bit color
94
+ mesh.visual.vertex_colors = colors[..., [1, 0, 2]] # RGB -> GRB
95
  mesh.export(f"{tmp_dir}/mesh_normal.ply", file_type="ply")
96
 
97
  color_path = ply_to_glb(f"{tmp_dir}/mesh.ply")