# Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics

[Home] [Tutorials] [All Classes] [Grouped Classes]

# Visualization Library Gallery

One picture is worth a thousand words, one word is worth a million pictures...

## Tessellation Shaders

Using tessellation shaders it is possible to control directly on the GPU the LOD and tessellation level of primitives.
The example below shows how to use tesselation shaders to implement a simple terrain rendering system with dynamic LOD (see `App_TessellationShader.cpp`). Note how the size of the triangles in pixels remain roughly constant at different zoom levels.

For more info on how to use tessellation shaders with Visualization Library see vl::GLSLTessEvaluationShader and vl::GLSLTessControlShader.

## GLSL Shaders

Using GLSL it is possible to create a variety of effects. The source code used to generate images below can be found here.

For more info on how to use GLSL shaders with Visualization Library see vl::GLSLProgram, GLSL.h and App_GLSL.cpp.

## GPU Raycast Volume Rendering

A few volume rendering techniques based on GPU raycasting such as isosurface, MIP (maximum intensity projection) and integration, implemented using OpenGL Shading Language shaders.

See also:

- GPU Raycast Volume Rendering with Transfer Functions and Lighting Tutorial page.
- Sliced Volume Rendering with Transfer Functions and Lighting Tutorial page.

## Volume Isosurface Extraction With Marching Cubes

Various examples of isosurface extraction using the vl::MarchingCubes class.

See also the Volume Rendering and Isosurfaces Extraction with Marching Cubes Tutorial page.

## Mandelbrot Fractals

A few Mandelbrot fractals generated using the OpenGL Shading Language.

## Molecule Visualization

The vl::Molecule class implements a simple molecule visualization engine that allows you to visualize molecular structures using several styles.

See also the Molecule Visualization Tutorial page.

## Edge Enhancement

The vl::EdgeExtractor and vl::EdgeRenderer classes allow you to extract and render an object's edges to perform edge-enhancement and hidden edge rendering.

See also the Edge Enhancement and Wireframe Rendering Tutorial page.

## Polygon Reduction

The vl::PolygonSimplifier class allows you to easily reduce the polygon count of geometrical objects by defining a percentage or a target polygon count.
The polygon reduction algorithm implemented by vl::PolygonSimplifier is based on the "Quadric Error Metrics Surface Simplification" algorithm by Michael Garland and Paul S. Heckbert.
The images below show a mesh progressively reduced from ~1.08M to ~11K polygons (1% of the original).

Original mesh shaded. | Original mesh wireframe. | 10% reduced mesh shaded. | 10% reduced mesh wireframe.

## Extrusions

The vl::Extrusion class can extrude a 2d silhouette along a 3d path in order to generate 3d geometries. A vl::Interpolator can also be used to generate paths and silhouettes to be used with vl::Extrusion.

See also the Extrusion Tutorial page.

## Interpolators

The vl::CatmullRomInterpolator and vl::LinearInterpolator classes can be used to interpolate 1, 2, 3 and 4 component values to create paths or animations.

See also the Interpolators Tutorial page.

## Bezier Surfaces

The vl::BezierPatch and vl::BezierSurface classes allow you to define complex surfaces with an arbitrary tessellation level. Below the famous Newell teapot is rendered using 32 4x4 Bezier patches with three different subdivision levels, less detailed on the left, more detailed on the right. The dots and the white lines in the first image represent the control points of the patches, the red dots represent the corner control points that are guaranteed to touch the Bezier surface.

See also the Bicubic Bézier Patches and Surfaces Tutorial page.

## Occlusion Culling

- In the first image the occlusion ratio is 96%: frame rate with and without occlusion culling is 125.9 vs 54.7, speedup 2,3x.
- In the second image the occlusion ratio is 84%: frame rate with and without occlusion culling is 139.7 vs 106.4, speedup 1,3x.
- In the third image the occlusion ratio is 40%: frame rate with and without occlusion culling is 104.8 vs 59.7, speedup 1,76x.
Benchmark info: 1681 trees, tested on NVIDIA GeForce 460M GT, Intel Core i7-740.
Note that the speedup can be even much higher for less powerful video cards or more detailed scenes.

See also the OpenGL-Accelerated Occlusion Culling Tutorial page.

## Kd-Tree Scene Manager

This sequence of pictures below show how the vl::SceneManagerActorKdTree class subdivides a set objects in both 2D and 3D. Click on the first picture and press the left or right arrow to browse through the image sequence.

This sequence of pictures below show how the rendering speed is dramatically incread by the use of simple frustum culling (7 -> 140 FPS!) and even more by the use of kd-tree accelerated frustum culling (140 -> 737 FPS!). The scene contains several thousands of highly detailed objects out of which only a small portion is visible. Using kd-trees allows to discard the vast majority of the non visible objects with just a few tests. On a Intel Core i7-740 the compilation of the kd-tree takes roughly 1 second for ~100.000 objects.

## Polygon Tessellation

Polygon tessellation is the process of converting a set of outlines into triangles. Such outlines define the inside and outside areas of a complex polygon. Tessellation is commonly used to convert complex, concave or self-intersecting polygons into trangles. The example below shows how two star-shaped outlines intersecting each other can define a complex polygon. The polygon is rendered in both flat shading and wire-frame, the latter reveals the triangles resulting from the tessellation of the complex polygon.
With Visualization Library you can use the vl::Tessellator class to convert such complex polygons into a set of OpenGL-renderable triangles.

See also the Polygon Tessellation Tutorial page.

## Geometrical Primitives

Visualization Library includes a series of functions to create the most common geometrical primitives out of the box such as:

- vl::makeBox()
- vl::makeTeapot()
- vl::makeCapsule()
- vl::makeTorus()
- vl::makeCylinder()
- vl::makeUVSphere()
- vl::makeIcosphere()
- vl::makeIcosahedron()
- vl::makeCone()
- vl::makePyramid()
- vl::makeGrid()

See also the Geometry Primitives page.

Box | Teapot | Capsule | Torus | Cylinder
UV Sphere | Icosphere | Icosahedron | Cone | Grid

Visualization Library v2011.09.1162 Reference Documentation
Copyright 2005-2011 Michele Bosi. All rights reserved.
Updated on Thu Jan 26 2012 00:43:54.
Permission is granted to use this page to write and publish articles regarding Visualization Library.