Skip to content

Commit 4e4fdc8

Browse files
authored
Add readme
1 parent 0543685 commit 4e4fdc8

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

dataset/README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Synthetic Dataset Generator
2+
3+
This is a tool that generates synthetic buildings of different typologies. To use it, first of all, you would need [Blender](https://www.blender.org/download/)>=2.90. After installation make sure to add blender as an Environment variable. To use the package:
4+
```
5+
git clone https://github.com/CDInstitute/CompoNET
6+
```
7+
Navigate to the ```dataset``` folder.
8+
9+
## Synthetic Buildings
10+
11+
<img src="dataset/imgs/synthetic.png" width="500"/>
12+
To create completely synthetic buildings use:
13+
14+
```
15+
blender setup.blend --python generaotr.py
16+
```
17+
if you want blender to act n background use:
18+
```
19+
blender --background setup.blend --python generaotr.py
20+
```
21+
22+
Note:
23+
if there are any specific parameters for your buildings (e.g. max and min height / width / length), you can provide them in ```config.py```. Default values adhere to international standards (min) and most common European values (max):
24+
25+
* minimum height 3m
26+
* minimum length and width 6m
27+
* maximum length, width, height 30 m
28+
29+
Make sure to adjust the camera in setup.blend if you choose different values.
30+
31+
## Buildings from existing .shp files:
32+
33+
<img src="dataset/imgs/qgis_example1.png" width="900"/>
34+
35+
Use provided .gltf (or your own) to create separate .obj files for each building in .gltf:
36+
```
37+
blender --background setup.blend --python shp2obj.py your_file.gltf
38+
```
39+
For now there is a manual process to convert shapefiles to .gltf format due to inaccuracies in Qgis2threejs library (will be fixed later):
40+
* Load your .shp file into [QGis](https://www.qgis.org/en/site/)
41+
* Indicate your height field as a z-dimension in ```Properties -> ```
42+
* [Install](https://qgis2threejs.readthedocs.io/en/docs/Tutorial.html#install-the-plugin) Qgis2threejs plugin if you do not have it yet
43+
* Select the buildings that interest you, make sure not to choose too many, as you might not have enough RAM
44+
* ```Web -> Qgis2threejs -> choose your layer```
45+
* ```Right click on the layer -> Properties -> height -> choose your height field```
46+
* ```File -> Save Scene As -> .gltf```

0 commit comments

Comments
 (0)