text
stringlengths 0
1.11k
|
---|
The Synthetic Environment Builder lets you use your own synthetic environment for mixed reality simulation in the Meta XR Simulator. It is a UPM package that you can import into your Unity project containing a synthetic environment, and turn that project into a Synthetic Environment Server.\\MetaXRSimulator\config\anchors section of your Meta Simulator package. |
Default file: scene_anchors_empty_room.json |
Other file: scene_anchors_room_with_furnitures.json |
As a user you have an option to create a new scene JSON file. This can be done in two different ways. |
Generate a new scene JSON file using SceneDataRecorder.apk. For instructions on this please see the Scene Data Recorder section. |
Copy one of the existing JSON files and manually edit it to ensure it suits your needs. The rest of this section will describe the layout of the document and what to update. You may name your new JSON file with any new title you deem appropriate. During runtime you can upload the new file via the Settings in the Meta XR Simulator. See end of this document for instructions on how to do this. |
Note |
All scene anchors specified in these JSON files have components set with units, which are based on the units in the app/engine. For example, a unit in Unity is one meter. This means, for example, if you alter the position of a ceiling by one, you are moving it by one meter. |
Layout |
The layout of the JSON file is separated into two sections, Anchors and Components. |
The Anchors section lists the UUID of every anchor in the scene. The Components section lists details on each component belonging to each scene anchor. A component specifies an element of an anchor. |
Components |
Bounded2D |
Locatable |
RoomLayout |
SemanticLabels |
SpaceContainer |
With this file, you can add/edit furniture, or change the layout of the scene. |
Frequent tasks |
Adding furniture |
Let’s add a Desk in the center of the room. In the noted sections, add the following elements to each list. You will notice the same UUID is consistent throughout the file for this new furniture item. This UUID must be unique and a character set in a similar format to the other UUIDs you see in the file. |
Add an item to the Semantic Labels list like so. Note the label is specified as Table. |
{ |
"anchor": "6876ec4f-a078-48db-9acc-d6ddeeee9579", |
"enabled": true, |
"labels": [ |
"TABLE" |
] |
} |
Labels have different images associated with it. The full list of semantic labels are: |
TABLE |
COUCH |
FLOOR |
CEILING |
WALL_FACE |
WINDOW_FRAME |
DOOR_FRAME |
STORAGE |
BED |
SCREEN |
LAMP |
PLANT |
OTHER |
Add to the Bounded2D list. Note that this is where we specify the dimensions of our object. |
{ |
"anchor": "6876ec4f-a078-48db-9acc-d6ddeeee9579", |
"enabled": true, |
"rect2D": { |
"extent": { |
"height": 1.149999976158142, |
"width": 0.6000000238418579 |
}, |
"offset": { |
"x": -0.30000001192092896, |
"y": -0.5699999928474426 |
} |
} |
} |
Add to the Locatable list. Note that this where we specify the orientation and position of the object. |
{ |
"anchor": "6876ec4f-a078-48db-9acc-d6ddeeee9579", |
"enabled": false, |
"pose": { |
"orientation": { |
"w": -0.06019899994134903, |
"x": 0.06019800156354904, |
"y": 0.7045429944992065, |
"z": 0.7045369744300842 |
}, |
"position": { |
"x": -0.66, |
"y": -0.2223919928073883, |
"z": 0.4180830121040344 |
} |
} |
} |
*Note: It is enabled false here but set to true automatically during runtime. This requires no action from the user. |
The UUID 6876ec4f-a078-48db-9acc-d6ddeeee9579 created here now needs to be added to two additional sections. |
SpaceContainer: spaces list. |
"SpaceContainer": [ |
{ |
"anchor": "a06dd9cc-b1a1-41be-88b7-d3f6d9060b7b", |
"enabled": true, |