Here is a repository of previously answered questions.
Question. What CMISS front end executable should I run?
Answer. If you are not at the Bioengineering Institute and
want to use CMISS for Academic Research then you can download CMISS.
If you are in the institute then you will may choose to use these same
download executables as they will not change on you.
Alternatively to take advantage of the latest features you may want to
run an up to date executable. For this purpose the cmgui executables in
${CMISS_ROOT}/bin/ are updated whenever they pass all the examples.
They are separated into architecture dependent directories. If you
follow the instructions in the /cm/wiki/CmNewUserNotes then you will be set up
to use these executables.
Linux ${CMISS_ROOT}/bin/i686-linux/cmgui
IRIX ${CMISS_ROOT}/bin/mips-irix/cmgui
AIX ${CMISS_ROOT}/bin/rs6000-aix/cmgui
Question. How do I add some User Interface components to my scripts?
Answer. Using Perl/GTK you can add User Interface components to
your Cmiss scripts. A module designed to work like the Gtk module is
kept in ${CMISS_ROOT}/cmiss_perl, CmGtk.pm
It allows you to write routines such as the following...
button.com
use CmGtk;
CmGtk->init();
{
my($window,$button);
#Unforunately the Cmiss interpreter will not let you lay out the following command on multiple lines.
$window = new Gtk::Widget("GtkWindow", type => -toplevel, title => "CmGtk Sample", allow_grow => 0, allow_shrink => 0, border_width => 10);
$create_window_button = new Gtk::Widget("Gtk::Button", label => "Create window", visible => 1);
$create_window_button->signal_connect( "clicked", \&gfx_create_window );
$destroy_window_button = new Gtk::Widget("Gtk::Button", label => "Destroy Window", visible => 1);
$destroy_window_button->signal_connect( "clicked", \&gfx_destroy_window, $create_window_button );
my $box = new Gtk::VBox();
$box->spacing( 15 );
$box->add( $create_window_button );
$box->add( $destroy_window_button );
$window->add( $box );
$window->border_width( 15 );
$window->show_all();
}
sub gfx_create_window {
my( $button ) = @_;
gfx cre win 1;
$button->set_sensitive(0);
}
sub gfx_destroy_window {
my( $button, $create_window_button ) = @_;
gfx des win 1;
$create_window_button->set_sensitive(1);
}
#Making the Destroy Button have sensible sensitivity is an exercise
#which I will leave to the student. :-)
CmGtk->main();
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! Note that both the rendering time and quality can be improved by using a computer with a decent graphics card.
gfx modify material muscle per_pixel_mode;
gfx modify light default point position 0 100 -100;
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.
Question. How come the gfx movie commands don't work on my machine?
Answer. The gfx movie commands provide an interface to an sgi movie library only available on IRIX 32bit. To make movies on Linux, AIX or 64 bit IRIX you should write a sequence of frames and compile them externally.
See the Linux movie making instructions for more information.
Question. Is there are windows version of cmiss and can I use it?
Answer. Yes there is a windows version. The windows version uses wx widgets to describe the interface and the majority of common user interface components have now been implemented. You can download the windows version from the cmiss release centre. (See the link at the bottom of the navigation bar on the elft.
To execute these executables you may need to put cmiss/lib into your path
or run from within that directory so that windows can find the dlls".
On windows 2000 the path is well hidden in
control_panel->system->advanced->system_variables.
Question. Can I make movies using Linux?
Answer. Yes.
You need to consider what codec you want to target. The old Cinepak
and Indeo codecs supported on the SGI machines are widely supported by
built in libraries on Windows, however the results are poor and the
file size large. Instead you may want to try mpeg2 (same as a DVD) or
DIVX derivatives. However, while windows media and quicktime players
will support these formats they are not included with the executable,
instead the player tries to find a codec when you first play the movie.
Also sometimes it helps to try different (incorrect) file extensions as
this seems to change the way the windows players determines what codecs
to try.
To make a MPEG2 movie on Linux using mjpegtools you need at least two
programs, jpeg2yuv and mpeg2enc. As the input must be jpegs (and in
cmgui you cannot change the jpeg quality on export yet) we generally
write sgi image files and then convert them to jpeg using a little
script, sgi2jpg.pl which uses convert from imagemagick.
The maximum dimensions that you can use are about 720x576 so you need to
be smaller than this. Then these are run through mjpegtools, something
like
jpeg2yuv -f 25 -I p -b 1 -j images/pressure_anti_%d.jpg | mpeg2enc -f 3 -b 3800 -a 1 -o test3.m2vTo make this work with Windows media player on windows 2000 we changed the file extension to .qt
For the DIVX type derivatives you need some other tools like transcode which supports a large number of file converters. With the divx4linux libraries and divx I can make an DIVX AVI using transcode. Firstly you need a file containing the list of frames.
find images/ ! -type d -name "*.jpg" > listTranscode cannot detect the size of your images, so if they are 640x640 then you need to specify this on a command like this...
transcode -i list -x imlist,null -g 640x640 -o pressure_anti.avi -y divx4 -w 1618
Question. I have used the transformation controls to shift my mesh but the nodes haven't actually moved, how do I update the nodes?
Answer. The transformation controls only shift the objects graphically. So I have added a quick hack that allows you to apply the same transform to the nodes. Unfortunately it will not work correctly if you have rotated derivatives. The command to apply the transformation you have made to element group "bob" is
gfx edit graphics name bob scene default apply_transformation
Question. How do I know what OpenGL implementation I am using? and how do I change it?
Answer. When you are running cmgui you can find out information on the OpenGL you are using from the command
gfx list window NAMEThis will list the OpenGL version, the vendor driver and some information about the visual.
To control what driver you are using you simply need to ensure that the
dynamic library you want is first in your library load path.
On linux this library is libGL.so. To see which library is currently
being loaded run
ldd cmguiin a shell. This lists all the dynamic libraries and where they are being resolved on your system. With the standard Mesa3D implemenentation supplied with XFree86 this will probably be in /usr/X11R6/lib, with the accelerated NVIDIA drivers this will be in /usr/lib.
To change the library you can set an environment variable.
On linux this is LD_LIBRARY_PATH. On bioeng systems you can use an up to
date Mesa3D build by setting
for csh type shells
setenv LD_LIBRARY_PATH /hpc/cmiss/mesa/lib/i686-linux/
or for bash type shells
export LD_LIBRARY_PATH=/hpc/cmiss/mesa/lib/i686-linux/
for csh type shells
setenv LD_LIBRARYN32_PATH /hpc/cmiss/mesa/lib/mips-n32-irix/
or for bash type shells
export LD_LIBRARYN32_PATH=/hpc/cmiss/mesa/lib/mips-n32-irix/
for csh type shellsThis Mesa3D implementation may be particularly useful from hpc1 when you are experiencing problems with your graphics.
setenv LIBPATH /hpc/cmiss/mesa/lib/rs6000-32-aix/
or for bash type shells
export LIBPATH=/hpc/cmiss/mesa/lib/rs6000-32-aix/
for csh type shells
setenv DYLD_LIBRARY_PATH /hpc/cmiss/mesa/lib/ppc-32-darwin/
or for bash type shells
export DYLD_LIBRARY_PATH=/hpc/cmiss/mesa/lib/ppc-32-darwin/
Question. My texture image has transparancy (an alpha channel), why is it opaque when viewed in cmgui?
Answer. Textures are applied in either decal or modulate mode.
When in decal mode,
the texture works like a sticker, and the alpha tells you how much to merge with the surface underneath.
When in modulate mode,
the texture adjusts the properties of the material and so changes the alpha of the underneath surface.