GLRex allows a maximum of 70 objects in a scene and 80 control points in an outline for a NURBS surface.
GLRex will autosave
your session every time you create an object. The session is saved as backup.ses.
There are 2
GLRex windows - the main Display window and a Curve
drawing window for creating NURB extrusions and surfaces of revolution.
Display Window
The viewer is always looking at the origin of the world coordinate system. The world coordinate axes are the x-axis (red), y-axis (green), and z-axis (blue). The eye position is controlled by six keys. Conceptually the viewer is on the surface of a sphere and can change latitude and longitude and distance from the origin. The keys controlling the eye position are:
|
<- and -> |
left arrow, right arrow control longitude |
|
/|\ and \l/ |
up arrow, down arrow control latitude |
|
. and / |
Period and slash control distance from the origin |
The
display window has subwindows in each of its corners:
|
Subwindow |
Main Use |
|
Upper Left (UL) |
Object and light properties |
|
Lower Left (LL) |
Palette |
|
Upper Right ( |
Light Controls |
|
Lower Right (LR) |
Object list |
GLRex
has two pull-down menus located at the top middle of the display window,
labeled “misc” and “I/O menu”.
The miscellaneous menu has
the following options:
|
Option |
Use |
|
Show/hide light sources |
Toggle visibility of light sources locations |
|
Delete all objects |
Delete all objects from the scene |
|
View current cluster |
Only objects in the current cluster are visible |
|
Copy color properties |
Copy color and shine of the current object to the clipboard |
|
Paste color properties |
Paste color and shine on the clipboard onto the current object |
|
Copy silhouette |
Copy silhouette associated with current object onto clipboard – only applies to NURB surfaces |
|
Paste silhouette |
Paste silhouette on clipboard onto current object |
The Input/Output menu has
the following options:
|
Option |
Use |
|
Reset home dir |
|
|
Load session |
Load a .ses file. Resume saved session |
|
Save session |
Save current session to .ses file |
|
Save to rib |
Export the current scene as a RIB file |
|
Save to gl |
Export the current scene as an OpenGL based .c file |
|
Load code segment file |
Load a .rcf file. |
Left-clicking
on an I/O menu option opens the appropriate I/O dialog box.
GLRex imports two file types:
|
.ses |
text
files for saving and reloading work sessions |
|
.rcf |
RenderMan RIB
code to be spliced into exported .rib files |
GLRex exports two file types in addition to .ses
files:
|
.rib |
RenderMan Interface Binary files, which can be rendered by a RenderMan compliant renderer. |
|
.c |
C programs code which will recreate the current scene using OpenGL and the windows API glut. |
Left mouse clicks in the middle of the Display Window will move the current object (or cluster if in cluster mode) to a location above the point clicked on in the grid. Right mouse clicks in the middle of the Display Window will toggle the visibility of the corner windows. This is useful if you want to screen captures the window.
The current object is chosen by clicking on an object's name in the LR window
Clicking on box, sphere, cylinder, revolution, extrusion, cone will create a new object of that type. Surfaces of revolution and extrusions are created as NURB
surfaces and their outline must be drawn in the Curve Window. (See curve window).
If you click on ext you will be given a choice
between unit and separates. “Unit” is an
extrusion with the side surface created by the extrusion and front and back
caps treated as one object. Caps and sides will always have the same color.
Choosing “separates” will create 3 separate objects - the side surface created by
the extrusion (which appears in the object list in the LR window as openext), and the front and back caps (which
appear in the LL window list as two caps).
To create an open extrusion
alone, i.e. just the extruded side , without caps,
choose separates and then delete the front and back
caps. To create a cap (without sides) again choose
“separates” and delete the openext and one of the caps.
When a new object is created, it becomes the current object, and is initialized with the position, scale, and rotation of the previous current object. If the current object is a sphere and you create another sphere, the new object will not appear immediately since it will coincide with the previous sphere. You will see it if you move it from its initial position.
An object's properties can be changed by clicking the mouse on the appropriate property display:
|
mouse click |
action |
|
left |
decrements |
|
right |
increments |
The change per click can be toggled between 1 unit and 10 units by clicking on the string “inc/dec" or “inc/dec*10” near the bottom of the UL window.
There are two coordinate systems to keep in mind when using the Display Window - the world coordinate system and the object’s coordinate system. (The visibility of these axes is controlled from the UR window. Remember the x-axis is always red, the y-axis is always green, and the z-axis is blue.)
Position is always relative to the world
coordinate system.
Rotation is always relative to a hybrid coordinate system.
See "UR
Window" below.
Scale is always relative to the object
coordinate system.
Notice that for both scale and color there is an "all" option. Clicking on "a" will increment or decrement the other three quantities on the line simultaneously. Clicking "r" will reset Pos, Rot, Scale, or Color to their initial values.
Colors are represented using their red, green, blue components (RGB color system). The scale used is 0 - 255.
Finally, at the bottom of the
UL window, clicking on "wire" or "solid" will toggle between displaying the whole scene as wireframe or as solid objects. If you have several NURB
surfaces in your scene, changing eye position may be a little sluggish.
Switching from "solid" to "wire" will speed things up.
LL Window

The
color of both lights and objects can be determined in this window by left
clicking in the color hexagon. (See more on lights in UR window.) The white dot
in the color hexagon indicates the current color. (The RGB values of the
current color will appear in the UL window.) The shine of the object is
controlled by the shine scroll bar. The intensity of a color is controlled by
the intensity scroll bar. If the current color refers to a light source,
changing the shine will have no effect. (When the current color refers to a
light source the demo sphere between the scroll bars will appear flat.)

The current light can be selected by left clicking on the
light's name. The current light's name will appear white. You can change the
color of the current light just as you would the current object, either in the
palette window or in the
positional light - like a light bulb. All light rays eminate from the position of the light source.
directional light - like the sun. All light rays are parallel to one
another and have the same direction as the vector from the position of the
light source to the origin.
Lights can be changed between positional to directional by left clicking on "P" and "D" by the name of the light.
Lights can be turned on and off by left clicking on "on" and "off" by the name of the light. If light sources are visible and if you left click on the current light, the light and the sphere that indicates its location will toggle color to aid in identification.
You can make the light sources visible using the “misc” menu. The lights will appear as spheres with the same color and position as the corresponding light.
Extrusions and surfaces of revolution are implemented as NURB surfaces. The number of facets used to create the surfaces can be controlled by clicking on one of lw, med, hi, vh. The default is med. The surfaces look better with higher resolution but this also slows down GLRex. If this isn't a problem on your machine I would suggest using at least hi.
The next line in the window, contains controls for RIB code lists. “show/hide” controls the visibility of the current
RIB code list. When visible this list appears on the left hand side of the
Display Window. “reset” sets the code list back to the default
empty list and removes all bindings of RIB code to objects.
There are four buttons at
the bottom of the window:
|
w-axes |
toggles
visibility of world coordinate system axes |
|
o-axes |
toggle
visibility of the current objects coordinate axes |
|
grid |
toggles
visibility of rectangular grid of lines in the Display window |
|
backup |
saves the current
session to the file backup.ses, in same
directory as the GLRex executable. |
If you have made the current
object’s coordinate axes visible you will see one of two axis systems, depending
on whether you are positioning, scaling or rotating the object. In the case of
positioning or scaling the object, the standard object coordinate axes will
appear. These axes are colored red, green, blue, and are mutually
perpendicular. The colors coordinate with actions taken in the UL window. For
example if you click on the red component of scale in the UL window, the scale
of the object will change in the direction of its object coordinate system red
axis.
If you are rotating the object an alternate set of axes will appear colored orange, cyan, and blue. This set of axes is not the same as the previous set but somewhat related. The blue axis is the same in both. Changing the x-rotation angle will rotate the object around the orange axis. Changing the y-rotation angle will rotate the object around the cyan axis. Changing the z-rotation axis will rotate the object around the blue axis. Note that the orange, cyan, blue axes are not perpendicular. (Going into what these axes mean is beyond the scope of the documentation. It is related mathematically to the fact that rotation matrixes do not commute.)
GLRex does not support hierarchical modeling
at this time. It does however allow the user to create temporary clusters of
objects. Only one cluster can exist at a time. As a group a cluster can be
copied and deleted. This will only be allowed if the current object is part of
the current cluster.
Objects can be added/removed
from a cluster by left clicking on the object’s number in the LR object
list. Red numerals in front of an object indicate that the object is in the
current cluster, white that it is not in the cluster. In cluster mode the names
of all objects in the cluster will be highlighted in green, except for the
current object which is always highlighted in blue or red. F11will remove all objects from the cluster, F12 will place all objects in the scene into the cluster.
A cluster can also be translated, rotated, and scaled in the same way that objects are - clicking on the appropriate locations in the UL window or using the F1-F4 keys. In all cases the current object must be in the cluster. In the case of rotation every object is rotated are it's own origin. GLRex does not support cluster origins at this time. Objects in a cluster will only be scaled if they initially have the same x, y, z scale values as the current object. The material properties of a cluster can also be scaled in the same way they would for a single object. Changes in color will only be applied to only those objects in the cluster that have the same color as the current object.
The LR window lists of all
objects in a scene from 0 to 69. The current object is originally highlighted
in blue. To select the current object, left click on the name of the object in
the list. If you repeatedly click on the same object, the color of the object
will toggle in the display window to help locate the object. The highlight of
the object will also toggle from blue to red.
When an object is created,
the geometrical name that describes the object appears in the object list. To
give the object a different name, simply type the new name. The only keys you
can use are "backspace" which moves the cursor back one space,
alphanumeric keys,
"-" and "_". Backspace erases the last
character in the current objects name.
Name changing can be done in
cluster mode as well. All character changes will be applied to all objects in
the cluster. As an example suppose you have created a
left leg composed of a thigh and a calf and have labeled them as
"calf-l" and "thigh-l". If you copy them in cluster mode to
create another calf and thigh, the new calf and thigh will still be labeled
"calf-l" and "thigh-l". But by simply hitting backspace
then typing “r” you have changed both to "calf-r" and
"thigh-r".
To scroll through the list use the PageUp and PageDown keys.
I/O Dialog
Box
The top line in the I/O dialog box describes what action is being
taken, e.g. “load ses file”. The next
line gives the current directory – the directory whose contents are being
displayed in the list below. Immediately under that is the “file” field.
This field can be changed either by clicking on a file name in the list of
files below, or directly from the keyboard. When an
I/O dialog box is visible any keystrokes appear in this field. As with names in
the object list the only
keys you can use are "backspace" which moves the cursor back one
space, alphanumeric keys,
"-" and "_". Backspace erases the last
character in the current file’s name. Double clicking on the file field will cause the desired action of the dialog box to using the file
currently in this field.
Below the file field are three buttons:
|
Button |
Use |
|
UpDir |
Moves
current directory up one level to parent
directory |
|
Close |
Closes
dialog box |
|
Home |
Home
directory becomes current directory |
Below these buttons is the list of the contents of the current directory. Subdirectories are listed first (in black) and then files (in white). To scroll through the list use the PageUp and PageDown keys.
Click once on a file and the
file name will appear in the file field of the dialogue box. Double click on a file name and the
action requested by the dialogue box will be performed using that file. Double
click on a directory name, and that directory will become the current
directory.
Curve Window
The Curve window represents a 2 dimensional surface for drawing outlines of extrusions and surfaces of revolution. The default origin is the bottom left hand corner of the window. This is a good position for surfaces of revolution but you will probably want to move it for extrusions. The origin can be changed using the orgn option (see below). Curves should in general be drawn in a counterclockwise direction. For surfaces of revolution the outline you draw will be revolved around the y-axis to create the object. So in a sense you are drawing half an outline. GLRex allows a maximum of 80 points in an outline.
Left mouse clicks create control points in Add mode and reposition the current point in Edit mode. Right mouse clicks select control points.
The current point is
indicated with a blue square. All other control points are indicated with black
squares. There are 2 curves displayed - the control curve in black (used for
creating the wireframe representation of the surface)
and the NURB curve in red (used for creating the NURB surface). Notice that the
red curve in general does not go through the control points except for the
first and the last. If you want a quadratic NURB curve to go through a point,
click twice on that point, creating two control points at the same location.
For cubic NURBS click three times.
If you want an extruded
surface with a top and bottom, the curve has been drawn in a counter-clockwise
direction and the first and last control points must coincide. (If you are drawing
a periodic NURB the first and last points will automatically coincide.)
At the top of the window is a toolbar with these options:
|
edit |
Left click here to go between Add mode and Edit mode. Red indicates Add mode, yellow indicates Edit mode |
|
ins |
Inserts a new contol point midway between the current point and the succeeding point. |
|
|
Deletes the current control point. |
|
orgn |
Mouse click will reposition the windows origin and x and y-axis. This is active when highlighted in green and inactive when highlighted in red. |
|
quad/cube |
Draw quadratic or cubic NURB. |
|
open/peri |
Draw open or periodic NURB. |