Perfly(3pf)

Perfly - IRIS Performer scene viewer

As shipped in IRIX 6.5. First release of IRIX 6.5.

NAME
     Perfly - IRIS Performer scene viewer

SYNOPSIS
     perfly [ options ] file ...

DESCRIPTION
     Perfly is one of the sample programs distributed with the IRIS Performer
     high-performance graphics library.  Perfly is a powerful way to see
     graphics data: it's very fast, reads many different graphics file
     formats, and has interesting options for examining geometric data.


   Take a Test Drive
     If you are new to IRIS Performer, the best way to start learning about it
     is to go for a test drive.  The Performer-based sample application perfly
     is installed in the /usr/sbin directory.  To start perfly, all that you
     need to do is type "perfly" followed by a list of files that you want to
     see. For example:

          perfly esprit.flt



     There are quite a few models in the /usr/share/Performer/data and
     /usr/share/data/models directories that you may wish to explore.  The
     formats supported by IRIS Performer are listed toward the end of this
     reference page.

     perfly will by default start up with a trackball motion model.  Type "man
     pfiXformer" for details on how to use the motion models:  drive, fly, and
     trackball.  Perfly is largely self-documenting. Run perfly with the
     command line option "-help" and a full list of features will be printed.
     Type "?" while running perfly to print a list of keyboard command
     sequences to the shell window.

     Perfly is used by many IRIS Performer demos to view large databases,
     including the standard IRIS Performer Town demo.  With the IRIS Performer
     2.1 release, the town is shipped in the new fast loading IRIS Performer
     binary format (pfb). You can run the town with
     /usr/share/Performer/data/town/RUNTOWN.sh.


   InfiniteReality Demos
     With perfly, you can see many of the new features offered with the
     InfiniteReality hardware.

          Dynamic Video Resolution (DVR):
               The Infinite Reality offers the ability to dynamically resize
               the output region of the framebuffer which can be used for load
               management.  On a per-frame basis, current load can be
               evaluated and the output drawing area reduced to reduce load.
               The video hardware will scale up the output drawing area to
               match the full targeted size, with bilinear interpolation.
               This operation can be controlled manually by the application or
               in an parameterized automatic mode.  Perfly can demonstrate
               these modes.

                   % perfly -V 1,640,408 # start up in manual DVR mode with initial size as 640x480
                                # up/down arrow keys will allow you to adjust output region size.
                   % perfly -V 2 # start up with automatic DVR


               Note that when DVR is enabled, the current output size of the
               video channel is displayed in the statistics status line (click
               the stats button in the GUI).  Additionally, there will be an M
               or A displayed with the size to indicate Manual or Automatic
               DVR.  For best results, AUTO DVR should be used in combination
               with the InfiniteReality graphics pipeline statistics.

          Graphics Pipeline Statistics:
               InfiniteReality offers graphics pipeline statistics for
               measuring load within the graphics pipeline.  These statistics
               are not yet on by default in IRIS Performer because only one
               application may successfully use them at a time in the initial
               IRIX 6.2 InfiniteReality release.  However, graphics pipeline
               statistics are both much more accurate than timing measurements
               made on the CPU and are also less invasive.  To turn these
               statistics on in perfly, click on the "Pipe" option in the
               statistics radio button in the GUI. The (GP=XXmsecs) in the
               status line indicates the graphics pipeline timing measurement.
               Other statistics modes (such as "Dft" for the full timing graph
               and "Gfx" for detailed drawing statistics" may than be selected
               and the pipeline statistics will stay enabled.  Selection of
               "Fill" statistics or turning the statistics off will disable
               the graphics pipeline statistics.  For more information, see
               the pfStats and pfFrameStats reference pages.

          Clip-Mapping for very large textures:
               IRIS Performer and InfiniteReality together provide Clip-
               mapping for automatic viewing and paging of very large
               textures. For a demo, run % perfly hl.ct.  The 'g' key toggles
               color-coded gridification of all clip textures in the scene.
               There is another program called clipfly that has many more clip
               texture related enhancements; see the clipfly man page for more
               information.



   Perfly command line options
     Perfly supports a plethora of command line options. These options and the
     arguments accepted by each, are listed here:

          -A <string>                   -welcome text
          -a <string>                   -overlay text
          -b r,g,b[,a]                  -Earth/Sky clear color
          -c <numChannels>              -Number of channels
          -C a,b,c,...                  -Pipes for channels (L-to-R)
          -d                            -Drive
          -D                            -Lock down draw process
          -e <h,p,r>                    -Initial view angles
          -E <string>                   -Earth sky mode
              tag      -> tag clear
              clear    -> regular clear
              sky      -> sky only
              skygrnd  -> sky and ground
              skyclear -> sky and clear
          -f                            -Fly
          -F <path>                     -Set file path
          -g <format>                   -GUI format
              0 -> GUI OFF
              1 -> GUI_VERTICAL
              2 -> GUI_HORIZONTAL
          -G                            -Use GANGDRAW with Multipipe
          -h                            -Print command list
          -i <count>                    -Set file loading repeat count
          -I <count>                    -Exit after printing stats for count frames
          -j <font_type>                -Set font type
              0 -> PFDOBJFNT_TEXTURED
              1 -> PFDOBJFNT_OUTLINED
              2 -> PFDOBJFNT_FILLED
              3 -> PFDOBJFNT_EXTRUDED
          -J <font_name>                -Set Font to Named Font
          -k r,g,b[,a]                  -Scribed-style draw color
          -K <count>                    -Combine billboards up to size count
          -l <style>                    -Set lighting enable
              0 -> lighting off
              1 -> lighting eye
              2 -> lighting sky
          -l <x,y,z,r,g,b>              -Add a light source to the scene
          -L                            -Free then Lock down processes (requires root ID)
          -m <mode>                     -Multiprocessing mode
             -1 -> PFMP_DEFAULT
              0 -> PFMP_APPCULLDRAW
              2 -> PFMP_APP_CULLDRAW
              4 -> PFMP_APPCULL_DRAW
              6 -> PFMP_APP_CULL_DRAW
          -M <mode>                     -Multipipe mode
              0 -> single pipe mode
              1 -> multipipe mode
              2 -> hyperpipe mode
          -n <notify>                   -Debug level
          -N                            -Assign non-degrading priorities to Performer processes
          -o <mode>,<value>             -Set builder mode (default value is OFF)
          -O <mode>,<value>             -Set builder mode (default value is ON)
                         See the pfdBldrMode reference page
                              for more information.
              0 -> PFDBLDR_MESH_ENABLE
              1 -> PFDBLDR_MESH_SHOW_TSTRIPS
              2 -> PFDBLDR_MESH_INDEXED
              3 -> PFDBLDR_MESH_MAX_TRIS
              4 -> PFDBLDR_MESH_RETESSELLATE
              5 -> PFDBLDR_MESH_LOCAL_LIGHTING
             10 -> PFDBLDR_AUTO_COLORS
                   0 -> PFDBLDR_COLORS_PRESERVE  + leave colors alone
                   1 -> PFDBLDR_COLORS_MISSING   - make missing colors
                   2 -> PFDBLDR_COLORS_GENERATE  - make all colors
                   3 -> PFDBLDR_COLORS_DISCARD   - toss existing colors
             11 -> PFDBLDR_AUTO_NORMALS
                   0 -> PFDBLDR_NORMALS_PRESERVE - leave normals alone
                   1 -> PFDBLDR_NORMALS_MISSING  + make missing normals
                   2 -> PFDBLDR_NORMALS_GENERATE - make all normals
                   3 -> PFDBLDR_NORMALS_DISCARD  - toss existing normals
             12 -> PFDBLDR_AUTO_TEXTURE
                   0 -> PFDBLDR_TEXTURE_PRESERVE + leave texture coord alone
                   1 -> PFDBLDR_TEXTURE_MISSING  - make missing texture coord
                   2 -> PFDBLDR_TEXTURE_GENERATE - make all texture coord
                   3 -> PFDBLDR_TEXTURE_DISCARD  - toss existing texture coord
             13 -> PFDBLDR_AUTO_ORIENT
                   0 -> PFDBLDR_ORIENT_PRESERVE  - leave normal and order alone
                   1 -> PFDBLDR_ORIENT_NORMALS   - make normal match vertex order
                   2 -> PFDBLDR_ORIENT_VERTICES  + make vertex order match normal
             15 -> PFDBLDR_AUTO_DISABLE_TCOORDS_BY_STATE
                   0 - dont remove tcoords if no texture specified
                   1 - remove tcoords if no texture specified
             16 -> PFDBLDR_AUTO_DISABLE_NCOORDS_BY_STATE
                   0 - dont remove ncoords if no material specified
                   1 - remove ncoords if no material specified
             17 -> PFDBLDR_AUTO_LIGHTING_STATE_BY_NCOORDS
                   0 - dont automatically set lighting enable based on presence of ncoords
                   1 - automatically set lighting enable based on presence of ncoords
             18 -> PFDBLDR_AUTO_LIGHTING_STATE_BY_MATERIALS
                   0 - dont automatically set lighting enable based on presence of material
                   1 - automatically set lighting enable based on presence of material
             19 -> PFDBLDR_AUTO_TEXTURE_STATE_BY_TEXTURES
                   0 - dont automatically set texture enable based on presence of tcoords
                   1 - automatically set texture enable based on presence of tcoords
             20 -> PFDBLDR_AUTO_TEXTURE_STATE_BY_TCOORDS
                   0 - dont automatically set texture enable based on presence of texture
                   1 - automatically set texture enable based on presence of texture
             30 -> PFDBLDR_BREAKUP
             31 -> PFDBLDR_BREAKUP_SIZE
             32 -> PFDBLDR_BREAKUP_BRANCH
             33 -> PFDBLDR_BREAKUP_STRIP_LENGTH
             34 -> PFDBLDR_SHARE_MASK
             35 -> PFDBLDR_ATTACH_NODE_NAMES
             36 -> PFDBLDR_DESTROY_DATA_UPON_BUILD
             37 -> PFDBLDR_PF12_STATE_COMPATIBLE
             38 -> PFDBLDR_BUILD_LIMIT  -maximum number of tris/strip
          -p <x,y,z>                    -Initial view position
          -P <phase>                    -Phase
              0 -> PFPHASE_FLOAT
              1 -> PFPHASE_LOCK
              2 -> PFPHASE_FREE_RUN
              3 -> PFPHASE_LIMIT
          -q <optimize>                 -Optimize Scene GStates into single Scene pfGeoState
          -Q <optimize>                 -Flatten tree and remove empty nodes
              0 -> Off
              1 -> On
          -r <frameRate>                -Target frame rate in Hertz
          -R <mode>                     -Retessellate input geometry
              0 -> Off
              1 -> On
          -s <LODscale>                 -Set LOD scale factor
          -S <mode>                     -Show triangle strips via color coding
              0 -> Off
              1 -> On
          -t <0xVisual_id>              -Specify GLX Visual ID has Hex Integer(OpenGL Only)
          -T <0/1>             -Indicated whether or GL display lists should be used.
                              On InfiniteReality GL display lists will be stored in the
                              grahpics pipeline for optimal performance.  This option
                              is ON by default.  See the pfGeoSet reference page for
                              more information.
          -u                            -Inflate input files
          -v <format>               -Convert data to use GL vertex arrays.
                              See the pfGeoSet reference page
                              for more information.
              0 -> Off
              1 -> PFGS_PA_C4UBN3ST2FV3F - all attrs packed in arrays
              2 -> PFGS_PA_C4UBN3ST2F - all attrs but verts packed in arrays
          -V <DVRmode>              - specify mode for dynamic reslotion
              <mode,xsize,ysize>         - Set DVR mode and initial size.
              modes:               See the pfPipeVideoChannel reference page
                              for more information.
              0 -> PFPVC_DVR_OFF
              1 -> PFPVC_DVR_MANUAL
              2 -> PFPVC_DVR_AUTOMATIC
          -w <file>.out                 -Write scene in ASCII
          -w <file.ext>                 -Write scene in .ext format
          -W <Size>                     -Window size
          -W <xSize,ySize>              -Window size
          -x                            -Toggle use of GLX with asynch X input handling
          -X <radius>                   -Explode input files
          -y ext,mode,value             -Set loader mode for file extension ext to value
          -Y ext,alias                  -Substitute file extension alias for file extension ext
          -z near,far                   -Set near/far clip ranges
          -Z                            -Don't initially free CPUs before lock

   Perfly keyboard options
     Perfly supports several keyboard options. These are functions that can be
     invoked during simulation by typing the indicated key while the cursor is
     in the perfly window.


           Key     Function
          -----    --------------
           ESC     Exit program
            ?      Print help
          SPACE    Stop moving
          F1KEY    Toggle graphical user interface (GUI)
            b      Toggle backface mode
            c      Toggle collision detection
            C      Change culling mode
            f      Decrease the target frame rate
            F      Increase the target frame rate
            g      Toggle stats and stats graph
            G      Print stats graph contents to stderr
            k      Cycle through DVR modes (off,manual,auto)
            l      Cycle through lighting modes (off, eye, sun)
            p      Change frame phase
            r      Reset positions
            s      Toggle diagnostics display
            S      Print stats graph contents to stderr
            t      Toggle texturing on/off
            w      Toggle draw mode between solid/wire
            W      Cycle draw mode between all styles
            x      Snapshot RGB screen image to file
            X      Snapshot RGBA screen image to file
            z      Show culling frustum









   Supported Database Formats
     Perfly, like all IRIS Performer applications, is able to directly load 3D
     data in a large selection of popular formats and draw that data at high
     speed.  All of the following file formats are understood by Perfly:


          3ds       AutoDesk 3DStudio binary data
          bin       Minor SGI format used by powerflip
          bpoly     Side Effects Software PRISMS binary
          byu       Brigham Young University CAD/FEA data

          dwb       Coryphaeus Software Designer's Workbench
          dxf       AutoDesk AutoCAD ASCII format
          flt11     MultiGen public domain Flight v11 format
          flt14     MultiGen OpenFlight v14 format
          gds       McDonnell-Douglas GDS things data
          gfo       Minor SGI format (radiosity output)
          im        Minor SGI format (IRIS Performer example)
          irtp      AAI/Graphicon Interactive Real-Time PHIGS
          iv        SGI OpenInventor / Silicon Studio Keystone
          lsa       Lightscape Technologies radiosity (ASCII)
          lsb       Lightscape Technologies radiosity (binary)
          m         University of Washington mesh data
          medit     Medit Productions medit modeling tool
          nff       Eric Haines' ray tracing test data format
          obj       Wavefront Technologies data format
          phd       Minor SGI format (polyhedra)
          pfa       IRIS Performer ASCII database format
          pfb       IRIS Performer fast loading BINARY database format (see
                    the /usr/share/Performer/src/lib/libpfdb/libpfpfb/README
                    for more information)
          poly      Side Effects Software PRISMS ASCII data
          pts       University of Washington point data
          ptu       Minor SGI format (IRIS Performer example)
          sgf       US NAVY standard graphics format
          sgo       Minor SGI format
          spf       US NAVY simple polygon format
          sponge    Sierpinski sponge 3D fractal generator
          star      Yale University compact star chart data
          stla      3D Structures Stereolithography (ASCII)
          stlb      3D Structures Stereolithography (binary)
          sv        Format of John Kichury's i3dm modeler
          tri       University of Minnesota Geometry Center data
          unc       University of North Carolina data

     While most loaders do in fact "load" data from files, scene graphs can
     also be generated procedurally.  The sponge loader is an example of such
     automatic generation; it builds a model of the Menger (Sierpinski)
     sponge, without requiring an input file.  To see the sponge run perfly
     specify the number of recursions (0, 1, 2, ...) as the filename.  For
     example

          perfly 2.sponge




NOTES
     When using DVR, perfly should always be run in full screen mode (do not
     use the -W option).  Also, when DVR and the graphical user-interface are
     both enabled, the GUI must be redrawn whenever there is a video channel
     resize, or whenever the mouse is in the GUI. This is very expensive and a
     drop in framerate will be incurred.
     Only one application at a time may be using DVR.  If a second application
     starts up and attempts to use DVR while the first is still executing, the
     second may terminate.  See the pfPipeVideoChannel reference page for more
     information.

     Only one copy of perfly should be runing with graphics pipeline
     statistics ("Pipe") selected at a time.  If multiple copies of perfly are
     running, de-select pipe stats in one before turning it on in another.



   Learning More
     Once you've seen IRIS Performer in action, you will want to learn more
     about it.  The IRIS Performer Programming Guide and the IRIS Performer
     Release Notes are the primary sources of information, but the a number of
     information sources are available to give you a good start in your
     learning process. The origin of this quest is the Performer man page.
     Just type "man performer" and just about everything you might want to
     know will be there or in one of the on-line resources listed there.


SEE ALSO
     performer, clipfly, pfconv