BRL-CAD is a powerful cross-platform open source combinatorial Constructive Solid Geometry (CSG) solid modeling system that includes interactive solid geometry editing, ray-tracing support for rendering and geometric analysis, network-distributed framebuffer support, image and signal-processing tools, path-tracing support for realistic image synthesis, a system performance analysis benchmark suite, an embedded scripting interface, and a robust high-performance geometric representation and analysis library.
Actively developed since 1979, BRL-CAD is a collection of more than 400 tools, utilities, and applications comprising more than a million lines of source code. BRL-CAD supports a great variety of geometric representations including an extensive set of traditional CSG primitive implicit solids such as boxes, ellipsoids, cones, and tori, as well as explicit solids made from closed collections of Uniform B-Spline Surfaces, Non-Uniform Rational B-Spline (NURBS) surfaces, n-Manifold Geometry (NMG), and purely faceted mesh geometry. All geometric objects may be combined using boolean set-theoretic CSG operations including union, intersection, and difference.
The entire scope of BRL-CAD of course extends well beyond the scope of most games, but the geometry services it provides are more than capable. The ray-trace engine is used in interactive analysis environments where hundreds of thousands of rays/second may be firing to determine intersections and collision detections. The geometry modelers (MGED and Archer) both include plug-in scripting interfaces for making extensions suitable to game editors.
Most notable to game programming, BRL-CAD includes several features that make it useful for game development including:
- High-performance accurate collision detection via real-time ray-tracing
- Support for advanced geometric representations including CSG and mesh objects
- Compact binary geometry file format for storing game objects, world environments
- A procedural geometry API for creating geometry via code
- Various tools for signal and image processing
- Various tools for geometry conversion and manipulation
- Simple to use network transport library
- Well documented extendable modeling tools useful as an interactive 3D world editor
BRL-CAD has been under active development for more than 20 years with an extensive cross-platform portability heritage. BRL-CAD supports just about every major operating system environment and is distributed as Open Source software under the LGPL.
- Mac OS X
- BSD (FreeBSD, NetBSD, OpenBSD, etc)
- other UNIX (AIX, HPUX, etc)
Both MGED and Archer are solid modelers and geometry viewers capable of displaying and manipulating geometry. There is extensive documentation available for both on the BRL-CAD website and from within the application as well. MGED is considerably more powerful, but rather complicated to master and is completely non-discoverable -- you HAVE to go through the tutorial series in order to use it proficiently.
- MGED - older, powerful, large learning curve, difficult GUI
- Archer - newer, fewer features, better GUI
Tutorials and Source Code Examples
On the Wiki
Geometry Modeling Kernel
Most of BRL-CAD's power is in its extensive geometry modeling kernel, which is comprised of several notably including: libbu (basic utility), libbn (numerics), librt (ray-trace and geometry library).
- Developing custom ray-trace applications and supported standards
- Simple ray-trace source code example
- Creating geometry with a shell script
- Creating geometry with a Perl script
- Simple procedural geometry source code example
- More complex example for creating a "sphere flake"
- Example of creating a window procedurally
- ttcp-style network file transfer example source code using libpkg
- slightly more complex example, transfers BRL-CAD geometry over network using libpkg and librt
Extensive documentation has been written for BRL-CAD, in particular for the GUI-based geometry modeler MGED. The overview and tutorials are designed to get modelers up to speed on how to use the various modeling tools in BRL-CAD.
- About BRL-CAD
- Brief overview of BRL-CAD
- Introduction to MGED
- Principles of Effective Modeling (with MGED)
- More Documentation
For making contributions, getting support, or making feature requests:
For communicating with the BRL-CAD developers and user community: