Overview
G3Engine uses a Physically Based Rendering (PBR) material system that provides realistic lighting and surface properties.MaterialProps
The core material interface that defines all visual properties of scene objects.Base Properties
Base color of the material in hex format (e.g., “#6366f1”, “#ff0000”)This is the primary color of the object under white light.
Surface roughness from 0.0 to 1.0
0.0- Perfectly smooth, mirror-like reflections0.5- Semi-rough surface1.0- Completely rough, diffuse surface
Metallic property from 0.0 to 1.0
0.0- Non-metallic (dielectric) materials like plastic, wood, stone0.5- Partial metallic (rare, mostly for transitions)1.0- Pure metal like gold, silver, copper, steel
Emissive Properties
Emissive (self-illuminating) color in hex formatMakes the material glow with its own light. Commonly used for:
- Light bulbs
- Neon signs
- Magic effects
- UI elements
Intensity multiplier for emissive glowRange typically 0-10, though higher values are supported:
0.0- No glow1.0- Normal glow5.0+- Very bright glow
Transparency Properties
Enables transparency for the materialMust be set to
true for opacity to have any effect.Opacity level from 0.0 to 1.0Only works when
transparent: true:0.0- Fully transparent (invisible)0.5- Semi-transparent1.0- Fully opaque
Material Presets
Common material configurations for different surface types.Plastics and Polymers
Metals
Glass and Transparent Materials
Emissive Materials
PBR Guidelines
Roughness Values
| Range | Appearance | Examples |
|---|---|---|
| 0.0 - 0.2 | Mirror-like, sharp reflections | Polished metal, glass, water |
| 0.2 - 0.5 | Semi-glossy | Glossy plastic, satin |
| 0.5 - 0.8 | Semi-rough | Matte plastic, unpolished wood |
| 0.8 - 1.0 | Completely diffuse | Concrete, fabric, rough stone |
Metalness Values
| Value | Type | Examples |
|---|---|---|
| 0.0 | Dielectric (non-metal) | Plastic, wood, stone, glass, skin |
| 1.0 | Metallic | Gold, silver, copper, aluminum, steel |
Color Selection
For metallic materials, the
color field represents the material’s reflectance color:- Gold: Yellowish tint (#ffd700)
- Copper: Reddish-brown (#b87333)
- Silver/Aluminum: Light gray (#c0c0c0)
color is the base albedo color under white light.