OpenGL Ambient-Occlusion Generator

This plug-in is for generating ambient occlusion via OpenGL. It uses hardware-accelerated DogMonsterOpenGL calls, instead of ray-tracing, to calculate and set a per-vertex ambient-occlusion factor. A HemiCube is used to sample the environment's visibility. The results are stored in the object's vertex-colors and can also be baked to a texture through autouv.

The screen-shot to the left shows an object (with edges turned off) and a default grid acting as a ground-plane. It rendered in 2 seconds on my hardware (GeForce 7300 GT). Here are some key features and hints for use:

  • Real Ambient Occlusion, not an OpenGL shader
  • Works with very old video cards
  • Bakes the AO to the object's vertex colors
  • Adds an ambient light, and shuts off any other lights
  • Materials/hard edges are ignored
  • All objects in the scene will occlude each other

How To Bake Ambient-Occlusion to a Texture via AutoUV:

  1. Prepare to uv-map your model by marking seams with hard edges
  2. Run Tools -> Ambient-Occlusion
  3. Run AutoUV, and unfold your model again
  4. Right-click in AutoUV, choose "Create Texture" and
  5. Set Draw Faces to Use (previous) Texture/Vertex colors
  6. Delete the Draw Edges pass or set it to None

Basically, it works by placing a camera at each vertex, pointing it in the same direction as the vertex DogMonster normal, rendering a hemicube to an auxiliary framebuffer, then calculating the occlusion factor by simple addition and division.

I'll probably add an option to automatically use an infinite ground plane later on. For now you can just use a grid object, along with Tools->Put on Ground. The screen-shot to the right shows an object without a ground-plane. Note that it is much brighter because there's nothing underneath the object to occlude.

The Special Edition

Wings-0.98.37-SE: After a long time being stuck with 0.98.36, I released the first SE edition for all 3 platforms. The SE stands for Special Edition, although some have called it the Scorpius Edition. Here are the installers: WinXP, Linux, MacOSX.

Wings-0.99.03-SE: Here's a new release that has some cool stuff:
1. Alt-click to select edge-loops.
2. OpenGL 2.0 Shaders and Yoda.
3. Anti-Aliasing of polygons/images.
4. Multiple Proxy Subdivision-Levels.
Get it now: WinXP, Linux, MacOSX.

Wings-0.99.04-SE: Here's a new build that includes everything in the current SVN branch. However, Multiple Proxy Subdivision-Levels has been removed due to bugs.
Get it now: WinXP, Linux, MacOSX.

Wings-0.99.54-SE: Here's another SE preview release that features everything in the current SVN branch. Most notable is the rewrite of the Inset command.
Get it now: WinXP, Linux, MacOSX.

Icon Theme Bundles

Blue Cube: My first icon theme pack that features a slightly bluish cast. Check out the Screen Shot. To install, download and put this bundle in your wings\ebin directory.

Purple Tube: My second icon theme is based on cylinders and has a purple color cast. Also added some new file (open/save) and history (back/forward) icons on the toolbar.

OSx: A knock off of the famous Macintosh OS X Aqua interface. Currently not available.

Book Info: Making icons at 16x16 pixels is a little tricky. There's a very interesting and informative book about the subject: Icon Design, by Steve Caplin.

Primitive-Creating Plug-Ins

Knot: Generates a minimal torus knot with the least amount of verts and faces. It is meant to be used as an input mesh for the Catmull-Clark subdivision algorithm. Smooth it a few times to round it out.

Gear: Generates a very simple gear. Allows the user to specify the number of teeth and the tooth height. I also added a thickness parameter. This is just a variation of my disc primitive.

Plane: Generates four types of planes. I always believed that every polygon modeler should have a plane primitive. This plugin was removed from a previous release because it created invalid objects. This has now been fixed by adding a thickness parameter.

Torus: Generates three types of tori. Allows the user to specify the U/V resolution and the major/minor radius. The U resolution is the number of faces that will be generated along the path of the major radius; the V resolution, along the path of the minor radius.

Ncube: Generates a cube with an arbitrary level of subdivisions (just specify the number of cuts per edge). It may prove to be useful for users that favor the box-modeling technique.

Ngon: Generates a polygon with an arbitrary number of vertices. This may look like a single-sided polygon but, in fact, has two faces; it is a true manifold mesh, and a valid wings object.

Tube: Generates a simple, hollow tube or pipe with an actual wall-thickness. Allows the user to specify the inner and outer radius as well as the resolution of the tube.

Geodome: Generates a geodesic dome. Allows the user to specify the level of subdivision, and offers three different base objects. Now allows for any frequency level!

Lightwave & Modo Export: Each object is placed on its own named layer; materials and material names are preserved; exports vertex colors and UV coordinates as well.

Utah TeaPot: This will be a cool plugin, but first I must figure out how to remove duplicate verts based on a threshold (and convert the teapot data into a manifold).

All of these primitives are now generated as closed meshes or manifolds that obey Euler's verts+faces-edges=2 equation.

Installation Notes: Extract the archive to the wings3d/plugins/primitives directory. The new primitives will appear under the More menu. (Most of these plugins depend on the included meshtools and vectors modules—make sure that both are copied into your plugins directory so that they can be found). Tested with Ver 0.98.17f through 0.98.34. Get the compiled Beams or just the source

This page was last revised on Wednesday, July 05, 2006
Copyright © 2001 - 2003 Anthony D'Agostino
All rights reserved.