There is no doubt that Model Packs provide awesome artwork for an affordable price. My problem with purchasing Model Packs is knowing that the same Art Assets are being used by others. It is strongly desired that my game, has its own distinctive `look`. I've purchased packs and modified textures to provide some variation, but, thats not enough.
That is one motivation behind what I believe to be a unique approach to Model Packs and Entity construction within S3GE. A system I call, Modular Entity Construction Sets (MECs). The premise behind MECs is to provide modelled/textured
Parts that can be assembled to create countless Entity variations.
Customization was the second motivator. I enjoy playing RPGs and Racers in which you can customize the appearance of your character/racer by changing parts. I realized that practically every 3D entity could be customized, although, maybe not necessary. Such a flexible Entity Creation System could prove in valuable creating large amounts of prefabricated and procedurally created 3D assets.
Inspired by Toy Construction Sets (ie Tinker Toys, Knex, etc), MECs uses a system of
blocks &
connectors to create classes of entities: Character Bodies/Heads, Furniture Props, FireArm Weapons, Melee Weapons, Trees/Plants, Vehicles/Crafts, and Machines; Blocks and Connectors create Parts which can be interchanged to create numerous variations within each Class of Entity.
MECs Key Features:
Standardized MECS Format. An XML-based Format that supports bone/keyframe/procedural/physics controlled animation, Level Of Detail, Shader Maps, Channelized Textures Map, and other requirements applied to 3D Entities. A standard labeling for Meshes, Bones, Animation, and Textures.
MECs 3D Plug-in that imports MECS Format into game engine/application. The Plug-in also supports parts
welding & morphing, texture blending to create single piece entities when necessary.
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: 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 (Interior|Exteriors)
* 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>
The Entity Class Hierarchy defines a Game Entity and the
Class of Parts used to assemble it. Examples of Game Entities would be: Buildings, Trees & Plants, Character Heads & Bodies, Firearms, Melee Weapons, Props/Furniture, Vehicle & Crafts, etc. An example of Class of Parts would be like the FireArm Class illustration above. These are common entities found in games and the system is flexible enough to accomodate any others if needed. You can also create Sub Classes within the Classes for example Character Bodies: BiPed, Quadriped, Octopod, etc.
There are two types of Class Parts: Core and Limb. At minimum, one Core class part must be defined within a Class/subclass. The Core Class Part is usually the primary or central part in which limbs connect to. It can be used as the starting point. In the case of the Firearm Entity Class, I selected the Chamber as the Core class part (I named it Chamber for the lack of a better name, it was better than Core, lol). You can also optionally make limbs mandatory for assembly within a Entity class hierarchy.
The Class Hierarchy only defines
what class of parts makes up a Entity, not what makes up the parts. In some cases the Entity Class is used to define a part (ie Character Head with parts for eyes, nose, mouth, ears). To create a part, we first start with a Construct. A Constuct consists of a one 3D/FX/Physics Object (Block) and one or more Connection Points (Connectors). A Part can consists of 1 or more Construct(s).
Entities -> Class -> Class Type (SubClass) -> Class Part -> Part -> {Construct(s) = Block + Connector(s)}
The connection system in MECS is the highlight of the system. Connectors tell MECS
how and
where parts connect. Connectors are defined within the Mesh (ie: Bones) and externally with the MECS Editor. Creating a Constuct should be as simple as 1)Loading in the Mesh; 2)Add and orientate Connectors; 3) Exporting MECS File Format. Connectors will also contain additional parameters to ensure that
the foot bone connected to the lowerleg bone, and the lowerleg bone connected to the upperleg bone... All of these features will supported within the MECS File Format and MECS will know from the information how to assemble the entity.
I believe the current hierarchy is sufficient for futuristic and modern firearm assembly. I have a vague idea of what the bone and mesh def animation it will require dependent on the part and weapon states. I was drawing most of concept for firearm animation from characters. I havent put a list together for character bodies, but, I anticipate the following:
{character head} (core) -> neck <- chest
lower torso -> upper torso -> chest -> upper arm -> lower arm -> hand
lower torso -> upper leg -> lower leg -> foot
I intend to provide MECS with standard Texture, Maps, and Shaders support. In MECS textures/Shaders are treated as a interchangeable `Skin`. Ultimately, MECS just provides a means of export/import/assembly of 3D Game Entities with utilities that allow Developers to texture, animate, etc as they see fit.