-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add documentation for room generation and databse generation
- Loading branch information
1 parent
0d963aa
commit 1f33d00
Showing
4 changed files
with
79 additions
and
3 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,36 @@ | ||
# Database | ||
# 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(); | ||
} | ||
} | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,33 @@ | ||
# Room generation | ||
# 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<ClassicRoom>(); | ||
|
||
room.InitRoom(roomGenerationData);//generate room with defined parameters | ||
} | ||
} | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,10 @@ | ||
# Steps | ||
# 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) |