Here is the most recent version (1.7.13) of the LionSnake Modeler, fabled in story and song. This modeler is designed for creating posable subdivision surface models for use with the Persistence of Vision Ray Tracer, but you can also use it for editing Alias/Wavefront mesh files.
A 16-bit color screen is good enough. (Does anybody still have one of those?)
Features
| Posable models |
The models can be built around a linked skeleton. |
| UV-mapping |
You can create uv-mapped meshes. |
| POV-Ray Export |
The models can be exported to an include file readable by the Persistence of Vision Ray Tracer. The files are designed to work with my Catmull-Clark Surface Subdivision Suite to produce smooth, organic shapes. |
| OBJ file import and export |
You can import and export Alias/Wavefront OBJ files. |
| OpenGL for rendering. |
I would have used DirectX, but Microsoft made DirectX more difficult to program than was necessary. |
Downloads
Contains:
- The binary (lsm_1_7.exe);
- An sample model file (sample.lsm);
- An exported version of the sample file;
- A POV-Ray scene file which shows how an exported file can be used in POV-Ray;
- The Catmull-Clark Surface Subdivision Suite files (see above for the link to the explanatory page);
- A help file in HTML format;
- A README file to guide you through the installation process (which is not idiot-proof);
- And another file, in HTML format, explaining the new LSM file format.
Contains:
- The C++ source files, plus the resource (.rc) file, the toolbar image file, and the icon file.
If you make a custom compile, you will need to include your compiler's version of comctl.lib, glu32.lib, opengl32.lib, and shell32.lib when linking.
Screen shot
If you've been using LionSnake for a while, and feel you have reason to be proud of what you've accomplished, send me a link to a render and I'll try and see if I can whip up a gallery here. For now, here's a view of the sample model that now comes with the download:
Release History
- I changed the numbering scheme starting with version 1.6.3. The first number indicates the major version, the second indicates the minor version, and the third indicates releases within the minor version.
- A change to the minor version indicates a change to the file format; all versions can read the files of earlier versions, but earlier versions cannot read the saved files from later versions.
- A change to the release number indicates bug fixes and feature changes that don't require a change to the file format.
Version 1.7.13, 14 February 2009
The Bones were not being displayed for some reason. Fixed.
There was a bug in .obj file import which would cause a crash if the texture vertices were specified using the relative indexing option. Fixed.
Version 1.7.12, 14 February 2009
The subdivision preview now approximates (pretty much) the final subdivision level. The refinement of this preview can be set from a menu option.
A lot of the time, Bones were too being drawn too small to be of much use. Fixed.
When Bone display was on, and there were Bones in the model, many of the on-screen objects would not highlight when the mouse rolled over them. Fixed.
You can insert a cube from the main menu or the context menu. The cube runs from <-1,-1,-1> to <1,1,1> and its edges are parallel to the coordinate axes.
You can now extrude or inset a single face (from an item in its context menu). A gadget appears that allows you to adjust the amount of extrusion or the scaling of insetting.
The gadgets for Bone scaling and Bone translation now look and operate differently.
The display is now drawn with anti-aliasing, to improve its overall appearance.
Some of the global variables have been moved to a class built for holding application-wide data. This currently has no effect on the user experience, and was instituted in order to support an upcoming feature.
The dotted lines that once showed Bone dependency have been returned to service.
Building the skeleton has changed quite a bit. While in this mode, the most recently-created Bone will turn as the mouse moves, and clicking on an existing Bone will cause that Bone to be made the parent of the next Bone created while in Bone adding mode. The mode for adding bones can now be entered from the context menu for the highlighted bone.
When the mouse is over the end knob of a Bone, the rotation gadget for that Bone will be displayed. If you make any use of this gadget, it will remain visible and usable until you right-click it away.
Version 1.7.11, 14 July 2008
- The way Bones are drawn, the way Bone dependency is depicted, and the rotation tool for Bones have all been changed greatly. You can now rotate a Bone by individually dragging its coordinate axes, or by dragging its end knob.
- When reading an
obj file, extra white space before a field caused the field to be read twice. Fixed.
- The old C-style way for representing points and vectors (namely, three-member arrays of
float values) was replaced with code that is more object-oriented. The code that handles the analytical geometry has been simplified, greatly so in many cases.
- If a Bone is highlighted, and the user clicks the Add Bone button, the highlighted Bone becomes the parent of the first new Bone.
Version 1.7.10, 22 April 2008
- Bones are now drawn differently, and Bone dependency is depicted differently.
.obj import is now available from the File menu.
- The model name is now displayed in the window title bar.
- The application would crash when the user tried to save the model. Fixed.
- Texture mapping is now back on in subdivision preview.
Version 1.7.9, 2 Apr 2008
- The application would crash when trying to load files in the original archive format. Although I suspect that this format was never used in a release version, I'm not 100% certain, so this has been fixed.
- There was a crash whenever the user tried to subdivide a portion of the mesh. Fixed.
- There was a crash whenever the mesh topology was changed during subdivision preview. Fixed.
- The previous bug was discovered while the subdivision preview was in the middle of a large rewrite. The texture-mapping still hasn't been added back in yet, so for now there is no texture-mapping in subdivision preview.
- Floating point error was causing values that should have been zero to be displayed as very small numbers near zero. Now values that are supposed to be zero look like zero.
- When the view was rotated the right way, there was a gap between the edge of the axis grid and the corner of the screen. Now the grid, when visible, always occupies the whole screen.
Version 1.7.8, 28 Mar 2008
- Although it still looks the same, the subdivision preview was modified to eliminate unnecessary rebuilding of the data structures. Users who look at the source code will notice the appearance of the files
subdata.h, obvec.h, subdata.cpp, and obvec.cpp, which handle this now.
- You can now zoom to the selected portion of the mesh.
- Zoom-to-fit now zooms only to the visible portions of the mesh.
Version 1.7.7, 17 Mar 2008
- The hidden portions of the mesh are no longer displayed in subdivision preview.
- In addition to hiding the marked portions of the mesh, you can now hide the unmarked portions as well.
- The POV-Ray macro that was supposed to give all the faces a uniform winding was only pretending to work (in fact, it was messing up meshes that already had uniform windings). The new macro appears to work.
- When mesh objects were marked and hidden, they remained marked. This left them subject to any subsequent transform operation, which is probably unwanted behavior. Fixed.
- When creating a model from an existing
.obj file, the edges were not immediately built. This caused a crash if subdivision preview was turned on in this state. Fixed.
Version 1.7.6, 17 Mar 2008
- If two faces share one edge, they can be merged into one face by selecting an option from the context menu for that edge.
- There is now a feature to lock one or two coordinate axes so that vertices that are dragged move only in the free axes.
- Active options are now checked in the menus in addition to being in the pressed state in the toolbar.
Version 1.7.5, 9 Mar 2008
- After reparenting Bones, editing the properties of a Face, or subdividing any part of the mesh, the attachment of Vertices to Bones was forgotten. Fixed.
- After making a chain of Bones, the very last Bone could not be highlighted until one of the others was dragged or otherwise edited. Fixed.
- The
.inc files exported to POV-Ray invoked a macro from the previous version of the subdivision surface macros. Fixed.
- I changed the background color from black to middle gray, and changed the gridlines to match.
- In mesh adding mode, when the user includes an existing vertex in the circuit of edges, the view point shifts so that Vertices added after this point are at the same depth as the existing point.
- I have taken more steps along the path from C to C++, mainly in order to eliminate global variables and stuff like that. People who nose around in the sources will observe the appearance of
appdata.h and appdata.cpp, which declare and implement a class consisting of static variables to hold the data that applies to the entire application.
Version 1.7.4, 1 Mar 2008
- When you start the program without specifying an
.lsm file in the command line, a blank Model project will be created, just like version 1.6.x and earlier.
- The way I solved the
O(n^2) performance problem for large meshes caused the Face creation function to return NULL results to the extrusion function. The extrusion function didn't check the pointer before accessing its referent object, so there was a crash. Fixed.
Version 1.7.3, 29 Feb 2008
- Merging vertices often created an orphan edge that was not always deleted. Fixed.
- The vertex merge operation was allowing more than two faces to border on an edge. Fixed.
- When adding Bones to the model, if you add more than one Bone, each Bone is parented to the one created before it.
- The
.obj import feature was ignoring the .mtl file specified in the .obj file. Fixed.
- The
.obj import feature was treating blank lines as the end of .obj and .mtl files. Fixed.
- The
.obj export feature was not properly writing the filepath for .mtl files in the mtllib statement when the filepath for the .obj file contained more than one period in it. Fixed.
Version 1.7.2, 28 Feb 2008
- The Bone objects are drawn in a way that makes them more distinct (instead of tiny little diamond shapes, there are three polygons centered at the same point, and every dependent Bone has a line connecting it to its parent.
- Mesh objects (vertices, edges, and faces) can be hidden in order to see and access objects that are behind them.
Version 1.7.1, 27 Feb 2008
- There was an entry in the file menu which didn't do anything. This entry said Import..., but importing is actually implemented in the dialog box which comes up when a new project is created. So the separate menu function for importing was not needed. Removed.
- Bones can be pushed to the bottom of the Bone queue so that the user doesn't have to move a Bone in order to access another Bone located in the same place.
Version 1.7, 25 Feb 2008
- LionSnake now supports faces with more than four sides. The limit now is 32,767 sides per face. If you try to exceed that, I can't be held responsible.
- LionSnake can now import and export Alias/Wavefront
.obj and .mtl files. Presently edge sharpness is not saved in the files, but the face grouping assignment is. I was considering making this the primary file format, but it does not support all of the features that I wanted, so I stayed with my own format with the .lsm extension.
- A bug with the mouse mode was causing crashes after a certain number of undo and redo operations. Fixed.
- When a Bone with dependent Bones or Vertices is deleted, a confirmation dialog box now appears, and among other things lets you specify whether to make the dependent items non-dependent, make them dependent on the deleted Bone's parent (if any), or to cancel the deletion altogether.
- You can select all of a continuous section of mesh at once, by selecting that operation from the context menu for any vertex, edge, or face in the desired section.
- The display of the axes is now more consistent.
- The subdivision preview is no longer as smooth as it once was. I hope to get it back to something nice (and, hopefully, better) soon.
- The default color for faces is now a full white (
<255,255,255>), instead of the medium-light gray (<160,160,160>) used before. This was done because the default color for Alias/Wavefront objects is white.
- Performance is now vastly improved for large meshes. There was an O(N^2) situation that came up with file loading and mesh validation. This caused some meshes to take a long time (two minutes or more) to load from file or make any edit to the mesh topography. Fixed.
- Mesh selection is more consistent as well. You can select mesh portions by selecting vertices, edges, or faces.
- The POV-Ray macros have been replaced with a new set, based on the Catmull-Clark subdivision scheme. The names of the files have been changed (they start with
c2s3 instead of the former nsss) so that using the new macro suite won't overwrite older work.
- And nobody cares, but all of the C-style
malloc(), calloc(), and free() calls have been replaced with C++ equivalent (new and delete) statements.
- And some of you may care that the header files in the source code have been rearranged from their former evil state to something that is easier to follow; the crazy way of nesting them has been replaced with something more sensible.
- Furthermore, the sources have been re-arranged. With some exceptions, all of the member functions for the
Model class are now in files named model_*.cpp, where the * stands for the first letter of the function name. There are now more source files, but they are now mostly smaller, and it's easier to find a function in the source files.
- And to make things easier for any masochist who wants to port this to Mac or Linux (and to eliminate a global variable to track an end-of-file condition), I have encapsulated the code for reading and writing files into a set of file handling classes. I developed my own set of classes instead of using the standard library streaming operators, because at least on my compiler those things are bloated.
Version 1.6.9, 20 November 2007
- When texture mapping is removed from a face, the mapping points that are no longer in use were still being written to file instead of being quietly discarded. Fixed.
Version 1.6.8, 19 November 2007
- The uv mapping edit mode was not displaying the map edges correctly when the map points are not shared across the edge. Fixed.
- The dotted lines that form the uv mapping edges were not being drawn properly. This was purely cosmetic and most users probably didn't notice it. Fixed.
- The uv mapping data was not being read from saved files. Fixed.