Docs/Tutorials/Minimal Scene

Approach 1: Using the Editor

Step 1 — Start with a new scene

Launch MeshCraft with no arguments, or press Ctrl+N to create a new empty scene.

./cmake-build-debug/MeshCraft

Step 2 — Add a ground plane

  1. Press F5 or click the Plane button in the toolbar.
  2. In the Properties panel (right side), set:
    • Name: Ground
    • Size: 20 20
    • Axis: y

Step 3 — Add a box

  1. Press F1 or click the Box button in the toolbar.
  2. In the Properties panel, set:
    • Name: Cube
    • Position: 0 0.5 0
    • Size: 1 1 1

Step 4 — Create a material

  1. In the Properties panel, click the Materials tab.
  2. Click + Add Material.
  3. Name it grey.
  4. Set Base Color to R=0.7, G=0.7, B=0.7, A=1.0.

Step 5 — Assign materials to objects

  1. Click on the Ground plane in the Hierarchy panel.
  2. In the Properties panel (Object tab), set Material to grey.
  3. Do the same for the Cube.

Step 6 — Add a light

  1. Click the Lights tab in the Properties panel.
  2. Click + Add Directional.
  3. Set Direction: -0.5 -1 -0.3, Brightness: 2.5.
  4. Click + Add Ambient. Set Color: 0.3 0.3 0.4, Brightness: 0.4.

Step 7 — Save

Press Ctrl+S. Enter a path such as my_scene.mc3.xml.


Approach 2: Hand-Editing XML

Create a file named my_scene.mc3.xml with this content:

<?xml version="1.0" encoding="UTF-8"?>
<mc3 version="0.3" model="MinimalScene">

  <environment>
    <background color="0.4 0.6 0.9"/>
  </environment>

  <lights>
    <ambient     color="0.3 0.3 0.4" brightness="0.4"/>
    <directional name="Sun" color="1 0.95 0.8"
                 brightness="2.5" direction="-0.5 -1 -0.3"/>
  </lights>

  <materials>
    <material id="grey" roughness="0.8">
      <base_color>0.7 0.7 0.7 1.0</base_color>
    </material>
  </materials>

  <objects>
    <plane name="Ground" size="20 20" axis="y" material="grey"/>
    <box   name="Cube"   size="1 1 1" position="0 0.5 0" material="grey"/>
  </objects>

</mc3>

Then open it in the editor:

./cmake-build-debug/MeshCraft my_scene.mc3.xml

What You Should See

Next Steps