Ogre Procedural Geometry Library         A library to quickly create geometric primitives

click to enlarge
click to enlarge

Ogre Procedural is a procedural geometry generation library, targeted at Ogre3D

Autor: Mikachu(external link) (Michael Broutin)
Licence: MIT License

Source code and downloads you find on the project page(external link).
Documentation : User Manual(external link) and API Reference(external link)
If you have questions, ask in the forum(external link).


Existing features in current release (0.2):

  • Primitives : Box, RoundedBox, Plane, Sphere, IcoSphere, Cylinder, Tube, Capsule, Cone, Torus and Torus knot
  • Extrusion
  • Lathe
  • Triangulation
  • Smooth splines by Bézier Curves(external link) (also usable for extrusion)
  • Constructive solid geometry in 2D

Planned / not yet in the official release:

  • A plug-in for the scene editor Ogitor
  • SVG import (currently without Bézier import)
  • OpenStreetMap data import
  • Object description by XML file (as alternative to source code)



Rendering of openstreetmap XML data
click to enlarge


Downloads are available in the download section(external link) of the project page.

Precompiled binaries are provided for Visual Studio 9,10,11 and for MingW : here(external link) for the stable release, and there(external link) for nightly builds.
Source package is also available for all platforms (CMake based project files)

Usage Examples

Create a sphere:

#include "Procedural.h"

Create a pipeline:

Procedural::Path p = Procedural::BezierPath().addPoint(0,5,0).addPoint(0,4,10).addPoint(10,5,10).close().realizePath();
Procedural::Shape s = Procedural::CircleShape().setRadius(1.5).realizeShape();


Advanced example

This example shows how to create a shape by a vector graphic application and how to use it for extruding.

Create SVG shape (e.g. with Inkscape):

Load the shape and define a path:


// load inkscape .svg file into a shape:
Shape shape = Shape();
shape.loadFromSVG("inkscape-test.svg", "path2985");
// construct the spline we want to extrude along:
CatmullRomSpline3 pp;
Path line = pp.realizePath();
// extruder and mesh generation
Extruder e;


How to build

This is a list of basic steps to compile ogre-procedural from source.

  • Install Cmake
  • Install Ogre, either from source or precompiled SDK (1.7 or 1.8)
  • If you are using MS Windows, make sure that there's an evironnement variable OGRE_HOME set to your ogre SDK directory

Compiling and running the sample:

  • Generate project files using Cmake
  • Compile, run, and enjoy :-) ...


See also


Contributors to this page: Beauty14565 points  , simedj46 points  , saftschachtel194 points  , mikachu280 points  , jacmoe180265 points  and duststorm2767 points  .
Page last modified on Monday 06 of January, 2014 10:23:17 UTC by Beauty14565 points .

The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.
As an exception, any source code contributed within the content is released into the Public Domain.