I've been working on this steadily. So far, I've identified MECS objects and a hierarchy of construction.
The MECS Construct
Defines a MECS Building Block/Accessory and its Connectors.
Block: 3D Mesh in which one more Connectors are added.
- Block Skin: Textures, Maps and Shaders applied to a Block
Accessory: Audio/Visual or Virtual Object in which one more Connectors are added.
- FX Objects: Particle Emitters, LensFlares
- 3D Objects: Mesh, Lights, Camera, Sound
- Physics Objects: Cloth, Hit Objects
Connector: A connection point in which a Blocks and Accessories are connected.
- Mount: A external connector added to mesh or internal point defined within the mesh used to connect Parts & Accessories at runtime. Gender determines Parent/Child Relation between block and connector. Mounts have 3 types of Genders: Slot/Peg/Any. Slots are Parented by Blocks, Blocks are Parented by Pegs, Only Slot to Peg relationship allowed between specified Mounts of either gender. If the connection gender is any is used as standard mount
- Bone: two connecting points defined within a mesh used for bone animation. The two points maintain a Parent/Child relationship defined by the animation data. Two Bones connect to each other, at the points of the same name. Bones can be assigned a gender to connect to Mounts and Joints.
- Joint: Dark Physics Rigid Body Joint often used in Machines: 6DOF, Clyindrical, Distance, Fixed, Point in Plane, Point on Line, Prismatic,Pully, Revolute, Sphere.
- Weld: A vertex point defined within a mesh and assigned to be used for (magnetic threshold) welding of two meshes together to create a single seamless mesh. Welds have two genders: Positive|Negative.
The MECS Entity Class
Defines a Game Entity Class, its Parts, and Assembly Hierarchy.
Class Part
- Core: Base Part in which Limb Parts connect. Mandatory for Entity Assembly.
- Limb: Extension Component that connects to Core or Limb.
Common Entity Classes:
* TerraForms (Terrain + Sky + Celetstrial Body + Fluidbody + Cloud)
* Building
* Structure
* Trees & Plants
* Character Head
* Character Body
* Firearm
* Projectile
* Melee Weapon
* Prop
* Furniture
* Vehicle and Crafts
* Machines
* Items (Single Block with Connectors)
The MECS Entity
Defines a individual Instance of a Entity Class
Entity Part: Single Construct or Composite Construct
MECS XML Format
<mecs version = "1.0">
<!-- Entity Classes -->
<class name="Character" type="BiPed">
<!--
Class Hierarchy defines parts and connectivity.
-->
<part name="Chest" type="core"/>
<part name="Neck" type="limb">
<part name="Head" type="limb"/>
</part>
<part name="UpperTorso" type="limb">
<part name="LowerTorso" type="limb">
<part name="UpperLeg" type="limb">
<part name="LowerLeg" type="limb">
<part name="Foot" type="limb"/>
</part>
</part>
</part>
</part>
<part name="UpperArm" type="limb">
<part name="LowerArm" type="limb">
<part name="Hand" type="limb"/>
</part>
</part>
</part>
</class>
<class name="Firearm" type="Standard">
<part name="StockGrip" type="limb">
<part name="Chamber" type="core">
<part name="Firingmecshanism" type="limb"/>
<part name="Trigger" type="limb"/>
<part name="Barrel" type="limb">
<part name="Bayonet" type="limb"/>
<part name="Distorter" type="limb"/>
</part>
<part name="Scope" type="limb">
<part name="Loader" type="limb">
<part name="Magazine" type="limb"/>
</part>
</part>
</part>
</class>
<class name="melee" type="standard">
<part name="handle">
<part name="guard">
<part name="midsection">
<part name="bluntblade">
</part>
</part>
</part>
</class>
</mecs>
<mecs version="1.0">
<!-- Constructs -->
<block name="ironman" src="3DCharactersUpperchest.x" scale="sx,sy,sz">
<!-- acceptable skins -->
<skin src="IronManCore_C1_1"/>
<skin src="IronManCore_C1_2"/>
<!-- connectors -->
<!-- #1 --><connector name="neck" type="mount" gender="slot" coords="x,y,z,ax,ay,az"/>
<!-- #2 --><connector name="spine1" parent="neck" type="bone" name="UC1.1" map="Bip01_Spine_1"/>
<!-- #3 --><connector name="spine2" parent="spine1" type="bone" name="UC1.2" map="Bip01_Spine_2"/>
</block>
<block name="broad" src="3DCharactersUppershoulder.x" scale="sx,sy,sz">
<connector type="mount" gender="peg" coords="x,y,z,ax,ay,az"/>
<connector type="bone" name="UL1.1" map="Bip01_L_UpperArm">
<connector type="bone" name="UL1.2" map="Bip01_L_ForeArm"/>
</connector>
<connector type="joint:6dof">
<script></script>
</connector>
</block>
<block name="popeye" src="3DCharactersUpperforearm.x" scale="sx,sy,sz">
<connector type="mount" gender="slot" coords="x,y,z,ax,ay,az"/>
<connector type="bone" name="UL1.2" map="Bip01_L_ForeArm">
<connector type="bone" name="UL1.3" map="Bip01_L_Hand"/>
</connector>
<connector type="joint">
</block>
<block name="thing" src="3DCharactersUpperhand.x" skin="Machine_U1.2" scale="sx,sy,sz">
<connector type="mount" gender="slot" coords="x,y,z,ax,ay,az"/>
<connector type="bone" name="UL1.3" map="Bip01_L_Hand"/>
<connector type="mount" gender="any">
</block>
</mecs>
<mecs version = "1.0">
<!-- Entity -->
<entity class="Character" type="BiPed" name="Sir_Peppy">
<part name="Chest" align="center">
<block name="ironman"/>
</part>
<part name="UpperArm" align="left">
<block name="Broad" connector="1" state="connected"/>
</part>
<part name="LowerArm" align="left">
<block name="popeye" connector="1" state="connected"/>
</part>
<part name="Hand" align="left">
<block name="thing" connector="1" state="connected"/>
<accessory type="hitobject" ID="" connector="1" state="connected">
<connector type="mount" gender="peg" coords="x,y,z,ax,ay,az">
<option value="Hand" connect="true"/>
</connector>
</accessory>
</part>
</entity>
</mecs>