How tabithabragg/groundcontrol works
1. This repository is a suite of native DCC plug-ins, not a single application. The code is split primarily by host platform: CarraraExtensions for Carrara, and LightwavePlugins for Lightwave. Each plug-in lives in its own folder and is built as a separate binary/module that the host application loads.
2. The architecture is “plugin-per-feature.” Most folders map to one installable plug-in package with its own entrypoint file (*DLL.cpp, gcMain.c, etc.), public headers, and host-specific resource files (.def, .r, .rsr, .plist, Visual Studio/Xcode projects). The host app is the runtime container; this repo provides modules that extend import, geometry generation, shading, deformation, and rendering behavior.
3. The largest functional area is terrain and geodata. GroundControl is the main terrain/geodata subsystem in Carrara, with supporting types for elevation meshes, shapefiles, DEMs, water, bump/shader filters, and generators. The Lightwave side also has a GroundControl plug-in with file loading and mesh-building code (gcImageLoad.c, gcMeshload.c, gcMain.c). This area is backed by a shared C library under Library/GroundControl, which contains low-level mesh, binary tree, math, and data helpers used by the plug-in layer.
4. Geometry generation is another major subsystem. AnythingGrooves contains primitive generators such as cone, cube, cylinder, plane, and sphere, plus conversion-to-mesh logic. AnythingGrows adds procedural growth/hair-style generation with a primitive, deformer, billboard support, strand generator interface, and hair generator. These modules typically transform parametric inputs into mesh or strand data before handing it back to the host.
5. Shader and material extensions form a separate family. ShaderOps, ShaderOps2, ShadersPlus, Shoestring_Shaders, and ShaderGel are all collections of shader nodes/ops. They include color/math operators, UV transforms, mixing/compositing, gradients, lighting controls, and procedural effects. Architecturally, these modules sit inside the host’s shading pipeline and operate on material inputs/outputs rather than geometry.
6. Renderer-adjacent plug-ins are separated from pure shader nodes. WireframePro, ToonPro, Noir, Parchment, StarBright, and Gemini focus on non-photoreal or stylized rendering, selection/override behavior, wireframe display, toon/cell shading, and related rendering controls. The shared WirerendererCommon folder contains common data and state helpers for wire/toon rendering behavior across those plug-ins.
7. There is a smaller set of scene/utility plug-ins that manipulate existing assets rather than generate new ones. DCGImporter handles sequenced OBJ import. TerrainTools contains operators for terrain editing and conversion tasks such as normal/terrain transforms, intersection, surf, cutout, and beach-related operations. ShaderGel and Cognito appear to be additional host extensions with their own module boundaries, likely using the same overall plug-in pattern.
8. Shared code is intentionally separated from plug-in wrappers. CarraraExtensions/Common holds reusable infrastructure: scene utilities, shader helpers, mesh accumulators, cache helpers, tree structures, debug/util macros, and generic math/random utilities. This is the “library layer” beneath several Carrara plug-ins, keeping mesh traversal, shader plumbing, and collection logic out of feature-specific modules.
9. The main data flow across the repo is: host application loads a plug-in module → plug-in presents UI or hooks into host events → plug-in reads scene/file/terrain/shader inputs → shared helpers build or transform mesh/shader/state data → results are returned to the host as geometry, shading results, or importer output. For ground/terrain features, the flow often starts from external data files and ends as terrain meshes, elevation maps, or water/bump/shader effects in the scene.
10. Build and packaging are host-specific and legacy-toolchain oriented. Many folders contain both Visual Studio and Xcode projects, indicating cross-platform builds for older plugin SDKs. The presence of .def, .r, and .rsr files suggests exported symbols plus host-specific resources/localization/UI assets are bundled per plug-in.
11. The repository structure also shows an active fork/maintenance story. The README explains that the Lightwave GroundControl plug-in is a development/testing build intended to load a groundcontrol.p plugin file into both Layout and Modeler, with compatibility work for Lightwave 2018–2020. So the repo is not only source code but also a distribution tree for multiple historical host integrations.
12. For an architecture diagram, the most important boundaries are: host application boundary, plug-in module boundary, shared-library boundary, and external data boundary. The host loads modules; modules depend on shared helpers; terrain/import plug-ins ingest external geodata; shader/render plug-ins sit inside the rendering pipeline; and geometry plug-ins synthesize meshes or strands that are handed back into the scene.
Main entry points: CarraraExtensions Carrara suite · Common Common library · GroundControl GroundControl · LightwavePlugins Lightwave suite
Components 21
Carrara extensions
Host-specific plug-in modules for Carrara, organized by feature package.
- Carrara suite · Main Carrara plug-in collection with geometry, terrain, shader, and renderer extensions.
CarraraExtensions - GroundControl · Carrara terrain and geodata subsystem with DEM, shapefile, water, bump, and shader support.
CarraraExtensions/GroundControl - TerrainTools · Carrara terrain editing and conversion operators such as normal, surf, cutout, beach, and intersection tools.
CarraraExtensions/TerrainTools - AnythingGrooves · Carrara primitive generators and mesh conversion pipeline for parametric solids.
CarraraExtensions/AnythingGrooves - AnythingGrows · Carrara procedural growth, hair, strand, billboard, and deformer module.
CarraraExtensions/AnythingGrows - ShaderOps · Carrara shader operators for math, UV transforms, thresholds, scaling, and gradients.
CarraraExtensions/ShaderOps - ShaderOps2 · Carrara multi-input shader operators and space/UV manglers.
CarraraExtensions/ShaderOps2 - ShadersPlus · Carrara shading controls for anisotropy, GI, masks, lighting, and procedural effects.
CarraraExtensions/ShadersPlus - Shoestring Shaders · Carrara shader collection including mix, fresnel, location, proximity, and multi-pass controls.
CarraraExtensions/Shoestring_Shaders - Stylized renderers · Carrara non-photoreal and wireframe rendering extensions.
CarraraExtensions - Wire common · Shared data and state helpers for wireframe and toon rendering behavior.
CarraraExtensions/WirerendererCommon - DCGImporter · Carrara sequenced OBJ importer built as a separate plug-in module.
CarraraExtensions/DCGImporter - Gemini · Carrara command/deformer plug-in for scene manipulation.
CarraraExtensions/Gemini - Cognito · Carrara host extension with its own plug-in boundary.
CarraraExtensions/Cognito
Lightwave plugins
Host-specific plug-in modules for Lightwave, organized by feature package.
- Lightwave suite · Lightwave plug-in collection centered on GroundControl and geometry generation.
LightwavePlugins - GroundControl · Lightwave GroundControl plug-in for loading terrain and building meshes.
LightwavePlugins/GroundControl - AnythingGoos · Lightwave geometry plug-in counterpart for primitive generation.
LightwavePlugins/AnythingGoos
Shared code
Reusable support libraries and common helpers shared by plug-in wrappers.
- Common library · Carrara reusable infrastructure for scene, shader, mesh, cache, tree, and utility code.
CarraraExtensions/Common - GroundControlLib · Low-level shared C library for GroundControl mesh, binary tree, and math helpers.
Library/GroundControl
Other components
- DCC host · Carrara or Lightwave loads these modules as native plug-ins.
- External data · Terrain, geodata, OBJ, and scene inputs consumed by import and terrain modules.
Connections 31
- DCC host → Carrara suite: loads · Carrara hosts load the Carrara extension modules.
- DCC host → Lightwave suite: loads · Lightwave hosts load the Lightwave plug-ins.
- Carrara suite → GroundControl: contains · Carrara GroundControl package.
- Carrara suite → TerrainTools: contains · Carrara terrain operators.
- Carrara suite → AnythingGrooves: contains · Carrara primitive generators.
- Carrara suite → AnythingGrows: contains · Carrara growth and hair tools.
- Carrara suite → ShaderOps: contains · Carrara shader operator set.
- Carrara suite → ShaderOps2: contains · Carrara second shader operator set.
- Carrara suite → ShadersPlus: contains · Carrara shader and lighting controls.
- Carrara suite → Shoestring Shaders: contains · Carrara shader collection package.
- Carrara suite → Stylized renderers: contains · Carrara stylized rendering plug-ins.
- Stylized renderers → Wire common: shares · Wireframe and toon plug-ins reuse common rendering state and helpers.
- Carrara suite → Common library: uses · Many Carrara modules depend on shared helpers.
- GroundControl → GroundControlLib: uses · Carrara GroundControl depends on shared low-level terrain logic.
- GroundControl → External data: reads · Terrain and geodata inputs feed the plug-in.
- TerrainTools → Common library: uses · Terrain tools reuse shared mesh and scene utilities.
- AnythingGrooves → Common library: uses · Primitive generation and mesh conversion reuse common helpers.
- AnythingGrows → Common library: uses · Growth and strand generation reuse common helpers.
- ShaderOps → Common library: uses · Shader nodes rely on shared shader and utility helpers.
- ShaderOps2 → Common library: uses · Advanced shader nodes rely on shared helpers.
- ShadersPlus → Common library: uses · Shader extensions share infrastructure helpers.
- Shoestring Shaders → Common library: uses · Shader collection reuses shared Carrara infrastructure.
- DCGImporter → External data: imports · Sequenced OBJ content is brought into the host scene.
- DCGImporter → Common library: uses · Importer logic uses shared sequencing and mesh helpers.
- Gemini → Common library: uses · Scene tool relies on shared Carrara infrastructure.
- Cognito → Common library: uses · Plug-in boundary likely built atop shared Carrara utilities.
- Lightwave suite → GroundControl: contains · Lightwave GroundControl package.
- Lightwave suite → AnythingGoos: contains · Lightwave geometry package.
- GroundControl → External data: reads · GroundControl loads terrain data and builds meshes.
- GroundControl → GroundControlLib: uses · Lightwave GroundControl reuses the shared C terrain library.
- AnythingGoos → Common library: uses · Lightwave geometry code shares common math and mesh helpers.