Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Base class for all types of generator modules. Generator modules are used to generate procedural assets within a simulation.
This module will generate an architectural interior space with doors and windows.
Instructions for building generating your space are stored in a separate configuration file. The configuration is referenced by the "multi_room_config"
parameter.
Each room is composed of the following properties.
"name"
: Each room is assigned a unique string. This is important. This label will be used to connect this room to other rooms and to apply placement rules.
"diagonal"
: Define the maximum and minimum size of your space.
"components"
: Add doors and windows to your space.
"connects"
: If this is defined when the rooms are rendered no wall will exist between the two spaces. For example, if you wanted the corridor to connect to the living room directly without a door. You would specify it as in the following example.
"has_wall"
: This property looks for the "connects"
property. If rooms are connected and this value is false
the rooms will be joined without a wall between them.
Generating a room in Lexset means you define a maximum and minimum size for the room. You also define where doors and windows get placed. To do this we have developed a unique way of describing these spaces.
Rooms are composed of segments. In the Lexset version 2, each room is composed of four segments.
In this example, we place a door on segment 1.
Coordinates defining room size need to represent a range of possible values and are expressed as a nested array. This is an example of how the .
If an element is dependent on another element such as placing a window or a door on a wall you will define that objects location in local (U,V) coordinates.
In the following example, a 1.2M wide door is placed on "segment 1" (a wall within a room) around the center. The "u" position is defined as a range between, 0.4 and 0.6. This indicates the door can be located ~16.67% of the length of the wall off of the center.
Once a room is defined you can access information about that room and use it to define the size and shape of other rooms.
It will often be necessary for you to make the size and location of rooms dependent on each other. You can access information about the rooms bounding box in the following way.
Rooms are stored in an array called rooms[]
properties can be accessed with the name property. In this example, we access the maximum and minimum x and y values for a room called "livingroom"
.
You can use this information to define the maximum and minimum values of another room's diagonal.
You can also access the (x,y) coordinates for each corner of your room. Corner IDs progress clockwise in the same order as the room segments.
Corners are accessed the same as the .left
, .right
, .top
and .bottom
values. Use your room name to access the room in the rooms[]
array. Corners are stored in the .corners[]
property. You will use a unique id to retrieve the (x,y) value for each corner.
This module will embed lighting in the ceiling of your room.
The Light Loader will place architectural lighting on your ceiling. You can modulate the intensity and placement of each light.
"use_IES_light"
: IES stands for Illuminating Engineering Society. An IES file is basically the measurement of distribution of light (intensity) stored in ASCII format. You can think of it as a digital profile of a real-world light. We use IES lights to ensure physical accuracy.
"preset"
: This can be defined as a "grid"
or a single light in the "center"
of the room.
"intensity"
: Intensity is defined in watts (radiant power) you can specify the intensity as a static value 1.5
or a range [1.5,2]
.
"grid_size"
: Set the space between lights. Units are in meters.
Assign textures to your room
The room texture loader is a submodule that enables you to assign a probability to a particular element being rendered in a certain material. For example, a 25% chance that a wall will be made of bricks.
The probability that a specific material category will be selected is driven by the "weight"
parameter. A "weight"
is a value between zero and one. For example, 1.0
is a 100% probability and 0.25
is 25%.
The following material types are currently available.
You can also create a new group of materials with a unique name. For example, if I wanted to apply the materials within "Others"
to a group that would be assigned to doors, you can use the "rename"
parameter.
The "rename"
parameter will create a new material group with a new name that can be referenced elsewhere in your simulation.
Types
Materials
Floor
Carpet Tiles Wood
Wall
Bricks
Concrete
Drywall
Tiles
Wallpaper
Ceiling
Any
Moulding
Drywall
Wood
Others
Any
Loader modules are responsible for loading content into the scene.
Loader modules are responsible for loading content into the scene. In this case, we are importing an .obj
file using loader.ObjectLoader
, which has its path specified as a command line argument. Other types of loader modules can be used to load other types of files (such as .blend
files and materials).
The structure modules are what enable you to generate structures and procedural assets within your virtual environment. These may in include buildings and other architectural elements.
In some cases, structure modules can generate "sub-domains." For example, within a house, you might have different rooms and you want objects and events to occur differently within each room.
Each sub-domain will have its own label and its own set of placement rules associated with that sub-domain. Placement rules are assigned to each subdomain by the "placement.PlacementHandler"
module which will be discussed later in this section.
In the following example we put all these concepts together and create a three room structure.