Simulation Structure

Simulations are configured through a series of YAML files and uploaded to the Lexset servers for processing.

This tutorial will explain the structure of these configuration files and how to edit them.

Anatomy of a simulation

Simulations are composed of both "pipeline configs" and "placement rules."

  • Pipeline configs are composed of key/value pairs that coordinate various aspects of running a simulation. Modules include the version of Lexset's software you are using, global variables (to be shared across the application), dependencies, and more. Modules contain all the necessary instructions to run your simulation. Including loading 3D assets, manipulating cameras, and exporting data.

  • Placement rules govern how objects relate spatially. For example, placement rules might describe how the television is mounted on a wall or the probability that a nightstand might be next to the bed in a bedroom.

What is a Module?

A Module serves to execute a single step in the render pipeline, whether it be populating the scene with objects (loader), manipulating camera positions (camera), or outputting files of various formats (writer).

Pipeline Config Architecture

Every config contains four key/value pairs, namely "version", "global", "setup" and "modules".

{
  "version": 2, #Most recent version of Lexset is version 2
  "global": { #Set param values across all modules in the pipeline
    "all": {
      "temp_dir": "/tmp", # An example of how  to set a global variable
    }
  },
  "setup": { #Not required in most cases             
    "pip": [ 
      "h5py", 
    ]
  },
  "modules": [
  # This is where you will create your simulation
  # You will add and edit modules here. 
  ]
}
  • "version": Indicates the version of Lexset being used. The most recent version of Lexset is version 2. This should not be changed.

  • "global": Provides the ability to set param values across all modules in the pipeline. Within the parameter "all", global parameters are set by using the param name as its key and the param value as its value. This can be an empty dict if desired. For example:

  • "setup": A dict containing several values related to project setup. In the example above, pip modules are declared that might be necessary for the project.

  • "modules": A list of Modules to be used in the pipeline. Each module is formatted as follows:

{
  "module": "name.OfModule",
  "config": {
    "module_param1": "param1_val",
    "module_param2": "param2_val",
    "module_param3": "param3_val"
  }
}

Submodules

Some modules can have other modules attached to them.

{
  "module": "name.OfModule",
  "config": {
    "module_param1": "param1_val",
    "module_param2": "param2_val",
    "module_param3": "param3_val"
  }
  "submodule":{
    "submodule_param1": "param1_val",
    "submodule_param2": "param2_val"
  }
}

Last updated