Docs / Overview
ℹ️
Status

MeshCraft is under active development. All core features (primitives, extrusion, CSG, materials, textures, lights, cameras, definitions, keyframe animation) are implemented and working. The project builds cleanly and passes its automated test suite.

What is Mesh Craft?

Mesh Craft is a C++23 desktop 3D scene editor for creating and editing models in the MC3 format — a custom XML-based scene description format used by the OpenEggbert project family.

Instead of working with raw triangle meshes, Mesh Craft lets you build scenes from constructive objects: primitive shapes, extrusions, CSG booleans, reusable definitions, hierarchical groups, lights, cameras, and keyframe animations. These are stored in human-readable .mc3.xml files and can be exported to glTF 2.0 / GLB for use in game engines and real-time applications.

The project is inspired by Ray Dream Studio and Google SketchUp.

Main Features

📦
Primitive Shapes
Box, Sphere, Cylinder, Cone, Plane — all editable in the properties panel with per-axis sizing.
🔩
Extrude
Sweep 2D cross-sections (rect, circle, polygon, custom) along 5 path types: line, arc, helix, polyline, Bézier.
⚗️
CSG Booleans
Union, Difference, Intersection — evaluated using the Manifold v3 library for real boolean mesh geometry.
🎨
PBR Materials
Full PBR material editor: base color, metallic, roughness, emissive, normal scale, alpha modes, and 5 texture slots.
🎞️
Keyframe Animation
Timeline editor with Step, Linear, and Cubic Bézier interpolation. Exports position/rotation/scale to glTF animations.
📤
glTF/GLB Export
Standalone mc3togltf converter outputs glTF 2.0 JSON or self-contained GLB, including animation tracks.
🌐
Web/WASM Build
Emscripten build produces a browser-ready MeshCraft.html with IDBFS persistent storage.
🔁
Undo/Redo
20-step deep-copy snapshot stack covering all edit operations: add, delete, transform, duplicate, paste, group, ungroup.

Supported Platforms

PlatformBackendStatus
LinuxEasyGL (OpenGL ES 3.2)Working
macOSEasyGL or SDL_RENDERERPlanned
WindowsEasyGL / BGFX / VulkanPlanned
AndroidSDL_RENDERERPlanned
Browser (WASM)Emscripten + WebGL 2Working

Key Dependencies

DependencyRoleSource
CNAXNA-like C++ runtime: windowing, input, audio, graphics abstraction (SDL3 + OpenGL ES 3.2)Sibling repo ../cna
sharp-runtimeC++ System layer (math: Matrix, Vector3, …) used by CNASibling repo ../sharp-runtime
Nova3D3D engine on top of CNA; used for viewport renderingSibling repo ../nova-3d
Dear ImGui v1.91.6Immediate-mode UI for all editor panelsFetchContent from GitHub
Manifold v3CSG boolean mesh evaluationFetchContent from GitHub
tinyobjloader v2OBJ mesh loading for viewport previewFetchContent from GitHub
tinyxml2XML parsing (bundled via sharp-runtime)Bundled

Repository Structure at a Glance

mesh-craft/
├── src/MeshCraft/          Main editor application (C++)
├── include/MeshCraft/      Public headers
├── mc3/                    Pure-C++ MC3 format library (sublibrary)
├── mc3togltf/              Standalone CLI converter: MC3 → glTF/GLB
├── Mc3Format/              Format specification markdown docs
├── test/                   Test scenes (.mc3.xml) and smoke test
├── cmake/                  Platform-specific CMake helpers
└── CMakeLists.txt          Top-level build script

Quick Start

# Prerequisites: CMake 3.21+, GCC 13+ or Clang 16+, sibling repos cna / sharp-runtime / nova-3d

# Configure (first time)
cmake -S . -B cmake-build-debug \
      -DCMAKE_BUILD_TYPE=Debug \
      -DMESH_CRAFT_GRAPHICS_BACKEND=EASYGL

# Build
cmake --build cmake-build-debug --target MeshCraft -- -j$(nproc)

# Run with a test scene
./cmake-build-debug/MeshCraft test/house.mc3.xml

For full setup instructions, see Getting Started and Build & Run.