Photorealistic textures in photogrammetry with Meshlab: 1st method

0
1149

When working with point clouds, whether sparse or dense, along with XYZ information, we often additionally have RGB values associated with each point. This colorimetric information, although somewhat interesting, is usually insufficient if we are interested in reconstructing or recreating the texture of our model, since even if a certain density in the cloud is achieved, it is generally not enough for a sharp texture.

However, if we are directing our 3D modeling work towards the field of graphic documentation of heritage, perhaps aiming to generate realistic textures is not the most efficient approach; nevertheless, for the purpose of disseminating archaeological sites, rock art, etc., it may hold some interest.

If we work with Structure from Motion techniques, we can recover the camera information to project it onto a mesh. This information is contained in the well-known .out files generated by both Bundler and VisualSFM, which I already discussed in the article “Creation of Orthophotos with Cloud Compare and Bundler“. These .out files contain information about the sparse point cloud and the cameras.

From Meshlab we can load the .out files as new projects; we will immediately be prompted for the list.txt file with the location of the images or rasters associated with each camera position. Once the .out project is loaded, we will have access to the sparse point cloud, and at the bottom of the layers panel we can see the images. If we go to the Render > Show Cameras menu, we can see the position of the cameras and the rasters relative to our model, or if we go to the “Show current raster mode” menu, we can obtain the viewpoint of the image.

meshlab photogrammetry 3D heritage archaeologyTo work with textures, we must first create a mesh from the dense point cloud; for this, we also need to load the .ply file containing the dense point cloud. In the previous article “From Meshlab to Blender: from point cloud to mesh” this process was briefly discussed. In summary, we first calculate the normals with the option “Compute normals from points set” and then perform a surface reconstruction by Poisson with the option “Surface Reconstruction: Poisson”. At this point, we already have a mesh onto which we can project our cameras.

meshlab photogrammetry heritage rock artIf we go to the cameras section in filters, we can use the option “Project current raster color to current mesh” to project the selected image or raster onto the mesh. There are other options where we can use all the images, although this is usually unnecessary since it is not typically required to use all images to cover the entire mesh.

With this simple method, we can already load a realistic texture onto our meshes. The quality of the textures depends to some extent on the quality of the images used; aspects such as sharpness, focus, exposure, etc., will influence the quality of our textures. There are also techniques to fit an image onto our model and use it as a texture, a situation that may be addressed in another article.

If this method does not provide sufficient resolution in your textures, try the 2nd method.