## 4 Method
### Synthetic Data Generation
#### 4.1.1 Designing and Building 3D Scene  
UE4 was installed together with the NDDS following the NDDS's installation guide [9]. As the engine ran on C++, Visual Studio 2019 (VS19) was installed for the engine to be able to compile the environment with blueprints. Within object detection, each object has a specific class. Assets are referred to as different versions of a class. The UE4 marketplace provides custom assets made by the community and professionals at different price ranges. The assets representing objects vary in size, color, shape, and other characteristics as decided by their respective creators. A more comprehensive guide to designing custom 3D scenes in UE4 can be found in _3D Game Design with Unreal Engine 4 and Blender_[23]. To calibrate the neural network, the only asset used was a forklift. As the model picked up on the underlying characteristics, more objects were added to the visual scenes. Below is the list of classes and assets (i.e., objects) used for the final dataset. A total of 1500 images were used per asset (Full dataset: [[https://ieee-dataport.org/documents/synthetic-data-generated-unreal-engine-4](https://ieee-dataport.org/documents/synthetic-data-generated-unreal-engine-4)]([https://ieee-dataport.org/documents/synthetic-data-generated-unreal-engine-4](https://ieee-dataport.org/documents/synthetic-data-generated-unreal-engine-4)) (accessed on 20 August 2022)):  
Figure 5: Example of data generated in UE4: (**a**) HDRI and distractors; (**b**) randomized environment with distractors; (**c**) HDRI with no distractors.  
**Forklift--**1 asset.  
**Pallet--**8 different assets.  
**Shipping container--**6 different assets.  
**Barrel--**8 different assets.  
**Human--**2 different assets.  
**Paper box--**10 different assets.  
**Crate--**5 different assets.  
**Fence--**4 different assets.  
**4.1.2. Synthetic Scene Parameters  
The HDRI backdrop function is unavailable in the version of Unreal Game Engine that was used in this paper. A solution to this was creating it manually by first creating a sky sphere surrounding the environment. Then, a custom material was added to the sphere with a normalization blueprint. As shown in Figure 6, the image was appended to this blueprint, resulting in dynamic contrast, brightness, and tint. This backdrop was used along with more complex backgrounds to create a more varied and robust model.  
A premade virtual camera by NDDS was added to the level with default feature extracting, including object data, true color, depth, and segmentation. The camera was set to auto-start, capturing data immediately upon launching the scene and exporting them to a specified path on the simulating computer. Simultaneously, as the virtual camera captured data, the camera rapidly re-positioned while revolving the object. The distance from the origin ranged from 100 cm to 2000 cm, the pitch angle from 0\({}^{\circ}\) to 60\({}^{\circ}\), and the yaw from 0\({}^{\circ}\) to 360\({}^{\circ}\).  
Random teleportation was implemented into the light source as well. This created realistic visualizations by simulating different times of the day. The teleportation included a pitch range around the origin from \(-10^{\circ}\) to 90\({}^{\circ}\) with a 360\({}^{\circ}\) yaw range, resulting in the light casting shades from every realistic angle. In addition, the fog was simulated by varying the occlusion of the scene.  
In addition to the objects of interest, random objects were spawned into the scene as distractors. This included the NDDS's small random 3D geometrical objects such as cubes, pyramids, cones, spheres, and cylinders. Adding noise to the scene created a more robust deep learning model by causing better generalization of the objects in the CNN.