diff --git a/src/Assets/ISGT_diagramme.jpg b/src/Assets/ISGT_diagramme.jpg new file mode 100644 index 0000000..496430f Binary files /dev/null and b/src/Assets/ISGT_diagramme.jpg differ diff --git a/src/Doc/Steps/db.md b/src/Doc/Steps/db.md index 1d6e866..179dbce 100644 --- a/src/Doc/Steps/db.md +++ b/src/Doc/Steps/db.md @@ -1 +1,36 @@ -# Database \ No newline at end of file +# Database Generation +## Save Camera view + +In the runtime, the main camera view will be automatically saved in the path you specify. The camera view will be saved as a .png file with the date and time as the file name. +There is a parameter where you can set the number of screenshots you want to save per room. The default value is 5. + +## Camera parameters + +The camera can be adjusted with the following parameters: + +- **Field of view**: The field of view of the camera. The default value is 90. +- **ISO**: The ISO of the camera. +- **Focus distance**: The shutter speed of the camera. +- **Aperture**: The aperture of the camera. The default value is 5.6. + +- **Camera rotation**: Define the maximum rotation of the camera in degrees. By default, the camera will on all axes. + +## Take a screenshot + +To take a screenshot of the camera view, you can use the following code: + +```Csharp +using UnityEngine; +using CameraScreenshot; + +public class CameraScreenshotExample : MonoBehaviour +{ + [SerializeField] private CameraScreenshot cameraScreenshot; + void Start() + { + cameraScreenshot.savePath = Application.dataPath + "/yourPath"; + cameraScreenshot.CaptureScreenshot(); + } +} +``` + diff --git a/src/Doc/Steps/room.md b/src/Doc/Steps/room.md index 6565e6b..d74866d 100644 --- a/src/Doc/Steps/room.md +++ b/src/Doc/Steps/room.md @@ -1 +1,33 @@ -# Room generation \ No newline at end of file +# Room generation + +## Room generation +The room generation is the first step of the generation process. It is the step where the room structure is created. The room is composed of a grid of cells. Each cell has 4 walls (North, East, South, West), a floor and ceiling. The algorithm starts by creating a grid of cells. It then chooses a random cell as the current cell and marks it as visited. The algorithm then chooses a random unvisited neighbor of the current cell and moves to it. The algorithm repeats this process until it reaches a cell that has no unvisited neighbors. When this happens, the algorithm backtracks to the previous cell and repeats the process until all cells have been visited. The result is an empty room with walls, floor and ceiling. + +## Room generation parameters +The room generation algorithm has several parameters that can be adjusted to change the room structure. The parameters are as follows: + +- **Width**: The width of the room in cells. default value is 2.5 meters. +- **Height**: The height of the room in cells. default value is 2.5 meters. +- **Max room size**: The maximum size of the room in cells. default value is room 40x40 cells. + +## Room generation example +The following example shows how to generate a room with the default parameters: + +```Csharp +using ClassicRoom; +using UnityEngine; + +public class RoomGenerationExample : MonoBehaviour +{ + + [SerializeField] private RoomGenerationData roomGenerationData; + void Start() + { + ClassicRoom room = gameObject.AddComponent(); + + room.InitRoom(roomGenerationData);//generate room with defined parameters + } +} +``` + + diff --git a/src/Doc/Steps/steps_menu.md b/src/Doc/Steps/steps_menu.md index da3d441..53f8031 100644 --- a/src/Doc/Steps/steps_menu.md +++ b/src/Doc/Steps/steps_menu.md @@ -1 +1,10 @@ -# Steps \ No newline at end of file +# Steps + +There 3 big steps to generate synthetic data with `ISGT`: +![](../../Assets/ISGT_diagramme.jpg) + +Find details in the following sections: + +1. [Room generation](room.md) +2. [Object generation](props.md) +3. [Data generation](db.md) \ No newline at end of file