# Roof 3D modeling

The 3D modeling techniques described in this page are based on S3DB definition and Kendzi 3D PlugIn for JOSM.

1. Roof with one slope
this very common but for the most users complicated roof needs in addition to `roof:shape=skillion` tag still the rotation definition- means the ftom top to down direction of fall of the water on the roof.
This angle is described as `roof:direction=<value in degrees>`

An example shows how to easily determine this angle and what could be done wrong:

1. An existing `building=yes` with `roof:shape=hipped` shape:

The so called skeleton algorithm generates following 2d result:

And as 3D model we would get this:

Our wishful result should look different:

This can be realized only by use of tag `roof:direction=*` for each surface:

### Measurement of `roof:direction=*`

This method need in JOSM PlugIn: BuildingTools

Activate the wishful roof polygon and add the attributtes: `roof:shape=skillion`+ `roof:direction=*`

1. Klick on the BuildingTools symbol
2. start to draw the building (from the lowest roof polygon corner) using building tools.
3. Note the value of angle shown bottom left in JOSM
4. Put this angle als value of `roof:direction=*` tag.

enjoy the modeling!

### Sphere modeling

I know from Wikipedia, the `height=*` of the tower in "my" building is 80m
I assume, the middle of the tower is 79.30m.

Because there is no sphere in the specification, I construct a sheet model:

400px this sketch help me to avoid wrong height values:

Sheet nr. 1.:

Sheet nr. 2.:

Sheet nr. 3.:

I decide, this looks not good enough and add one sheet more:

The result now:

### Complex shapes

The approach is easy to understand: Try to divide complicated geometries in simple elements. Similar to cone modeling. The difference to, let´s say Lego elements, is the possibility of spatial overlapping, fusion of elements.

results in: