Page 1 of 1

open3d constructed mesh is black

Posted: Sat Apr 09, 2022 4:18 am
by devAB
I'm trying to create a mesh for a simple environment (i.e. playpen, ROS noetic and Gazebo). I used 10 pcd files (recorded using HDL-32E lidar) to create the mesh environment by using the following steps:

1- Remove radius outliers (nb_points=10, radius=0.8) from pcd files and save as ply files

2- Register ply files using point-to-plane ICP and pose graph optimization

3- Combine the ply files. Apparently, the combined cloud looks good (see combined_plys.png).

4- Reconstruct the mesh environment using poisson reconstruction (depth=14). The resultant mesh file shows a black rectangle only (see front.png). The flipped side show a kind of playpen environment but in bad look (see flipped.png). It is observed that the construction process generate a warning "Extract bad average roots: 21".

I did some R&D and observed that normals play a critical role in mesh reconstruction. I created the normals using cloudcompare and then set their orientation using orient_normals_to_align_with_direction. The registered and combined cloud now have normals, apparently aligned (see pic normals_front and normals_back). Consequently, there is some improvement in the flipped mesh but still the front side is a black rectangle. Any help/hint is much appreciated.

Re: open3d constructed mesh is black

Posted: Sat Apr 09, 2022 2:27 pm
by daniel
Would you be able to share the cloud with us maybe?

Then, I think an octree depth of 14 for such a simple cloud is probably way to 'deep'. And you should also filter the output mesh based on the associated density (just as within CC). Because PoissonRecon will always try to create a closed mesh by default.

Re: open3d constructed mesh is black

Posted: Sun Apr 10, 2022 7:28 pm
by devAB
Hi Daniel,

Thank you very much for your reply. Please find the original pcds (pcds.zip), respective plys (plys_with_normals.zip), and registered & combined (ply_combined.zip) cloud files attached herewith.

Note: I tried to use smaller depth size but still the front of the mesh is black.

Regards,
AB

Re: open3d constructed mesh is black

Posted: Wed Apr 13, 2022 7:34 pm
by daniel
Thanks for the files.

So the first thing that stroke me when I opened the 'ply_combined' cloud was that the normals looked weird:
bad_normals.JPG
bad_normals.JPG (87.78 KiB) Viewed 2552 times
The ones I picked as example here are on vertical walls, but 2 of them have normals also vertical (Nz is almost 1). While they should be more or leas horizontal. Good normals are mandatory to use Poisson Reconstruction. Where do these normals come from?

Anyway, I recomputed them with the 'Edit > Normals > Compute' tool:
compute_normals.JPG
compute_normals.JPG (36.96 KiB) Viewed 2552 times
From there, I was able to used the PoissonRecon plugin normally. Don't forget to enable the 'Density' output, so as to be able to segment the mesh and keep only the triangles which are close to the original points:
poisson_result.JPG
poisson_result.JPG (42.52 KiB) Viewed 2552 times
See https://www.cloudcompare.org/doc/wiki/i ... n_(plugin)

Re: open3d constructed mesh is black

Posted: Tue Apr 19, 2022 12:51 am
by devAB
Hi Daniel,

Thank you very much for all the suggestions and hints.

My original pointclouds do not have normals. The normals were created using CloudCompare (2.10.3, Zephyrus, Linux-64 bit) and then registered using open3d. It is noted that the CloudCompare version (2.10.3) does not have PoissonRecon plugin. Now, I have installed CouldCompare (2.12, Window-64 bit). As per your suggestion, I recreated the normals for ply_combined using CloudCompare and tried to reconstruct the environment using open3d. The resultant mesh is similar to the one mentioned above, i.e. still not good.

Moreover, as per your suggestion, I have created the mesh using CloudCompare (PoissonRecon plugin). The resultant mesh looks good, please see Mesh with updated ply_combined (new normals). It is noted that I have reconstructed the mesh environments with the CouldCompare (2.12) using the original ply_combined and updated ply_combined (with new normals). Both the resultant mesh environments look good. I could not understand why the mesh created from open3d is bad.

Re: open3d constructed mesh is black

Posted: Thu Apr 21, 2022 2:50 pm
by daniel
I don't know which algorithm (or version of PoissonRecon) they rely on?