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.
open3d constructed mesh is black
open3d constructed mesh is black
- Attachments
-
- Flipped Mesh with Normals
- flipped_with_normals.png (119.91 KiB) Viewed 2822 times
-
- Back Normals
- normals_back.png (224.67 KiB) Viewed 2822 times
-
- Front Normals
- normals_front.png (273.49 KiB) Viewed 2822 times
-
- Flipped Mesh
- flipped.png (118.67 KiB) Viewed 2822 times
-
- Front Mesh
- front.png (91.9 KiB) Viewed 2822 times
-
- Combined_cloud
- combined_plys.png (158.31 KiB) Viewed 2822 times
Re: open3d constructed mesh is black
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.
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.
Daniel, CloudCompare admin
Re: open3d constructed mesh is black
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
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
- Attachments
-
- ply_combined.zip
- Registered and combined ply
- (1.32 MiB) Downloaded 205 times
-
- plys_with_normals.zip
- Respective plys with normals
- (1.12 MiB) Downloaded 210 times
-
- pcds.zip
- Original pcds
- (467.75 KiB) Downloaded 205 times
Re: open3d constructed mesh is black
Thanks for the files.
So the first thing that stroke me when I opened the 'ply_combined' cloud was that the normals looked weird: 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: 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: See https://www.cloudcompare.org/doc/wiki/i ... n_(plugin)
So the first thing that stroke me when I opened the 'ply_combined' cloud was that the normals looked weird: 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: 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: See https://www.cloudcompare.org/doc/wiki/i ... n_(plugin)
Daniel, CloudCompare admin
Re: open3d constructed mesh is black
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.
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.
- Attachments
-
- Mesh with updated ply_combined (new normals)
- ply_cmbd_new_normals.png (205.21 KiB) Viewed 2490 times
-
- Mesh with original ply_combined
- ply_cmbd.png (212.92 KiB) Viewed 2490 times
Re: open3d constructed mesh is black
I don't know which algorithm (or version of PoissonRecon) they rely on?
Daniel, CloudCompare admin