2020-2025 (c) Quanta Sciences, Rama Hoetzlein
Shapes is a lightweight, node-based renderer for dynamic and natural systems. The goal of shapes is to enable rapid experimentation with dynamic, coupled systems, especially those in which the scene graph can change each frame. Shapes makes use of a graph model to evaluate dynamic behaviors that update geometric instances call shapes. Shapes incorporates both an OpenGL core rasterizer and OptiX pure raytracing pipelines which can be switched at run-time. Shapes allows for composition and coupling of complex models through node-graphs.
The scene representation of Shapes consists of a graph of behaviors, primitive objects maintained in a list of assets, and one or more renderers. The output of a behavior is typically a ShapeSet which contains a set of shapes. Behaviors, assets and shapes may be the input to any other behavior node. Assets consist of essential primitives such as meshs, textures, materials, shaders, cameras and globals. Shapes represent an instance of a mesh/geometry and refers to a mesh, a shader, a material, several textures and a transform. Together a single shape expresses the render properties, visual appearance and transform of a visible object. Shapes are designed to be very lightweight so that they can be animated and add/removed dynamically by behaviors.
Features of the Shapes rendering engine include:
- Dynamic scene graphs for motion graphics
- OpenGL ES3 rasterizer, for Windows, Linux or Android
- OptiX pure raytracing
- Particles systems
- GPU-accelerated SPH Fluids
- Environment lighting
- Cascade Shadow Maps /w PCF Soft shadows
- Projective Displacment Mapping for raytracing
- State sorting for order-independent behaviors
- Trees and Forests (pro version)
- Geospatial Data, LiDAR and DEM (pro version)
Updated Nov 2025
Build with cmake is now simpler and faster.
Libmin dependent code is directly compiled into the project (no shared or static libs).
Steps:
- Clone this Shapes repo
- Clone libmin as a sibling folder
\codes ├── \shapes └── \libmin
- Run cmake or cmake-gui on the Shapes cmake.
See libmin for more details.
Several simple samples are provided in the /shapes/assets folder:
- scene_simple.txt - Simple cube & sphere with environment lighting
- scene_bump.txt - Bump mapping, with various material properties
- scene_displace.txt - Displacement mapping for real surface details (CPU demo).
- scene_scatter.txt - Procedural scattering of one mesh across another.
- scene_psys.txt - Particle system /w shadows (CPU demo). Press space bar to play.
To run, use:
> shapes {scene_file}
Shapes uses the following mouse/keyboard input when run interactively:
- Alt+Left Mouse - Orbit camera
- Alt+Shift+Left Mouse - Pan camera
- Middle Mouse - Pan camera
- Middle Mouse Wheel - Zoom in/out
- Right Mouse - Flying navigation, Change heading
- WSADZQ keys - Flying navigation, W=fwd, S=back, A/D=strafe, Z/Q=raise lower
- Shift+Left Mouse - Move primary light
- '/' - Record button. Save single or multiple frames (if animating)
- 'r' - Reset scene
- ' ' (spacebar) - Play button. Pause/run animation
- Ctrl+S - Save scene
Shapes is based on an earlier renderer, Luna (2010), which was part of my Ph.D. dissertation on real-time procedural modeling in Media Arts & Technology (UC Santa Barbara). That early renderer allowed for each behavior node to output a full hierarchical scene graph; however, this introduced complexity and significant overhead. Around 2020, the Shapes Engine was redesigned around the notion of a shape, a lightweight, transformed instance, which could be efficiently generated, animated, state sorted and culled. This was designed to match the command-based architecture of zero overhead engines (such as Vulkan, Metal, DX12) although as of 2025 only OpenGL ES3 is implemented.

