Cmiss front end FAQ

Here is a repository of previously answered questions.

High quality printing.

Question. How do I get high quality output from Cmiss.

Answer. There are a number of things you can do to improve image quality from the gfx print command. Most of them make rendering slower, but hey, this is *final* output!

  1. Turn on antialiasing (much slower)
    This sets the number of times the image is oversampled to improve line/edge rendition. Valid values are 2, 4 and 8, with 8 the best and slowest:
    gfx modify window 1 set antialias 8
    (To turn it off use gfx modify window 1 set on_antialias.)
    Antialiasing helps your images more scalable since colour changes are made gradual. Say goodbye to jaggies (jagged lines and polygon edges).
  2. Bring lines in front of surfaces
    If your image consists of coloured surfaces with lines drawn to mark out element boundaries you will notice that the lines become randomly dashed as the lines and surfaces struggle to be "in front". To ensure the lines are clearly visible,
    gfx modify window 1 set perturb_lines
    NOTE: if you don't need this on the LEAVE IT OFF as it causes other negative artifacts between adjacent surfaces.
    (Turn it off with gfx modify window 1 set normal_lines)
  3. Use a nicer or larger graphics font
    If you are making large images with text in them you should probably use a larger, nicer graphics font. In your Cmgui defaults file add a line:
    cmgui.*.graphicsFont: -adobe-times-medium-r-normal--24-*
    (This gives you a 24pt Times font; UNIX command 'xlsfonts' lists all the available fonts: there are a lot!)
  4. Make lines thicker
    Up to you. 1 Pixel lines on a large image may look a bit spindly. Enter:
    gfx set line_width 2
    This doubles their width. You'll have to drag in the graphics window to see the result.
  5. Use the best quality glyphs (slower)
    Choose sphere_hires over sphere, cylinder hires over cylinder12 etc. That's if you are using them.
  6. Print larger (much slower)
    On an O2 you can render offscreen at up to 2048x2048 resolution. The following command will print at this resolution (if you omit the width/height, it uses the window dimensions).
    gfx print window 1 width 2048 height 2048 rgb file cmgui_image.rgb
    I recommend rgb files on sgi systems... there seem to be glitches in some of the tif images cmgui produces.

    If you want to print larger than this you will need a larger display. To do this you can run Xvfb in memory, emulating a display of arbitrary size. Xvfb is available with most linux distributions and I have managed to compile aversion for IRIX. This also means that you can run cmgui as a batch process on machines without normal graphics.
    Run Xvfb to create a display as large as you want,
    Xvfb :4 -screen 0 4096x4096x24 &
    where :4 specifies the number of the display which must be unique amongst all the users of the computer and the -screen parameters specify that screen 0 is 4096 pixels wide by 4096 pixels high by 24 depth planes. These depth planes apply just to X and so 24 is 8bits for red, green and blue. The depth buffer and alpha channel are extra to this. You will need to leave this running in the background while you use it as your display but remember to destroy it later, these displays can use a lot of resident memory even when not being used.
    Set display to your newly running display, everything you do with X windows from now on will be displayed on this invisible display, in csh and tcsh, and assuming you just made display 4,
    setenv DISPLAY :4.0.
    Now you can run cmgui and print a window as nearly as big as your screen. You will want to have your comfile all set up as you can't use any of the graphical tools, these will all just appear on your invisible display. When you run cmgui you may want to add the -batch command line parameter, this means that the output that would have gone to the invisible command window actually comes to the still visible shell, it also quits as soon as the command line comfile is completed. If you are creating a very large image, greater than about 4096x4096, a 32bit cmgui may be insufficient, on the sgi you can get a 64bit version cmgui64.
    Finally, you may need to override your OpenGL implementation. If you are using an executable that normally expects GLX to be part of the X Display then it will fail when you try to run. (with errors such as "Missing GLX server extension"). To fix this you can use the MesaGL libraries instead, to override the OpenGL you use at run time in IRIX set your LD_LIBRARY_PATH environment variable to point to a directory where you have Mesa3D libraries. Additionally Mesa3D has a hardcoded maximum viewport/image size (Version 3.4 had 2048x1024), if you compile one yourself you will have to ensure that this is changed to be as large as you require. These are the lines from config.h in version 3.4
    /* Maximum viewport/image size: */
    #define MAX_WIDTH 2048
    #define MAX_HEIGHT 1024
    setenv LD_LIBRARY_PATH /usr/local/Mesa-3.4/lib32/
    I compiled these libraries with a maximum width and height of 10240

  7. Wait
    It could take a minute or more depending on the image you are rendering... work out how long it takes to render the window at a certain size with antialiasing on, and scale it by the size you give in step 6.
    You should be pleased with the result!
    You may wish to use imgworks or gimp to save in another format from SGI-only RGB, eg. compressed TIF (not lossy), GIF (lossy but good for line/cartoon images with limited numbers of colours) or JPEG (lossy but good for photos and images with smooth colour changes) depending on the file size you want to keep. Note jpg files can be saved at various quality levels.

Quick transform key.

Question. Is there a quick key from getting from node or data select mode to transform mode?

Answer. Yes. The control key toggles you quickly into transform mode.

Last modified: Thu May 25 10:10:17 NZT 2000