-
Notifications
You must be signed in to change notification settings - Fork 1
Entity Types
| The Fundamentals → Entity Types |
|---|
Written by Connor Jakubik.
Prerequisites:
Entities are spawned in different ways depending on their type. Different programs in the Platform handle Entity Types differently. The following describes the significance of each Entity Type as specified in a Sim Config or Entity Template / Entity Config. Besides FromTemplate and Assembly-related types, these only become significant in our Unreal Engine (UE) client program.
- Minimal, parameters only.
- No graphical representation in the simulation.
- Still valid to do Frames or physics things with this entity.
- No
#Dataparameters section. - Any unrecognized Entity type will load as a
Datatype.
- This type only exists for loading purposes
- Inside a simulation, you will not encounter an actual
Entitywith typeFromTemplate; onlyEntityConfigobjects have this type.
- Inside a simulation, you will not encounter an actual
- The name (
#Required/Name) of this FromTemplate Entity will be used in place of the name on the Entity Config that is loaded. -
#FromTemplaterequired parameters:-
Source_Path: astringwith the filepath (relative to the Platform root directory) to an Entity Config to load. - (Optional)
ParamOverrides: a param map that you can put parameters in to either overwrite or add onto the loaded template's parameters, including special parameters such as type.
-
- Uses a
UStaticMesh(Unreal Engine static mesh - 3D model with a default material applied) as its physical representation. - These static mesh assets are included by SimDynamX into STP releases.
-
#Objectrequired parameters:-
Mesh_Path: astringwith the results of pasting after doingRight Click->Copy Referenceon a Static Mesh asset in the Content Browser.
-
- Uses the
Graphics/Scaleparameter to set scale.
- Uses a runtime-loaded GLTF / GLB 3D model as its physical representation.
-
#Object_Loadedrequired parameters:-
Mesh_Path: astringwith the filepath to the GLTF-formatted file to load..gltfand.glbare supported.- Core assets:
Core/...path to the file in ST install directory.- Example:
Core/SharedData/SCAssets/LoadableMeshes/SpaceX_Starship/SpaceX_Starship.gltf
- Example:
- Local assets:
Local/...path to the file inside Local Assets folder- Example:
Local/Repos/MySpaceshipStuff/Soyuz1.glb
- Example:
- Core assets:
- If the mesh has material assignments that aren't part of the core library of materials, those can use a combination of numbers and imported images defined through parameters.
-
- Procedural-Mesh-Generation Planet.
-
#Planetrequired parameters:- There are TONS of required parameters; I recommend using a
FromTemplatetype and pointing itsSource_Pathto a Planet Entity Config. - TODO list out the required parameters
- There are TONS of required parameters; I recommend using a
- Uses an Unreal Blueprint subclass of
Entity_Impl(C++AEntity_Impl) (or subclasses thereof) as its physical representation. - Type name can also be
UI, for backwards compatibility -
#BPrequired parameters:-
BP_Path: a string with the results of pasting after doingRight Click->Copy Referenceon a Blueprint asset in the Content Browser.- (NOTE): BP_Path requires you to edit this to remove the
Blueprint'prefix, and replace the end'with_C.
- (NOTE): BP_Path requires you to edit this to remove the
-
- This entity represents a Role can be "Possessed" by a user in a simulation.
- Uses an Unreal Blueprint subclass of
Entity_Pawn(C++AEntity_Pawn) (or subclasses thereof) as its physical representation. -
#Pawnrequired parameters:-
BP_Path: a string with the results of pasting after doingRight Click->Copy Referenceon a Blueprint asset in the Content Browser.- (NOTE): BP_Path requires you to edit this to remove the
Blueprint'prefix, and replace the end'with_C.
- (NOTE): BP_Path requires you to edit this to remove the
-
Role_Name: a string, how this Pawn appears on a Role Picker. -
Is_Possessed: a bool, set tofalseinitially, that tracks whether any of the clients in a multiuser sim have taken ownership of this pawn. -
Username: a string, set to"(No User)"initially, that indicates the username of the client that takes ownership of this pawn. -
GraphicsFrame: an EntityRef to the Entity which this Pawn uses the body-fixed frame of as a Graphics Frame. If you possess (switch control to) this pawn, the Graphics Frame will be changed to match this Entity. More details in reference frames docs.
-
-
#Pawnoptional parameters:-
Gadgets: set of Unreal Widget classes that are loaded into various Tabs (Left, Right, TopLeft, TopRight) while possessing this pawn.
-
- Move this entity into place by setting its location/rotation and resident frame. Capture an image using C++ or Python functions:
- C++:
st_camera::CaptureImage()andst_camera::OnImageReceived() - Python:
st.CaptureImage()andst.OnImageReceived()
- C++:
- No
#Cameraparameters section. - Camera image capture properties are specified every time a capture is commanded, not saved into camera entity parameters.
- This (WIP) type is similar to a
FromTemplatetype, except thisAssembly-type Entity will be kept during the simulation. - An assembly defines Subparts as well as Edges.
- Subparts are similar to FromTemplate type, and all get loaded in "with" this assembly entity. As of v0.28.0, rigid physical connection to the parent Assembly entity is assumed.
- Edges define connections between Subparts. All edges have a To and a From EntityRef, a
- Upon spawning its subparts, this Assembly will hold
EntityRefparameters to them in each of the#Assembly/Subparts/<subpart name>/Reflocations. - Upon spawning its edges, this Assembly will hold
EntityRefparameters to them in each of the#Assembly/Edges/<edge name>/Reflocations. - NOTE: the parameters that are defined in
#Assembly/Subparts/<subpart name>/ and#Assembly/Edges/<edge name>/ are only the INITIAL values of those parameters. The real values that are updated by the sim are in the parameters of the separate Entity referred to by"Ref". -
#Assemblyrequired parameters:-
Subparts: a param map with a nested param map for each Subpart of this Assembly - Required parameters for each Subpart:
-
Source_Path: astringwith the filepath (relative to the Platform root directory) to this Entity Template to load. - (Optional)
ParamOverrides: a param map that you can put parameters in to either overwrite or add onto the loaded template's parameters, including special parameters such as type. -
Rel_Location: adoubleV3with the location of this subpart relative to its parent. -
Rel_Rotation: adoubleV4with the quaternion rotation of this subpart relative to its parent. -
Socket: anint32that denotes which of the parent's sockets the subpart occupies, and is -1 if the subpart does not occupy a socket. -
Attachment: astringthat matches one of a set of possible ways this subpart is attached to its parent: (TODO).
-
-
Edges: a param map with a nested param map for each Edge of this Assembly - Required parameters for each Edge:
-
(WIP)
-
-
- Edge on an Assembly.
- Cannot be directly created from a sim config.
- No
#Edgeparameters section. - Read above for details.
We may add more Entity types in the future. The variable type for the type field is a string, so unfamiliar entity types on a certain client program can still be parsed without error.
These are some Entity Config (.enconf) files that we use often and are included with the core installation of Space Teams PRO.
WIP
Place a Gadget as a 2D panel within the simulation, instead of as part of a Pawn's UI.
"BP_Path": "/Game/SpaceCRAFT_2_UI/E_WidgetPanel.E_WidgetPanel_C"- Example Usage:
- Everything inside
"Params": {gets passed to the Gadget's params
{ "#BP": { "BP_Path": "/Game/SpaceCRAFT_2_UI/E_WidgetPanel.E_WidgetPanel_C" }, "#Required": { "Name": "Panel3", "Systems": [], "Type": "BP" }, "Dynamics": { "Propagator": "Custom", "ResidentFrame": [ "EntityRef", "Orion" ] }, "Location": [ "doubleV3", 1.070949, 0.231187, 1.494932 ], "Rotation": [ "doubleV4", 0,0.2251364,0,0.9743273 ], "Gadget": { "WidgetClass": "WidgetBlueprint'/Game/SpaceCRAFT_2_UI/InSim/W_CameraDisplay.W_CameraDisplay'", "Size_cm": [ "doubleV2", 15.0, 15.0 ], "Resolution_pix_cm": 40, "CameraFacing": false, "Params": { "Entity": ["EntityRef", "DockingCamera"], "Framerate": 5.0, "Properties": { "CaptureID": ["uint32", 0], "FOV": ["double", 30.0], "Cols": ["int32", 512], "Rows": ["int32", 512], "Physical": false, "Exposure": ["double", 14.0], "ISO": ["float", 100.0], "fStop": ["float", 5.6], "minfStop": ["float", 1.2], "shutterSpeed_Hz": ["float", 500], "numApertureBlades": ["int32", 6], "chrom_abbr_intensity": ["float", 0.0], "focus_distance_m": ["float", 1000], "chrom_abbr_offset": ["float", 0.0] }, "Crosshair": true } } }, - Everything inside
WIP