Skip to content

generalities

Bruno Levy edited this page Jul 10, 2022 · 10 revisions

Generalities on Graphite

Graphic user interface

The graphic user interface of Graphite has the following elements:

  • 1: 3D display area. Use left mouse button to pan, wheel to zoom and right mouse button to rotate;
  • 2: Object list. Each object can be made visible or not (checkbox). Double-clicking on an object makes it the only visible object. The Home button restores the default view. Right-clicking on an object displays a context menu.
  • 3: Modules. Used to show/hide some elements of the graphic user interface. Some modules have a context menu (right click).
  • 4: Properties. Visual properties of the selected objec (highlighted in the object list).
  • 5: Toolbox. Tools to interactively edit individual mesh elements.
  • 6: Menu. Commands are applied to the current object (highlited in the object list).
  • 7: Camera. Select camera pane here, and change camera settings (full-screen effect and clipping).
  • 8: Terminal. Displays output of commands. One can also type and run LUA commands. There is automatic completion with the TAB key.

File menu

Supported file formats

extension description
.xyz ASCII pointset
.pdb Protein Data Base pointset
.ply pointset and surface mesh, ASCII and binary
.stl triangulated mesh, ASCII and binary
.mesh Gamma mesh format ASCII
.meshb Gamma mesh format binary
.obj Alias-Wavefront surface mesh
.off Object file format
.tet Volume mesh format
.ovm Open Volume Mesh format
.msh GMSH format
.geogram geogram mesh format
.graphite graphite scene (multiple objects and their graphic properties)

Graphite supports multiple file formats. It has two native file formats, .geogram and .graphite.

  • .geogram is the native file format of the underlying geogram programming library. It is used to store a single mesh, with its attributes (values attached to vertices, facets etc..).
  • .graphite files can store multiple objects of different types. They also store the application's state (camera settings and graphic properties of all objects).

The File... menu has the folowing commands

  • Load...: load an object, a scene or camera settings.
  • Save current object as...: the current object is the one that is highlighted in the object list.
  • Save scene as...: saves all the objects and their graphic attributes to a .graphite file.
  • Save view as...: saves the camera setting to a graphite file. This is useful for instance when creating figures for a research article, to make sure you have the same camera settings for showing different objects. The saved view can be restored by invoking Load....

Preferences

Preferences are saved to the graphite.ini file in user's home directory whenever the Save config button is pressed. The graphite.ini file also stores the current layout of the user interface. One can change it by dragging and docking dialogs around.

  • Appearance and rendering

    • Style: one of Light,Dark,CorporateGrey

    • One can customize the layout of Graphite, by dragging and docking dialogs. Then push Save config to make changes permanent (they are stored in graphite.ini.

    • The Restore default layout resets the user interface in its default state

  • Plugins: list of plugins to be loaded on startup.

  • Startup: list of LUA scripts to be run on startup.

  • Logger: select logging messages to be displayed (or * for everything) and logging messages to be excluded.

  • FnKeys: LUA scripts to be run when a key is pressed.

  • Advanced

    • Keyboard navigation: navigate between text fields using TAB
    • Dockable dialogs: dialogs can be dragged outside of Graphite window (experimental).
    • Floating point exception and OpenGL exceptions: useful for debugging.
    • Multithreading and max number of threads
    • GLUP profile: one of auto, GLUPES2, GLUP150, GPUP440. Corresponds to the set of OpenGL shaders used under the hood. auto selects the highest profile supported by the GPU. Select lower profile if problems are encountered (some OpenGL drivers are buggy).

Scene menu

  • The show all, hide all and delete all entries are obvious.
  • The create object has a type argument that deserves some explanations: Graphite supports objects of multiple types, and is extendable through plugins. Built-in types include:
    • OGF::MeshGrob for pointsets, surfacic, tetrahedral or hybrid volumetric meshes. It is what most users use all the time;
    • OGF::VoxelGrob for 2D or 3D grids of pixels/voxels;
    • OGF::LuaGrob for objects that execute a chunk of LUA script. More on this in the (upcoming) Graphite scripting tutorial.

The scene menu can also be invoked from a right click on the Scene module.

Modules

The Modules pane lets you select which modules you want to display. You can make the changes persistent by pushing the Save config. button of the Preferences window. Some modules have a context menu that you can invoke by right-clicking on them.

Camera

  • auto focus if set, then the Home button focuses on the selected object (instead of the whole scene).
  • draw selected only shows only the current object
  • background colors can be changed
  • effect: one of Plain (no effect), SSAO (screen space ambient occlusion, generates nice shadows) and UnsharpMasking (cartoon rendering). A default effect can be selected in the Preferences.
  • clipping: as shown on the small video, one can chose different clipping modes (default OpenGL, whole cells, draw only straddling cells, or slice cells). The clipping state is saved in .graphite files.

The camera module has a context menu (right click) with the same options, and with:

  • File/load...: restore a viewpoint from a .graphite camera file;
  • Save snapshot as...: save an image of the rendering area (this does not include the elements of the graphic interface);
  • Save view as...: saves the camera viewpoint to a .graphite file.

Properties

Each object has a set of graphic properties that indicate how it should be displayed. These properties can be changed either in the properties module (top right in the window by default) or by invoking the context menu in the object list.

The Apply to all button copies the properties of the current object to all the objects of the same type.

Meshes can have attributes attached to their vertices, edges, facets or cells. These attributes can be displayed by setting painting to ATTRIBUTE and selecting the attribute to be displayed in the pulldown menu. The minimum and maximum value mapped to the colormap can be selected. Push the autorange button to select them automatically.

Statistics

The Statistics module displays an histogram of an attribute, and lets you select a range to be displayed.

Toolbox

  • Camera pan tool (hand): left button pans, right button rotates, wheel zooms.
  • Object selection tool (arrow): select objects by left-clicking on them.
  • Light tool: change light direction. Light direction is saved in .graphite files.
  • the other tools are for local mesh editing.

Programs

Graphite includes a LUA interpreter. LUA scripts can do everything that the user does in Graphite (in fact, the user interface of Graphite is entirely implemented in LUA, take a look in the LUA files in the lib subdirectory if you are curious). The Programs module is a small editor that can be used to develop LUA or Python scripts for Graphite. It has automatic completion (using the TAB key) and programmer's help (hover the cursor on an object's name to see what the object can do). See the (upcoming) Graphite scripting tutorial for more details.

Clone this wiki locally