3D Modeling and Blender

CS 481/681 2007 Lecture, Dr. Lawlor

Blender is a pretty capable free 3D modeling program.  It's available for all platforms.  The only downside is the bizarre, nonstandard user interface.  This is typical for 3D modeling programs, even pro versions--they're just their own weird thing.

To install Blender on the Chapman lab machines, or any Windows machine where you don't have administrator access, just unzip this directory and double-click blender.exe.  The official installer will associate to .blend files, so use that if you can.

Check out the Blender Tutorials and Blender Doc Wiki.  In particular, I've worked over the Volcano Tutorial to the point where it almost makes sense.

Exporting from 3D modelers to "Real Code"

So 3D modeling programs make it pretty easy to generate cool geometry.  The trick is then you've got to somehow move that geometry into your application (game, visualization app, etc).

The easiest way to do this is skip it entirely--just do all your modeling and rendering inside the 3D modeling program!  But the modeling performance of these programs usually isn't that good, and you often need to add some complicated features that would be easy in C++, but tricky in the 3D program.

The standard way to exchange data between programs is of course files.  We've looked at several very simple file formats, like the OBJ file format, but modeling programs usually support more than the very simplest "just the polygons" formats, because the modeling programs support way more than just polygons--they have colors, textures, "instanced" sub-pieces (like function calls), and transforms.

Blender supports five file formats "natively", in C++ code:
If you have python installed properly, and a .blend directory with the appropriate scripts in your home directory (or the blender binary's directory), then you can export to a bunch of much nicer and more capable formats, including 3DS, Wavefront OBJ, and so on.  Wavefront OBJ files can be read by our 381 "objreader" program.