The component is designed to capture images and panoramic views from cameras in the scene. The result of the component is saved in PNG files.
Select the menu item «Window / Infinity Code / Capture Camera», to open the component.
Window component consists of two sections:
- Capture settings - Component settings.
- Cameras - Camera from which will be capturing images.
Adjust the settings to capture and add the cameras from which you want to perform image capture. Capturing images is possible only in playmode. Run the scene and press «Start Capture».
Section «Capture Settings»
This section contains the basic settings of the component.
Render path - folder where the captured images are saved.
Shot mode - Capture mode:
- One Shot - the selected camera will be captured one frame.
- Frame Limit Sequence - the selected camera will be captured by the specified number of frames.
- Time Limit Sequence - With the capture of the selected cameras will be a specified number of seconds.
- No Limit Sequence - Capture images to be produced to the moment when you stop taking or not exit playback mode.
Name appendix - the last part of the file name:
- Frame Number - Number captured frame.
- System Time - The time of capture.
TimeScale mode - Changes the speed of the gameplay:
- Dont Use - Do not change the speed of the gameplay.
- On Start Shot - The speed of the gameplay changes, start capturing images.
- On Enter PlayMode - The speed of the gameplay changes immediately after switching to playback mode.
This section specifies the type of image capture and camera from which the image will be captured.
Type - the type of image capture:
- Cameras - Capture images to be produced from these cameras and stored in separate files.
- Panorama - Capture images to be produced from these cameras and combined in a single panorama.
Capture images from cameras
In the «Type» select «Cameras» and add cameras from which images are captured. Capture images from the cameras is performed simultaneously with all these cameras and stored in separate files for each camera and frame. The number of cameras is not limited. A large number of cameras used at the same time can have a negative impact on performance.
In the «Type» select «Panorama». In the «Output type» choose the type of panorama. Specify face size and six cameras, which will be captured the panorama.
The following types of panoramas:
- Cube Faces
- Three Two
«Create a prefab cameras for the panorama» - creates a specially prepared GameObject, containing six cameras and tuned specifically for the panorama. You only need to place a GameObject created in the right place.
«Get selected as prefab cameras» - If you need to use an already created earlier GameObject, then you can select an object in the Hierarchy window and click this button.