This configuration is what will be used to generate the various rooms within your space.
[
{
"name": "livingroom",
"diagonal": [
[0, 0],
[[5, 8], [7, 8]]
],
"components": [
{"type": "window", "size": 2, "segment": 2}
]
},
{
"name": "bedroom1",
"diagonal": [
[[2,4], [0, 2]],
[[-1, -2], [-5, -6]]
],
"components": [
{"type": "door", "size": 1.2, "segment": 2, "u": [0, 0.4], "opening": [75, 90]},
{"type": "window", "size": 2, "segment": 0, "u": 0.5}
]
},
{
"name": "bedroom2",
"diagonal": [
"[rooms['bedroom1'].corners[1][0], rooms['bedroom1'].corners[1][1]+2]",
[[8, 10], 1]
],
"components": [
{"type": "door", "size": 1.2, "segment": 2, "u": [0.7, 1], "opening": [75, 90]},
{"type": "window", "size": 2, "segment": 0}
]
},
]
The space you will be generating has two bedrooms and one living room. This is the configuration for one of the bedrooms.
[
{
"parent": {"name": "wall"},
"child": {"category": "bed"},
"settings":{},
"rules": [
["center", {"on_z": true}],
["mount", {"parent_side": "left", "child_side":"back", "uv": [0.5, 0], "offset": 0.1}]
]
},
{
"parent": {"name": "bed"},
"child": {"name": "nightstand_left","category": "nightstand"},
"settings":{},
"rules": [
["center", {"on_z": true}],
["align", {"side": "back"}],
["neighbour", {"side": "left", "offset": 0.1}]
]
},
{
"parent": {"name": "bed"},
"child": {"name": "nightstand_right", "instance": "nightstand_left"},
"settings":{},
"rules": [
["center", {"on_z": true}],
["align", {"side": "back"}],
["neighbour", {"side": "right", "offset": 0.1}]
]
},
{
"parent": {"name": "nightstand_left"},
"child": {"name": "table_lamp_left", "category": "table_lamp"},
"settings":{},
"rules": [
["put", {"uv": [0.5, 0.5]}]
]
},
{
"parent": {"name": "nightstand_right"},
"child": {"name": "table_lamp_right", "instance": "table_lamp_left"},
"settings":{},
"rules": [
["put", {"uv": [0.5, 0.5]}]
]
},
{
"parent": {"name": "nightstand_left"},
"child": {"category": "book"},
"settings":{},
"rules": [
["put", {"uv": [0.5, 0.5], "rotation": [0, 360]}]
]
},
{
"parent": {"name": "wall"},
"child": {"category": "credenza"},
"settings":{},
"rules": [
["mount", {"parent_side": "right", "child_side": "back", "uv": [0.5, 0], "offset": 0.02}]
]
},
{
"parent": {"name": "credenza"},
"child": {"category": "television"},
"settings":{"from_folder": "/general/lexset/seahaven3.0/assets/office/television"},
"rules": [
["put", {"uv": [0.5, 0.5], "rotation": 0}]
]
},
{
"parent": {"name": "wall"},
"child": {"category": "armchair"},
"settings":{},
"rules": [
["rotate", {"degrees": 0}],
["mount", {"parent_side": "right", "child_side": "back", "uv": [[0.6, 1], 0], "offset": 0.1}]
]
},
{
"parent": {"name": "wall"},
"child": {"category": "painting"},
"settings":{"from_folder": "/general/lexset/seahaven3.0/assets/office/painting"},
"rules": [
["center", {}],
["mount", {"parent_side": "left", "child_side": "back", "uv": [0.5, 0.5]}]
]
},
{
"parent": {"name": "wall"},
"child": {"category": "curtain"},
"settings":{"raytrace_mode": "top"},
"rules": [
["center", {"on_z": true}],
["mount", {"parent_side": "front", "child_side": "back", "uv": [0.5, 0]}]
]
},
{
"parent": {"name": "wall"},
"child": {"category": "plants"},
"settings":{"num": [0, 2], "from_folder": "/general/lexset/seahaven3.0/assets/ilife/plants"},
"rules": [
["center", {"on_z": true}],
["mount", {"parent_side": "any", "child_side":"back", "uv": [[0, 1], 0], "offset": 0.05}]
]
},
]
You will need to upload the following placement rules to follow along in this tutorial.
These placement rules are associated with different modules. The following table shows which placement rules are associated with each module.
Module
Placement Rule
generator.Room
floorPlan.yaml
placement.PlacementHandler
bedroom1.yaml
placement.PlacementHandler
bedroom2.yaml
placement.PlacementHandler
livingroom.yaml
The space you will be generating has two bedrooms and one living room. This is the configuration for one of the living rooms.
[
{
"parent": {"name": "wall"},
"child": {"category": "credenza"},
"settings":{},
"rules": [
["mount", {"parent_side": "any", "child_side": "back", "uv": [0.5, 0], "offset": 0.02}]
]
},
{
"parent": {"name": "credenza"},
"child": {"category": "television"},
"settings":{"from_folder": "/general/lexset/seahaven3.0/assets/office/television"},
"rules": [
["put", {"uv": [0.5, 0.5], "rotation": 0}]
]
},
{
"parent": {"name": "credenza"},
"child": {"category": "sofa"},
"settings":{},
"rules": [
["rotate", {"degrees": 180}],
["neighbour", {"side": "front", "offset": [1, 2.5]}]
]
},
{
"parent": {"name": "sofa"},
"child": {"category": "armchair"},
"settings":{},
"rules": [
["center", {"on_z": true}],
["rotate", {"degrees": [-75, -90]}],
["neighbour", {"side": "right", "offset": [0.1, 0.3]}],
["neighbour", {"side": "front", "offset": [0.1, 0.3]}]
]
},
{
"parent": {"name": "sofa"},
"child": {"category": "coffee_table"},
"settings":{},
"rules": [
["center", {"on_z": true}],
["neighbour", {"side": "front", "offset": [0.2, 1]}]
]
},
{
"parent": {"name": "sofa"},
"child": {"category": "lamp"},
"settings":{},
"rules": [
["center", {"on_z": true}],
["neighbour", {"side": "right", "offset": [0.1, 0.3]}]
]
},
{
"parent": {"name": "wall"},
"child": {"category": "bookcase"},
"settings":{"num": 1},
"rules": [
["mount", {"parent_side": "any", "child_side": "back", "uv": [[0.2, 0.8], 0], "offset": 0.1}]
]
},
{
"parent": {"name": "wall"},
"child": {"category": "coatstand"},
"settings":{},
"rules": [
["mount", {"parent_side": "any", "child_side": "back", "uv": [[0.2, 0.8], 0], "offset": 0.1}]
]
},
{
"parent": {"name": "wall"},
"child": {"category": "display_case"},
"settings":{},
"rules": [
["mount", {"parent_side": "any", "child_side": "back", "uv": [[0.2, 0.8], 0], "offset": 0.1}]
]
},
{
"parent": {"name": "display_case"},
"child": {"category": "decoration"},
"settings":{"num": 3},
"rules": [
["put", {}]
]
},
{
"parent": {"name": "wall"},
"child": {"category": "dresser"},
"settings":{},
"rules": [
["mount", {"parent_side": "any", "child_side": "back", "uv": [[0.2, 0.8], 0], "offset": 0.1}]
]
},
{
"parent": {"name": "wall"},
"child": {"category": "painting"},
"settings":{"num": 2, "from_folder": "/general/lexset/seahaven3.0/assets/office/painting", "boundbox_collision": true},
"rules": [
["center", {}],
["mount", {"parent_side": "any", "child_side": "back", "uv": [[0.2, 0.8], 0.5]}]
]
},
{
"parent": {"name": "wall"},
"child": {"category": "wall_decoration"},
"settings":{"num": 2},
"rules": [
["center", {}],
["mount", {"parent_side": "any", "child_side": "back", "uv": [[0.2, 0.8], 0.5]}]
]
}
]
The space you will be generating has two bedrooms and one living room. This is the configuration for one of the bedrooms.
[
{
"parent": {"name": "wall"},
"child": {"category": "bed"},
"settings":{},
"rules": [
["center", {"on_z": true}],
["mount", {"parent_side": "any", "child_side":"back", "uv": [[0.2, 0.8], 0], "offset": 0.1}]
]
},
{
"parent": {"name": "bed"},
"child": {"name": "nightstand_left","category": "nightstand"},
"settings":{},
"rules": [
["rotate", {"degrees": [-5, 5]}],
["align", {"side": "back"}],
["neighbour", {"side": "left", "offset": 0.1}]
]
},
{
"parent": {"name": "bed"},
"child": {"name": "nightstand_right", "instance": "nightstand_left"},
"settings":{},
"rules": [
["rotate", {"degrees": [-5, 5]}],
["align", {"side": "back"}],
["neighbour", {"side": "right", "offset": 0.1}]
]
},
{
"parent": {"name": "nightstand_left"},
"child": {"name": "table_lamp_left", "category": "table_lamp"},
"settings":{},
"rules": [
["put", {"uv": [0.5, 0.5]}]
]
},
{
"parent": {"name": "nightstand_right"},
"child": {"name": "table_lamp_right", "instance": "table_lamp_left"},
"settings":{},
"rules": [
["put", {"uv": [0.5, 0.5]}]
]
},
{
"parent": {"name": "nightstand_left"},
"child": {"category": "book"},
"settings":{},
"rules": [
["put", {"uv": [0.5, 0.5], "rotation": [0, 360]}]
]
},
{
"parent": {"name": "wall"},
"child": {"category": "desk"},
"settings":{},
"rules": [
["mount", {"parent_side": "any", "child_side": "back", "uv": [[0.2, 0.8], 0], "offset": 0.1}]
]
},
{
"parent": {"name": "desk"},
"child": {"category": "chair"},
"settings":{},
"rules": [
["rotate", {"degrees": [165, 195]}],
["neighbour", {"side": "front", "offset": [-0.1, 0.1]}]
]
},
{
"parent": {"name": "wall"},
"child": {"category": "armchair"},
"settings":{},
"rules": [
["rotate", {"degrees": [-45, 45]}],
["mount", {"parent_side": "any", "child_side": "back", "uv": [[0, 1], 0], "offset": 0.1}]
]
},
{
"parent": {"name": "desk"},
"child": {"category": "computer"},
"settings":{},
"rules": [
["put", {"rotation": [-15, 15]}]
]
},
{
"parent": {"name": "desk"},
"child": {"category": "book"},
"settings":{},
"rules": [
["put", {"rotation": [0, 360]}]
]
},
{
"parent": {"name": "wall"},
"child": {"category": "credenza"},
"settings":{},
"rules": [
["mount", {"parent_side": "any", "child_side": "back", "uv": [[0, 1], 0], "offset": 0.02}]
]
},
{
"parent": {"name": "wall"},
"child": {"category": "wardrobe"},
"settings":{},
"rules": [
["mount", {"parent_side": "any", "child_side": "back", "uv": [[0, 1], 0], "offset": 0.02}]
]
},
{
"parent": {"name": "wall"},
"child": {"category": "wall_decoration"},
"settings":{"boundbox_collision": true, "num": 1},
"rules": [
["center", {}],
["mount", {"parent_side": "any", "child_side": "back", "uv": [[0.2, 0.8], [0.4, 0.6]]}]
]
},
{
"parent": {"name": "credenza"},
"child": {"category": "clutter"},
"settings":{"num": 3},
"rules": [
["put", {}]
]
},
{
"parent": {"name": "desk"},
"child": {"category": "clutter"},
"settings":{"num": 1},
"rules": [
["put", {}]
]
},
{
"parent": {"name": "wall"},
"child": {"category": "coatstand"},
"settings":{},
"rules": [
["mount", {"parent_side": "any", "child_side": "back", "uv": [[0.2, 0.8], 0], "offset": 0.1}]
]
},
{
"parent": {"name": "wall"},
"child": {"category": "plants"},
"settings":{"num": [0, 2], "from_folder": "/general/lexset/seahaven3.0/assets/ilife/plants"},
"rules": [
["center", {"on_z": true}],
["mount", {"parent_side": "any", "child_side":"back", "uv": [[0, 1], 0], "offset": 0.05}]
]
},
]