Status: Complete Last Updated: 2026-02-02
The Construct CAD application provides a comprehensive PBR (Physically Based Rendering) material system for applying surface properties to SDF primitives and operators.
| Component | Location | Purpose |
|---|---|---|
CatalogMaterial |
construct/model/ |
Material data class with PBR properties |
MaterialLibrary |
construct/model/ |
Singleton manager for all materials |
MaterialListModel |
construct/model/ |
Qt model for material list views |
MaterialDelegate |
construct/ui/ |
Custom delegate for rich material rendering |
MaterialPreviewWidget |
construct/ui/ |
Sphere preview with material properties |
MaterialSelectorWidget |
construct/ui/ |
Inline material picker, used on scene-tree rows and in the material list |
MaterialListWidget |
construct/ui/ |
Reusable list component |
MaterialListPopup |
construct/ui/ |
Popup dialog for material selection |
MaterialEditorWindow |
construct/ui/ |
Full material editing interface |
| Property | Type | Range | Description |
|---|---|---|---|
name |
QString | - | Display name |
category |
QString | - | Grouping category |
albedo |
QVector4D | 0-1 RGBA | Base color |
metallic |
float | 0-1 | Metalness factor |
roughness |
float | 0-1 | Surface roughness |
emission |
float | 0-100 | Self-illumination intensity |
lastModified |
QDateTime | - | Timestamp for sorting |
isBuiltIn |
bool | - | Read-only flag for defaults |
The library provides 20 built-in materials across categories:
Built-in materials cannot be modified directly. Use "Save As Copy" to create editable versions.
The material selector appears on an item's row in the scene tree when the row is expanded:
┌─────────────────────────────────────────────┐
│ Material │
│ ┌────────┐ [Edit ] │
│ │ ● │ Material Name [Clone] │
│ │ preview│ M: 0.0 · R: 0.5 │
│ └────────┘ │
└─────────────────────────────────────────────┘
Single-click on any material to select it. The popup closes automatically. Click outside to cancel.
Materials are sorted:
Built-in materials display with a subtle lighter background.
Access via toolbar button or double-clicking a material.
| Button | Action |
|---|---|
| New material | Create blank custom material |
| Save | Save changes to library |
| Save as copy | Create new material from current (for built-ins) |
| Revert | Discard unsaved changes |
| Delete | Remove custom material |
When clicking "Clone" on a row:
Visual indicators:
Operators support material blending between their operands.
| Property | Values | Description |
|---|---|---|
materialMode |
BaseWins, OperandWins, Blend | Which material takes priority |
blendSharpness |
0.0 - 1.0 | Transition sharpness (0=smooth, 1=hard) |
Materials are stored in .construct files with a separate materials: section:
construct:
version: 1
name: "My Scene"
materials:
my_custom_red:
name: "My Custom Red"
category: "Custom"
albedo: [0.9, 0.1, 0.1, 1.0]
metallic: 0.0
roughness: 0.3
emission: 0.0
instances:
sphere_1:
type: sphere
materialId: "my_custom_red"
params:
radius: 10
~/.local/share/OctoMY/OctoMY Construct/materials.json.construct filesMaterial system tests in test/testSDFModel/:
testInstanceMaterialDefaultValuestestInstanceMaterialSerializationtestMaterialRoundTriptestInstanceBlendSharpnesstestInstanceMaterialModetestInstanceBlendingSerializationtestMaterialBlendingDSLRoundTripFixture: test/testSDFModel/fixtures/material_blending.construct