Tools to Save Your MindStorm Models
Pages: 1, 2, 3

Creating building instructions

Now you understand how to create a high-quality image of a Lego model. Creating a whole series of instructions is just a tedious repetition of these basic steps. To create the online instructions for the robots from my book (, for example, I followed these steps:

  1. I use MLCAD to create an MPD file for the entire model.
  2. Using a text editor, I cut and paste from the original MPD to create a DAT or MPD file representing each step in building the model.
  3. I also use a text editor to pull out the parts needed for each step. Then I edit the parts files in MLCAD to lay them out nicely.
  4. The step files and parts files are converted to .pov files using l3p.
  5. Inside POV-Ray, I edit the camera angle and lights for the completed model until I am happy. Then I copy the camera and lights settings to each step file. I modify the camera and lights slightly and apply the new settings to each of the parts files. For complex models, some steps have to show different views of the model, so these have to be adjusted separately.
  6. For certain pieces, like tires or treads, the default materials don't look right. By default, l3p makes all the bricks look shiny, but tires and treads need to look like rubber. For this, I manually create a new material and substitute it in for the tires and treads.
  7. I use POV-Ray's file queue to render all of the step and parts files while I go to have lunch.
  8. Then I crop each image using Adobe PhotoDeluxe. I would use a real tool like Photoshop or GIMP, but I don't have either one.
  9. I add text to the parts images using PhotoDeluxe.
  10. I save all the images as JPEGs.
  11. Then I use Netscape Composer to create the HTML pages containing the images.

It's a tedious process, but I'm very pleased with the results.

For more information

This article skims over the top of several deep subjects: part modeling, DAT files, and POV-Ray. If you'd like to learn more, there's plenty of information out there.

  • is an outstanding collection of Lego model building information. You can find official parts updates, information about the DAT file format (in the FAQ), links to all of the known DAT file editors and utilities, and information about upcoming developments in the Lego CAD community.
  • LUGNET is the center of the online Lego community. It has an entire hierarchy of discussion groups devoted to Lego CAD issues.
  • Although has MLCAD available for download, Michael Lachmann maintains the official MLCAD page
  • l3p has its own homepage, with helpful tips and examples.
  • POV-Ray has a web site with lots of information and documentation.

Jonathan Knudsen is an author at O'Reilly & Associates. His books include The Unofficial Guide to Lego MindStorms Robots, Java 2D Graphics, and Java Cryptography.

Discuss this article in the O'Reilly Network MindStorms Forum.

Return to the O'Reilly Network Hub.