Here is a brief overview of the modifications:
Capability of writing out depth maps
Partial Cartoon rendering pipeline
extension to Vim3D's OBJ parser
now includes MTL file parsing
write and read MTL files
write and read OBJ files with mtl libraries and groups
per-polygon texture mapping
per-polygon group display lists
per-polygon textures and normals maps
ClothCloth was created using vertical, horizontal, diagonal and skip springs. Positions and velocities were found using 4th degree Runge-Kutta (RK4). Wind was added using a 3d perlin-noise function to animate the cloth.
Click on the video below to start the playback at frame 0. We have applied a random wind to give a better effect.
Polygon GroupsPolygon groups allow a user to have different material properties and texture maps for any set of faces on an object. To create polygon groups, the best way is to import a file from a 3D software that uses OBJS and groups. However, you can create groups with the command line in vim3D using the poly command:
poly group texture <begin> <end> <map>Where begin and end refer to the face indices, and map is a texture map. Here is an example file:
add cube poly centroid poly scale 2 ambient 1 1 1 1 poly meld compute smooth poly group texture 0 1 images/vim.ppm poly group texture 2 3 images/wood.ppm poly group texture 4 5 images/tex/window.ppm poly group texture 6 6 images/tex/wood.ppm load scene1
Integration of MTL and OBJ filesThe reason for polygon groups was to conform to the OBJ and MTL standards. Thus, our program can read and write material files in addition to obj files now.
Lets look at an example. The OBJ and MTL were generated with Vim3D. Here is the material:
newmtl first map_Ka images/tex/wood.ppm newmtl second map_Ka images/vim.ppm newmtl third map_Ka images/world.ppmHere is the output OBJ file:
# generated by vim3D (Dan Lynch and Barry Martin) mtllib materials/cube.mtl v -10.000000 -10.000000 -10.000000 ... ... ... vt 1.000000 0.000000 0.000000 g usemtl first f 1/1 2/2/1 3/3/2 4/4/3 f 5/5/4 6/6/5 7/7/6 8/8/7 g usemtl second f 1/9 2/10/1 5/11/4 6/12/5 f 7/13/6 8/14/7 3/15/2 4/16/3 g usemtl third f 1/17 6/18/5 7/19/6 4/20/3 f 2/21/1 5/22/4 8/23/7 3/24/2
We allow a user to export a depth map in addition to a raytraced image. This can be done using the render command, using 1 or 0 to turn this feature on or off.
render depthmap 1
Although this process is not entirely stream-lined within vim3D, it gives you a good head start. First kick of a render using the cartoon flag:
render cartoon 1Then make sure to enable depth map rendering:
render depthmap 1Then, outside of vim3D, perform an edge detection on the depth map, and screen overlay it with the cartoon render.
Batch RenderingWe now allow for users to specify frame ranges and control batch renders. This can all be done using the render command:
render frames 0 100 render raytrace 1You can either render the OpenGL display or a raytrace. Do render the OpenGL window, use:
render display 1or
render set 1