After several articles delving into 3D modeling techniques with free software, based on photogrammetry strategies or more precisely Structure from Motion (SFM) from unordered image sets, or in other words, taken with minimal planning from various viewpoints of an object or scene.
The result of these projects is a sparse point cloud, or better yet a dense point cloud, since it contains the RGB information of the texture of our scene.
Point clouds offer us important dimensional, geometric, and even colorimetric information about our scene. We can retouch and analyze these point clouds with tools like MeshLab, but a priori, they do not have special validity for processing in 3D modeling tools like Blender, to continue with Open Source tools.
Blender, like any other 3D modeling tool, works with objects constructed by meshes, formed from the information of the point clouds. This transformation from cloud to mesh is quite simple to perform and will allow us to carry out virtualization tasks such as lighting, camera movements, etc., on our scene.
The process with Meshlab is as follows:
First, the normals are calculated, which, in simplified terms, indicate the orientation of our surface, or in other words, determine which is the front or back of our model. For this, we go to the menu:
Filters > Point Set > Compute normals for point sets
In the Linux version of Meshlab, this function is under the submenu “Normals, Curvatures and Orientation” instead of “Point Set”.
and in the pop-up window we leave the value:
Number of neighbors 10
Personally, I have found that with most models I have generated and “meshed” with Meshlab, once in Blender the texture or surface appears on the opposite side; this is noticeable when applying lighting, as it only affects one side of the model. If this happens to us, in Blender we perform a “Flip Normals” to invert the normals and place the surface on the correct side of our model.
The next step is to create the mesh with:
Filters > Point Set > Surface Reconstruction: Poisson
And the values
Octree Depth 10 Solver Divide 8 Samples per node 1 Surface offsetting 1
Once the mesh is created, if we activate the solid or mesh view (smooth or flat) in Meshlab, we often find strange shapes that do not correspond at all to our model. This is due to how the mesh is computed, which often tends to close the model. If this happens, simply using the “faces” removal tools we can delete the parts of the mesh that are not of interest to us.
At this point, if we review the layers of our project, we find our initial layer or .ply and the mesh.
The final step is to apply our texture to the mesh, so that we have a solid with a texture. For this, we go to the following menu:
Filters > Sampling > Vertex Attribute Transfer
And we apply the following values:
Source Mesh xxx.ply Target Mesh Poisson mesh Transfer Color ok
So that the source layer is our dense point cloud or .ply and the target is our Poisson mesh.
With these simple steps, we can save our model as .ply to then import it into Blender to begin virtualization work.
