In this tutorial we will talk about using flash during image collection and we will demonstrate it on a dataset which was taken on in exterior using Nikon D5300 camera.
The purpose of this use-case is to show how to use flash in order to get better texturing (without shadows) and a step-by-step tutorial on how to actually proceed.
Data collection and object definition
As an object, we have chosen a drift-wood stock on the shore of a small lake near our office. The stock was dry and it had a nice rugged texture patchily covered by moss. The images were taken on a semi-cloudy day, so the dataset contains images taken under the bright, sharp light, as well as diffused light. For taking images, we have chosen a digital single-lens reflex camera Nikon D5300.
The target of this experiment is to show how you can get better texture your models by using a specific capture workflow that includes flash. This can be useful and it can minimise the need of further usage of any software de-lighting tools. The basic approach we are about to follow is to take pictures with two different methods at the same time: one part using flashlight and the second part with no flash. We would align, as well as involve in the calculation of mesh all of them, but for the subsequent texturing only the ones using flash would be chosen. In this particular case we are going to texture the model with both types of pictures to demonstrate the difference that can be seen in the final outcome.
We are not saying that this is the ultimate workflow and using flash will guarantee the perfect texture. We just wanted to demonstrate the difference between texturing from images with and without flash. Whether the result is the perfect texture depends on your application and what exactly are you looking for. However, there are some customers that are using this workflow and stating that the results are usually good enough, so that they do not need to use additional de-lighting tools.
As usual, we have to start with loading images. In this case, it is good to sort out the images into two separate folders and also to change their names (images) from the corresponding default camera ID for their clear and simple distinguishability. For example:
Then, after loading the images, you can easily identify them.
TIP! If you are taking images just randomly (because of the weather or other conditions), you can usually find information on the use of flash in the corresponding EXIF file.
After sorting out the collected data, it is possible to begin with its processing in RealityCapture. As usual, we begin with the data import:
Continued by alignment:
For an easier manipulation, it is good to define a ground plane:
RECONSTRUCTION -> Model Alignment -> Define Ground Plane
And for efficient and faster mesh reconstruction, the setting of reconstruction region is favourable (if you did not set it, the reconstruction of the close surroundings of the modelled object could significantly extend the calculation time).
RECONSTRUCTION -> Model Alignment -> Set Reconstruction Region
Now we are ready to start the calculation of the model in high detail:
RECONSTRUCTION -> Process -> High Detail
…or normal detail:
RECONSTRUCTION -> Process -> Normal Detail
After the reconstruction, we would get a mesh without texture, in this particular case, with over 10 million of triangles and over 5 million of vertices, we need to simplify the model for further processing by setting the "Target triangles count" to 1 million.
You can find the Simplify Tool through:
RECONSTRUCTION -> Tools -> Simplify Tool
Choose the desired count of triangles and press the "simplify" button:
TIP! For better orientation, you can also rename a selected model by re-typing its name in the 1Ds view:
TIP! If you want to calculate two identical meshes, applying the Simplify Tool to a model by setting exactly the same number of triangles will create another identical model (in a very short time; in our case it was just 3 seconds):
We have used this "hack" to create two identical meshes, to calculate two different textures and to compare them:
As mentioned above, we want to calculate two different textures, one using the images taken with flash and the other using the images taken without flash. How can you do that?
First, you need to expand the Image list:
If the texture icon is highlighted grey, the particular image will be used for the mesh calculation (e.g. no_flash (1).JPG). If it is not highlighted grey, the image will not be used (e.g. flash (96).JPG).
Therefore, in this case, we would obtain a model with a texture corresponding to images, where the flash was not used by going through:
RECONSTRUCTION -> Process -> Texture
After inverting the highlighting of the images to the ones where the flash was used while taking them, you would obtain the promised identical meshes with different texturing.
Without using the flashlight:
With using the flashlight:
Once your models are calculated, you can also render them through:
RECONSTRUCTION -> Export -> Render
In the following images you can see the difference between the texturing of the model using images taken with the flash turned on and off.
Flash turned ON:
Flash turned OFF:
We can see that using the flashlight while taking images on a sunny day in exterior can help us create an effect of diffused light and eliminate shades without using additional software.