Photorealistic textures in photogrammetry with Meshlab: 2nd method

0
752

In a previous article, I discussed the possibility of creating textures with a certain quality from the “raster layers” resulting from the camera positions of our SfM project. This first method is based on projecting the texture onto the mesh using the option “Project current raster color to current mesh” from the camera menu. Although this method of generating textures can yield a more or less good result depending on the quality of our meshes, it is common that it does not reach very high levels of “photorealism”.

If throughout our 3D digitization or documentation projects we need to capture the texture of our objects with a certain level of detail or fidelity, perhaps the most appropriate approach is to resort to this second method, by which we will create a texture in .PNG format that will be responsible for “covering” our mesh and endowing it with texture. Obviously, one must be prudent to save this image with the 3D model; otherwise, we will lose this information.

documentacion 3d patrimonioThe process will be carried out from an SfM project through the bundle.out and list.txt files, which I already discussed in the article “Creation of Orthophotos with Cloud Compare and Bundler“. The bundle.out file can be opened in Meshlab as a project, and then the location of the list.txt file is requested. With these two files, we can recreate the sparse point cloud and the camera positions with the respective images taken from each viewpoint. Subsequently, we must load our dense point cloud.

Next, we must create a mesh with the usual options, first calculating the normals and then creating a surface reconstruction by Poisson; this process is detailed in the article “From Meshlab to Blender: from point cloud to mesh”.

digitalizacion 3D patrimonioNext, we can generate our texture from the texture menu by choosing the option “Parametrization + Texturing from registered rasters”. In the pop-up window, we can select the name of our texture, the size of the resulting image, along with some additional parameters. After clicking the apply button, if everything has gone well, in the directory where our model was contained, we will have an image with our texture. If in the Render menu we execute the option “Show UV tex param”, a graphic showing the texture distribution will be displayed.

To finalize the process, since we still cannot see our texture functioning, we must save our model as .ply or .obj, the latter perhaps being more convenient if we are going to work later with tools such as Blender. During the export process of our model, we must ensure that in the “Texture Name” field the name of our image appears, and in Wedge that the TexCoord field is activated.

After saving our new model, if we load it into a new Meshlab project, it will already appear with the new texture assigned.

The quality and fidelity of our textures are intimately related to the quality and fidelity of the photographs we use to create our model.