These notes provide additional information on the interim release of Modeler. This version of Modeler is not in final form, and many of the features and functionality of this version may change before it is generally made available.
The major features of this version are a new Polygon Editing Tool, and a Material Library.
This tool is invoked by using the bottom button on the tool selection bar or by the F8 key.
This tool is, for the most part, a superset of the existing Vertex Editing Tool. The only features of the Vertex Editing Tool that are not supported in this tool are the Jelly Mode, and the vertex QuickView. These may be included at some future time, and the Vertex Editing Tool totally replaced by the new tool. This will depend on the feedback during preliminary testing.
Since the Polygon Editing Tool is a superset of the Vertex Editing Tool, all of the subset functionality works the same. Some differences in mouse pointer appearance will be noticed, since there are several new mouse pointers, and they more closely reflect the operation being performed.
The major additions are the ability to work with both polygons (and ordered sets of polygons), and vertexes (and ordered sets of vertices). The set of functions which can be performed on these are fairly complete, and symmetrical. They can be created, deleted, duplicated, moved, aligned, and (for polygons only) have their normals reversed. Meshes can be complete created from scratch, with no requirement to start with a predefined mesh.
This document will briefly explain the new functions, and modifications to old functions.
To work on an existing mesh in the model, it must first be selected. Clicking the mouse on the mesh does this. This will ONLY select the mesh, and cause no other action (although I am thinking about allowing the mesh to be moved around in total here, like in the Pointer Tool). Once selected, the mesh will display all of its vertexes (or only its visible ones, depending on the checkbox) as handles. Note that only one mesh may be selected at a time.
At this point, any combination of vertices and polygons in the mesh can be selected. A vertex is selected by clicking on its handle. A polygon is selected by clicking anywhere on it surface. This selection can be done in any view, and carries across all views. A selected handle has an X in it. A selected polygon is outlined in the specified Highlight color. To add addition items to the selection set, use CTRL+Click. As items are selected, the various functions that can be performed on them will cause the buttons on the tool to be enabled/disabled. Some functions can only be done on polygons, some only on vertices, and some on combinations of both. Note that a single click on a vertex or polygon not in the current selection will clear the current selection to just that item. CTRL-Clicking on an already selected item will unselect it. Note also that neither vertices nor polygons can be moved while the CTRL key is depressed.
Also, there are two new Edit menu items, Select All Polygons and Select All Vertices, which are enabled if a mesh is selected. Note that it is a useful thing to first select the primary vertex or polygon, and then use the Select All … menu to select the rest. The first vertex or polygon selected will remain the first of the set, allowing it to be used to modify the rest of the items.
The various functions are pretty self-evident. Note that all alignment and spacing of polygons is based on their “bounding boxes”, a cubic approximation of the space occupied by them, which touches them at their edges on the various axis.
Everything can be undone/redone. Note that an Undo operation does unselect the current mesh. This will be addressed in a later release. Note also that the Escape key (or button) will also clear the current selection. The selection actions can not be undone/done, since they do not modify the model.
Note that all polygons may be deleted, but only vertices that are not part of any polygon can be deleted. The Delete button will only be enabled if a valid set of vertices had been selected for deletion.
Certain functions require an “ordered” set of vertices or polygons. These alignment functions align all subsequently selected items to the First item selected. The first vertex selected has an X with a circle around it, and the firs selected polygon has a double line around it.
The creation of vertices and polygons is entirely new. To create a vertex, the SHIFT-Click function is used. If the SHIFT key is held down, the mouse pointer will change to the Add Vertex pointer. Clicking on any view will put a vertex into the mesh at that location. The added vertex will show up as an isolated handle. As long as the SHIFT key is held down, more vertices can be add. All vertices added during a single pushing of the SHIFT key are considered a single action. The Undo/Redo function will undo or redo the entire addition. Releasing and repushing the SHIFT key will start a new action. Note that vertexes can be added EVEN IF NO MESH IS SELECTED. If this is done, a new empty mesh will be created automatically, and selected. This is how a new mesh is created with no underlying mesh. If a mesh consisting of only vertices should become deselected, it will be impossible to reselect it through normal means. However, a new menu item Edit->Select Hidden Mesh will appear if this is the case. Choosing this menu item will select the mesh with only vertices. If there is more than one mesh with only vertices, the particular mesh selected by this menu item is indeterminate. While vertices are being added, and the SHIFT key is still held down, a new vertex may be removed by moving the mouse pointer over it (the pointer will change to a Remove Vertex pointer), and clicking. Only vertices added during the current action can be removed this way. All others must be Deleted. NOTE: While creating new vertices, turn on the Show Hidden Vertices option. RenderWare’s hidden vertex algorithm only finds vertices that are part of a polygon. If you do not turn this option on, the vertex will be added, but not visible.
To create a polygon, select any ordered set of vertices as described above. The Create Polygon button will become active. Clicking it will create a new polygon with the specified vertices, and select it. It will have the default material. If you happen to create it backwards, it will still be selected even though you may not be able to see its surface. Just click Reverse Normal (which will be enabled) to change the vertex order. The same vertex can be in multiple polygons.
Both vertices and polygons can be Duplicated. They are NOT MOVED when they are duplicated, but are selected, so they can be moved with the mouse (or keyboard). Note that duplicating a set of polygons with shared vertices will result in a duplicate with shared vertices. The geometry is maintained as much as possible.
There is also a polygon only duplication function - Duplicate and Reverse. This duplicates the selected polygons, without duplicating their vertices. It then reverses the normals of the new polygons. The new polygons are selected after the duplication. This provides two sided objects, where each side can have a different material.
There is another function at the far right - Delete Unused Vertices. As a mesh is edited, it is easy to start generating “orphan” vertices. Selecting the mesh, and the clicking this button, will clean up the mesh, and eliminate all vertices that are not part of a polygon. This should result in no visible change in the mesh.
The Space Equally ... functions (for both vertices and polygons) work similarly. They sort all of the items selected along the specified axis. They then find the first and last, determine the space in between them, and then move each of the remaining items in the selection so the SPACE BETWEEN them is the same. The items are not aligned on their centers (this is only meaningful for polygons, vertices are their own centers). If the items are in total too big to be aligned this way, an error is given, and nothing is done.
The Copy Material function is available when more then one polygon is selected. It copies the material from the first polygon in the selection to all of the other polygons.
Although this is actually a part of the Polygon Edit Tool, it is so powerful that it needs its own section. When the Polygon Edit Tool is Active, there is a new menu item View->Show Property Window. When this is checked, a window opens containing a property list. Entering CTRL+P may also toggle the property list. When one or more vertices or polygons are selected (but not both), the property list shows all of the properties of the selected items. What is shown is different depending on whether only one, or multiple, items are selected.
When a single polygon or vertices is selected, the property list shows all of the properties of that item. Property values that can be changed are shown in black, and ones that cannot be changed are shown in red. Double clicking on its value can modify any changeable property. If it is a number or text, it can be edited in place. If it is a list selection, a drop-down list will appear, and the appropriate selection can be made. In some case, a button will appear, and clicking it will open a dialog box (for color or material, for instance). The editing may be aborted by using the ESCAPE key (or the Cancel button on a dialog). Any changes made are effective immediately, but can always be Undone.
For vertices, the only unusual thing to note is that the vertex coordinates appear as two different properties, one in Object Space, and one in World Space. Changing one will change the other. Use which ever is more convenient.
For polygons, there are some additional issues. Editing the Material property will bring up the Browse Material dialog to allow the selection of a new named material from the library. This differs from the normal Material Library browser (below), in that it also shows all currently defined materials from the Painter Tool, outlined in black. The selected material will be added to the model (if it is not already there), and applied to the selected polygon. For all other property changes, if the material that has been applied to the selected polygon is shared with any other polygons, a COPY of the material will be made before the changes are applied. This prevents unexpected results. The modified material can easily be copied to other polygons using the Copy Material function if required.
When multiple vertices or polygons are selected, things become a little more complicated. First, the property list will show a different set of properties in red, because some properties cannot be changed on multiple items at once. Also, some property values will be displayed with a gray background. The values shown in the list will always be those of the FIRST vertex or polygon in the selection;
For vertices, these are properties that are different on the selected vertices. Properties that are the same on all selected vertices will be displayed with a normal white background. The properties with gray backgrounds can be changed, but the change will make all of the vertices have the same value for that property (and the background will change to white).
For polygons, the meaning of the gray background is the same, but there are additional considerations. First, with multiple polygons selected, all properties except for the Material and Tag properties will be disabled (red) unless all of the selected polygons have the same material applied to them. This is a safety precaution to prevent the sudden creation of thousands of different materials in the model. (Each different set of material properties requires a different material). If all of the polygons do have the same material, then the process is similar to the single polygon case. If the material is used only on the selected polygons, then any changes will be made to that material. If the material is used on more than just the selected polygons, then a copy of the material will be made, and added to the model, and the changes will be made to it. Polygons that are not part of the selection will not be changed. Note that the Material property is always available (although it may be gray), and will load and apply the selected material to all of the selected polygons. The Tag property will always set the polygon tag as specified.
Note that entering an invalid value for any property will result in no error; the value just will not be changed.
Modeler now supports a Material Library. This allows materials used in a model to be saved, and reused in other models. A material is as defined by Renderware, and consists of all of the various attributes that can be defined in the Painter Tool. Two new buttons are now on the Painter Tool control panel, Browse Materials, and Save Material. Also, materials have names, and the name of the material being edited is shown below it. Materials are stored in individual files that are actually Renderware material definition scripts (MaterialBegin...MaterialEnd) with an extension of .rwm. (Note that although they are valid Renderware script fragments, and can be used in manually edited Rendeware model scripts, they are a specific subset. Editing the material script manually could cause Modeler to crash). All of the materials are stored in one folder, which is specified from the main menu (File->Set Material Library). This folder is persisted through all future Modeler sessions until changed. The Browse Materials function of the Painter Tool opens a browse dialog identical to the Browse Textures function. The only difference is that the materials in the current library are displayed. A material can be selected, and it replaces the material currently being edited. However, it does not change any of the materials in the material list until the Put Back function is selected. The Save Material function writes the current material definition to a file. Note that if ToolTips are enabled, moving the mouse over any sample material will display its name as a ToolTip.
Also, the Material Library may be used to define a Default material. Whenever a new model is created, the Material Library (as specified above) is searched for a file named Default.rwm. If it is found, and is a valid .rwm file, it is loaded as the Default material.
There are two new menu selections under Options->Colors: Selection Color and Invert Selection. Selection Color allows the specification of the color to be used when highlighting a selection (meshes, vertices or polygons). If the Invert Selection menu item is checked, then the color is ignored, and the highlighting of the selection is done by inverting its pixels. The two modes can be toggled at any time by entering CTRL+I.
A new function has been added to the Painter Tool that allows the use of texture masks. After loading a texture into the current material, a mask can be applied to it by using the MaskTexture button. Either normal .bmp or compressed (.zip) files containing .bmp files can be used as masks. Also, the mask that is currently applied to the texture can be changed, or removed entirely by using the No Texture button. Note that changes to textures are global to the entire model. All materials using the texture will be changed to reflect the masked/unmasked state of the texture. Texture masks are both retained by name after inputting a model, or masking a texture, and then written to the output model correctly.
The Painter Tool and the Load Texture dialog box now allow the texture thumbnails to be displayed mapped either spherically or cubically, just like the Browse Texture dialog.
Animated textures are now animated in the Painter Tool thumbnails (if Animate is set), and in the Load Texture and Browse Texture dialog boxes.
The display of the grid (CTRL+G) is now separate from the snapping of objects and vertices to the grid (CTRL+A or Options->Snap To Grid). Objects will only snap to the grid if it is showing, but just showing the grid will not force objects to snap to it unless the Snap To Grid option is set. Snap To Grid is the default setting.
All operations involving the creating, sizing, or moving of objects (or their vertices or polygons) will be snapped to the grid if it is visible and Snap To Grid is set.
Context-sensitive help is now available. Pressing the F1 key while the mouse is over a button, menu, or other control, will invoke help for that object. Also, the Help pointer may be invoked by entering SHIFT-F1 or by clicking the Context Help button (Arrow-Question Mark), and then clicking the item of interest. On many of the dialog boxes, the Question Mark button is available in the upper right corner of the box. Not all items have help yet, but they are coming…
There are some new options on the “Reduced” output dialog. The case of the output is now preserved by default, but can be made all lower case if desired. The number of decimal places can be specified, and the Vertex and Polygon (and Triangle and Quad) statements can be indented. Numbers may have their trailing zeros retained so that they are aligned in the output. Also, UV values may be deleted from the output.
All of the options selected for Reduced output are preserved from one session to the next.
The Space Equally now works the same as described above for the Pointer Tool as well, not the stupid way it did in the 1.1.0.49 release.
If a Default Material was set in a previous version of Modeler (Options->Reset Defaults->Materials), it will be gone in this version. The material format changed and it had to be deleted. You can set a new default, or use the new default material as discussed above. It will be preserved in all future versions.
The Vertex and Polygon Edit Tools “Show Hidden Vertices” option now works very efficiently when not selected. There is no question that eliminating hidden vertices from the views is time consuming, but the process has been sped up by about 100 times, and the option is usable even on objects with thousands of vertices (the test case has about 3000 vertices). Once rendered for the first time, other operations are dramatically faster. However, there may still be occasions where it is desirable (faster) to turn Show Hidden Vertices on while performing certain operations.
There are many other changes and optimizations in this version; they just haven’t been fully documented yet. Things should seem faster, less flicker, etc. There are a few new functions in other tools.