Open jackieyung opened 1 year ago
master
When I tried to use the method open3d.visualization.draw_geometries to render an image, I found the output is wrong. Below is my codes and results.
open3d.visualization.draw_geometries
Codes when I use the method open3d.visualization.draw_geometries:
import open3d as o3d import numpy as np import cv2 obj_path = 'Disk_01a.obj' texture_path = 'T_Disk_01a_D.png' vis = o3d.visualization.Visualizer() w = 1024 h = 1024 vis.create_window(visible=True, width=w, height=h) mesh = o3d.io.read_triangle_mesh(obj_path, enable_post_processing=True) vis.add_geometry(mesh) vis.poll_events() vis.update_renderer() o3d.visualization.draw_geometries([mesh], 'scene', width=w, height=h) vis.destroy_window()
The rendered image when I use the method open3d.visualization.draw_geometries:
From the result, we can see the texture image doesn't fill up the mesh. It's a wrong result.
When I change the method to open3d.visualization.draw, I got the right result.
open3d.visualization.draw
Codes when I use the method open3d.visualization.draw:
import open3d as o3d import numpy as np import open3d.visualization.rendering as rendering obj_path = 'Disk_01a.obj' texture_path = 'T_Disk_01a_D.png' mesh = o3d.io.read_triangle_mesh(obj_path, enable_post_processing=True) material = rendering.MaterialRecord() material.shader = "defaultLit" material.base_metallic = 1.0 material.albedo_img = o3d.io.read_image(texture_path) scene = {"name": 'scene', "geometry": mesh, "material": material} o3d.visualization.draw(scene, title="scene", width=1024, height=1024)
The rendered image when I use the method open3d.visualization.draw:
From the result, we can see the texture image totally fill up the mesh. It's a perfect result.
Here is the mesh and its texture image: scene.zip
Is there anyone who can help me to get the right rendered result while using the method open3d.visualization.draw_geometries? Thanks a lot. God bless you.
Hi, bro, have you found solution for this problem? i met the same problem https://github.com/isl-org/Open3D/issues/6506
Checklist
master
branch).My Question
When I tried to use the method
open3d.visualization.draw_geometries
to render an image, I found the output is wrong. Below is my codes and results.Codes when I use the method
open3d.visualization.draw_geometries
:The rendered image when I use the method
open3d.visualization.draw_geometries
:From the result, we can see the texture image doesn't fill up the mesh. It's a wrong result.
When I change the method to
open3d.visualization.draw
, I got the right result.Codes when I use the method
open3d.visualization.draw
:The rendered image when I use the method
open3d.visualization.draw
:From the result, we can see the texture image totally fill up the mesh. It's a perfect result.
Here is the mesh and its texture image: scene.zip
Is there anyone who can help me to get the right rendered result while using the method
open3d.visualization.draw_geometries
? Thanks a lot. God bless you.