Vision and Mobile Robotics Laboratory | Software
|
|
Home | Members | Projects | Publications | Software | Videos | Internal |
A replacement for the ivview Inventor file viewing program that comes with the Inventor toolkit. Viewer has a number of features not available in ivview, which are designed to improve the visualization of meshes:
Viewer accepts the following commands from the keyboard (note: the commands only work if the cursor is set to the arrow cursor and is placed inside the viewing window).
Viewer.c command line interface
mtViewer.c the mtViewer class, which is derived from the Inventor ExaminerViewer class
Usage: Viewer - View an inventor file
%S wrl file [required]
-view %f %f %f %f %f %f %f
set initial view (x y z q0 q1 q2 q3)
-save %S save resulting wrlFile
-noWhite supress white background replacement
-rgb %f %f %f replacement color for white objects (when bg is white) [0.50 0.70 0.50]
-smooth extra smooth shading
-antialias [%d] use antialiasing with N passes [5]
-transparency enable high quality transparency
-grid [%f] apply grid of size N to surface [1000.000000]
-contour [%F %F] use color elevation contours with optional min and max range
-up %f %f %f direction of up for elevation contours(up direction is 0.00 0.00 1.00]
%S wrl file [required]
Inventor file to view.
-view %f %f %f %f %f %f %f
set initial view (x y z q0 q1 q2 q3)
Sets the initial view for the camera. The parameters for a partcular view can be determined using the keyboard command described above.
-save %S save resulting wrlFile
Saves the displayed scene as a wrl file. This can be used to record a mesh with grid or contour lines.
-noWhite supress white background replacement
If this option is set, the background will revert to black, and the color of white objects will not be changed.
-smooth extra smooth shading
Enables smooth shading
-antialias [%d] use antialiasing with N passes [5]
Inventor performs antialiasing by repeatedly rendering the scene with small offsets in camera direction, so using 5 passes take 5 times longer to display than with no antialiasing. Unfortunately, this also affects the speed of displaying while the scene is being moved, which makes it difficult to set up the camera position interactively when antialiasing is enabled (use the -view parameter instead).
-transparency enable high quality transparency
This is useful for visualizing overlapping surfaces
-grid [%f] apply grid of size N to surface [1000.000000]
A square grid with sides of the given size (in sensor units) is projected orthogonally onto the scene.
-contour [%F %F] use color elevation contours with optional min and max range
If this option is set, the mesh will be colored based on elevation. The hue of a vertex is set based on the projection of the vertex onto the axis formed by the up vector (see below). The hue is linearly interpolated along the up vector between the given min and max coordinate values.
-up %f %f %f direction of up for elevation contours(up direction is 0.00 0.00 1.00]
Sets the direction of the up axis for contour shading. By default this is +z, which is correct for most elevation maps.
Simple case, just view a mesh:
Viewer mesh1.wrl
Complex case, view a mesh with a grid (using default 1000 unit squares), color contour (elevations between 0 and 5000 will have color variation), and antialiasing (10 passes):
Viewer elev_map.wrl -grid -contour 0 5000 -antialias 10