Spaces:
Starting
Starting
Update app.py
Browse files
app.py
CHANGED
@@ -328,7 +328,7 @@ def get_mesh(image, depth, blur_data, loadall):
|
|
328 |
mesh_n.append(str(fnum))
|
329 |
|
330 |
triangles = create_triangles(rgba.shape[0], rgba.shape[1])
|
331 |
-
rgba_pil = Image.fromarray(
|
332 |
material = trimesh.visual.texture.SimpleMaterial(image=rgba_pil) #, ambient=[0,0,0,0], diffuse=[0,0,0,0], specular=[0,0,0,0], glossiness=1.0)
|
333 |
visuals = trimesh.visual.TextureVisuals(uv=uvs, image=rgba_pil, material=material)
|
334 |
mesh.append(trimesh.Trimesh(vertices=verts, faces=triangles, vertex_normals=normals, visual=visuals, validate=True, process=False))
|
@@ -634,6 +634,7 @@ async(p, d, n)=>{
|
|
634 |
bg[i] /= 255;
|
635 |
}
|
636 |
BABYLON.Engine.LastCreatedScene.clearColor = new BABYLON.Color4(bg[0], bg[1], bg[2], bg[3]);
|
|
|
637 |
//BABYLON.Engine.LastCreatedScene.autoClear = false;
|
638 |
//BABYLON.Engine.LastCreatedScene.autoClearDepthAndStencil = false;
|
639 |
for (var i=0; i<BABYLON.Engine.LastCreatedScene.getNodes().length; i++) {
|
|
|
328 |
mesh_n.append(str(fnum))
|
329 |
|
330 |
triangles = create_triangles(rgba.shape[0], rgba.shape[1])
|
331 |
+
rgba_pil = Image.fromarray(rgba.astype(np.uint8))
|
332 |
material = trimesh.visual.texture.SimpleMaterial(image=rgba_pil) #, ambient=[0,0,0,0], diffuse=[0,0,0,0], specular=[0,0,0,0], glossiness=1.0)
|
333 |
visuals = trimesh.visual.TextureVisuals(uv=uvs, image=rgba_pil, material=material)
|
334 |
mesh.append(trimesh.Trimesh(vertices=verts, faces=triangles, vertex_normals=normals, visual=visuals, validate=True, process=False))
|
|
|
634 |
bg[i] /= 255;
|
635 |
}
|
636 |
BABYLON.Engine.LastCreatedScene.clearColor = new BABYLON.Color4(bg[0], bg[1], bg[2], bg[3]);
|
637 |
+
BABYLON.Engine.LastCreatedScene.ambientColor = new BABYLON.Color4(255,255,255,255);
|
638 |
//BABYLON.Engine.LastCreatedScene.autoClear = false;
|
639 |
//BABYLON.Engine.LastCreatedScene.autoClearDepthAndStencil = false;
|
640 |
for (var i=0; i<BABYLON.Engine.LastCreatedScene.getNodes().length; i++) {
|