-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
About the speed #1
Comments
Oooops, I have encountered similar issues actually. This package seems much slower than other UV unwrapping libraries. I mainly followed the logic in UVAtlas.cpp, eliminating all optional branches. Could you please run the official Microsoft UVAtlasTool on the same mesh and let me know how long it takes? |
I didn't try the official tool, but it is much faster as far as I know. |
https://github.com/isl-org/Open3D/blob/main/cpp/open3d/t/geometry/kernel/UVUnwrapping.cpp |
Thank you for the feedback :] Sorry that I'm a bit busy with my paper right now. I estimate I will have time to look at this bug in a few weeks. I'll look into it right away as soon as I have some free time. |
It seems we need a pcapartition and then process parallely. Will you improve this? |
I'll take a look. I have also noticed that the parameter import open3d as o3d
import numpy as np
import trimesh
import time
mesh = trimesh.load('bunny.obj', process=False, force='mesh')
o3d_mesh = o3d.t.geometry.TriangleMesh()
o3d_mesh.vertex.positions = o3d.core.Tensor(mesh.vertices)
o3d_mesh.triangle.indices = o3d.core.Tensor(mesh.faces)
t1 = time.time()
o3d_mesh.compute_uvatlas(size=1024, gutter=10, parallel_partitions=4)
print("Time:", time.time() - t1)
# since in open3d uv is defined on triangles, we need to rearrange vertices
new_v = mesh.vertices[mesh.faces.reshape(-1)]
new_f = np.arange(len(new_v)).reshape(-1,3)
new_uv = o3d_mesh.triangle.texture_uvs.numpy().reshape(-1,2)
mesh = trimesh.Trimesh(
vertices=new_v,
faces=new_f,
process=False, # !important
)
mesh.visual = trimesh.visual.TextureVisuals(
uv=new_uv.astype(np.float32),
)
ret = mesh.export('bunny.uv.obj') |
I've identified the bug: it's important to remember to pass |
I am new to this area and trying to reproduce your code. I have successfully generated wrapped atlas from bunny.obj, but im having trouble converting the atlas (uvs, indices and vmapping) into 2D .png file. Can u plz share how u generate this pic? |
Have you tested the speed? It run over 30 seconds for a 10k vertices mesh, which is abnormal compared with open3d. I checked it was compiled with openmp.
Thank you. It is a great work.
The text was updated successfully, but these errors were encountered: