Docs/Format/Object Types

<box> / <cube>

Rectangular box centered at the origin.

<box name="Wall" size="10 4 0.3" position="0 2 -5" material="brick"/>
AttributeTypeDefaultDescription
sizevec31 1 1Width × Height × Depth
segmentsint1Subdivisions per axis

<sphere>

<sphere name="Ball" radius="0.5" segments="24" position="0 1 0"/>
AttributeTypeDefaultDescription
radiusfloat0.5Sphere radius
segmentsint16Latitude/longitude subdivisions

<cylinder>

<cylinder name="Pillar" radius="0.3" height="4" segments="16"/>
AttributeTypeDefaultDescription
radiusfloat0.5Base radius
heightfloat1.0Total height
segmentsint16Circumference subdivisions
axisx|y|zyCylinder axis

<cone>

<cone name="Cap" radius="0.5" height="1.5" segments="16"/>
AttributeTypeDefault
radiusfloat0.5
heightfloat1.0
segmentsint16

<plane>

Flat surface with no thickness.

<plane name="Ground" size="50 50" axis="y" material="grass"/>
AttributeTypeDefaultDescription
sizevec21 1Width and height
axisx|y|zyNormal axis
segmentsint1Subdivisions

<mesh>

External polygon mesh loaded from an OBJ file.

<mesh name="Chair" src="assets/chair.obj" material="wood"/>

src: path relative to the .mc3.xml file. Currently only OBJ files are supported in the viewport; other formats may be silently ignored.

<extrude>

Sweeps a 2D cross-section along a 3D path, producing a solid mesh with optional end caps and twist. The <extrude> element contains exactly two child elements: <cross_section> and <path>.

Top-level extrude attributes

AttributeTypeDefaultDescription
segmentsint32Number of subdivisions along the path
twistfloat0.0Degrees of rotation applied cumulatively from start to end of path
smoothbooltrueSmooth (averaged) normals vs. flat face normals
capsbooltrueClose both ends of the swept tube with filled polygons

Cross-section types (<cross_section type="…">)

typeSpecific attributesCommonDescription
rectwidth (default 0.3), height (default 0.3)segmentsRectangular tube. Combine with inner_radius= (not in current header — omit) for hollow effect using Difference CSG instead.
circleradius (default 0.1), inner_radius (default 0 → solid; >0 → hollow pipe)segmentsCircular tube or hollow pipe. inner_radius > 0 generates a ring cross-section.
polygonradius (circumradius), sides (default 6)segmentsRegular N-gon cross-section. sides=3 → triangle, sides=6 → hexagon, etc.
customchild <point x="…" y="…"/> elements (CCW winding)Arbitrary closed 2D polygon defined as a list of 2D points.

Path types (<path type="…">)

typeSpecific attributesDescription
linelength (default 1.0), axis (default "y")Straight extrusion along the given world axis. Axis is "x", "y", or "z".
arcradius (default 1.0), angle in degrees (default 180)Circular arc in the XZ plane. Use to create arches, curved rails, rings.
helixradius (default 0.5), height (default 2.0), turns (default 4)Helical spiral — useful for springs and screws.
polylinechild <point x="…" y="…" z="…"/> elementsPiecewise-linear 3D path through an ordered list of points.
bezierchild <point x="…" y="…" z="…" cx="…" cy="…" cz="…"/> elementsCubic Bézier spline. Each point carries an optional in-control cx/cy/cz offset used to compute the smooth tangent.

Complete examples (5 × 4 combinations)

Arch — rect cross-section on arc path

<extrude name="Arch" segments="24" caps="true">
  <cross_section type="rect" width="0.3" height="0.2"/>
  <path type="arc" radius="2.0" angle="180"/>
</extrude>

Pipe — hollow circle on helix path

<extrude name="Spring" segments="64">
  <cross_section type="circle" radius="0.08" inner_radius="0.04"/>
  <path type="helix" radius="0.5" height="2.0" turns="6"/>
</extrude>

Hex beam — polygon cross-section on line path

<extrude name="HexBeam" segments="1">
  <cross_section type="polygon" radius="0.15" sides="6"/>
  <path type="line" length="3.0" axis="y"/>
</extrude>

Star — custom cross-section on polyline path

<extrude name="StarTrack" segments="4">
  <cross_section type="custom">
    <point x="0"    y="0.3"/>
    <point x="0.1" y="0.1"/>
    <point x="0.3" y="0"/>
    <point x="0.1" y="-0.1"/>
    <point x="0"   y="-0.3"/>
    <point x="-0.1" y="-0.1"/>
    <point x="-0.3" y="0"/>
    <point x="-0.1" y="0.1"/>
  </cross_section>
  <path type="polyline">
    <point x="0" y="0" z="0"/>
    <point x="2" y="1" z="0"/>
    <point x="4" y="0" z="0"/>
  </path>
</extrude>

Twisted ribbon — rect cross-section on Bézier path with twist

<extrude name="Ribbon" segments="32" twist="180">
  <cross_section type="rect" width="0.5" height="0.05"/>
  <path type="bezier">
    <point x="0" y="0" z="0" cx="1" cy="1" cz="0"/>
    <point x="3" y="2" z="1" cx="1" cy="0" cz="0"/>
    <point x="6" y="0" z="0"/>
  </path>
</extrude>

<group>

Container. Applies a shared transform to its children. Children can be any type (including nested groups).

<group name="House" position="10 0 0">
  <box name="Walls" …/>
  <box name="Roof"  …/>
</group>

<instance>

Places a copy of a <definition>. Supports material override.

<instance name="Tree1" definition="tree" position="-5 0 3"/>
<instance name="Tree2" definition="tree" material="autumn_leaves"/>

<union> / <difference> / <intersection>

CSG boolean operations. See CSG Tutorial for examples.

<difference name="ArchHole" material="stone">
  <box    name="block"  size="2 2 2"/>
  <sphere name="cavity" radius="0.8" role="cutter"/>
</difference>

<area>

Invisible logical zone (collision/trigger/pathfinding). No visual representation in the viewport.

<area name="TriggerZone" size="5 3 5" tags="trigger checkpoint"/>