IVM (Infinite Variety Model) geometry
Much of what makes for high-quality and compelling graphics can be viewed as adding in the right kind of noise or variation to what might otherwise be staid and boring. Applied to geometry, this means adding in small
imperfections and variations to the models with which the environment is created. Since this is generally done manually or, at best with a tool that is specific to a single kind of object, having a wide range of varied models is often impossible due to time constraints. This paper presents a file format (IVM files) that is designed to allow a creator of 3d content to encode not only the shape of a model (vertex positions) but also how it can vary. The variations are specified in a high-level way as changes in the position, scale, or rotation of a set of vertices. Changes (hereafter refferred to as "tweaks") have a list of vertices and vertex wieghts, and individual vertices can be affected by multiple tweaks, allowing for complex variations to be built up out of move, scale, and rotate primitives.
Since the end result of the variations is visual, it was important that the variations be specified in a visual manner. Also, for the IVM approach to truly be viable and general-purpose, it must be fully integrated into the content creation process. For that reason, IVM files are created natively with Alias' Maya 3d modeling and animation package via a custom MEL (Maya Embedded Language) script.
The IVM system breaks down into two parts, both of which are crucial to the system as a whole being meaningful and worthwhile:
- A method by which IVM files can be created in an artistic manner, leveraging off of the power and ease of use of modern 3d content production applications
- A system that is capable of loading the IVM files and taking advantage of their unique capabilities
IVM file creation being affected is implemented as a script for Autodesk's Maya software package. Once created, IVMs can be viewed in a custom OpenGL application.
The current incarnation of the IVM file format is a text-based format that shares much with the Wavefront OBJ format. Where it differs from other common 3d formats is in the inclusion of “tweak” data. In addition to specifying the absolute positions of each vertex of a model, the designer of an IVM model can also use “tweaks” to tell the model how it should vary, resulting in models that can generate an infinite variety of slightly different examples of themselves, with each one conforming to the overall general design.
Each line of the file contains one of four possible kinds of information, with the type specified by the first letter(s) of the line. The possible information types so far are:
- Vertex data :
specified by a “v” followed by three floating-point numbers specifying the X,Y, and Z location of the vertex
- Face data :
specified by a “f” followed by three integer values signifying the index of the three vertices that make up the face
- Tweak amount :
specified by a “t” followed by three floating-point numbers specifying the amount of variation along X, Y, and Z, for a given tweak. Followed by one or more tweak weight lines
- Tweak weight :
specified by “vw” followed by an integer and a float. The integer value specifies a vertex that should be affected by the preceding tweak amount line, and the float (generally 0 to 1) serves as a weighting value for the tweak, allowing for smooth falloff of tweak influence
By combining tweak amount lines with tweak weight lines, a single tweak can affect multiple vertices (with or without falloff), and multiple tweaks can affect the same vertex, allowing for combined effects.
As an example, a simple IVM file that encodes a 5x5 quadrilateral with a point that moves vertically within 2 units would look like this:
v -2.5 0 2.5 // the positions of the four vertices
v -2.5 0 -2.5
v 2.5 0 -2.5
v 2.5 0 2.5
f 0 1 2 // the first face
f 1 2 3 // the second face
t 0 2 0 // a tweak of 2 units in Y
vw 3 1 // associates the above tweak with vertex 3 and a weight of 1
IVM file creation
While it's quite possible to create and edit IVM files with nothing more than a text editor, for the system is aimed at creating a true artist's tool, which requires the kind of sophistication and power available with 3d modeling packages. To that end, I've started building IVM creation tools for Maya using its embedded scripting language, MEL. While it will likely be necessary to create a full on plugin to fully integrate the IVM approach into Maya, the current script has proven useful in aiding in the creation of test files, as well as providing a useful laboratory in which to test approaches for the plugin version.
The current version of the script (pictured at left) allows for the saving of IVM files directly from Maya. The user begins by selecting a polygonal mesh, typing a name into the text field at the top, and clicking on the “Save IVM” button.
br>
After having done that, the user can select any number of vertices of the model and specify tweaks by:
- moving the vertices to their minimum position and clicking “Set MIN”
- moving the vertices to their maximum position and clicking “Set MAX”
- clicking on the “Add Tweak” button
Each time the user completes the above three-step process, the appropriate “t” and “vw” lines are appended to the ivm file.
IVM file viewing
IVM files, once created, can be viewed and experimented with in a custom OpenGL application, pictured below:

The application loads IVM files and renders them. The program allows for loading of IVM files via a rudimentary text field (wherein the user inputs the relative path to the file), as well as rotation of the model via the
arrow keys. The main feature of the program as it stands is the ability to generate variations on the theme of the model, in either a random or controlled manner.
When the IVM file is loaded, the data is read into an IVMmesh object, a custom C++ class that has a randomize method. The IVMmesh.randomize() method can either be called with no input, causing the model to vary in an unknown way (though in accordance with the parameters set by the IVM file), or with an integer seed value, which will cause the model to go to a specific, knowable, and constant variation. This allows IVM data to be used not only to provide variation, but also consistent complexity
with a minimum of storage.
Both options are
available in the demo application, with the Options->Change Mesh->Random command changing the mesh in a random way, while the Set Seed command brings up a dialog wherein the user can specify an integer seed value. Given the same seed value, the model is guaranteed to be exactly the same.