ArtiSynth User Interface Guide

11 Settings and Preferences

A variety of settings are available to adjust attributes related to the viewer, mouse bindings, and model interaction and simulation. Many of these settings can also be saved as preferences (Section 11.2) to provide initial values when ArtiSynth is started up.

11.1 Settings

Settings for the viewer and mouse are discussed in Sections 3.9 and 3.10. Settings related to model interaction and simulation as discussed in the sections below.

11.1.1 Interaction

Figure 40: Interaction settings dialog.

Interaction settings involve attributes related to the graphical interface and model interaction. They can be adjusted by selecting “Interaction ...” from the Settings menu, which opens an interaction settings dialog (Figure 40). Clicking the Save button will save the current settings to the user’s preferences (Section 11.2) so that they will be set automatically when ArtiSynth is restarted. Interaction settings include:

articulatedTransforms

If true, attempts to preserve joint constraints when rigid bodies are moved using the manipulator controls (Section 5.2). The default value is false.

frameRate

Controls the rate, in frames per second, at which the viewer renders the simulation as it proceeds. The default value is 20.

If r denotes the frame rate, it is usually best to set r such that 1/r is an integer multiple of the simulation step size. Otherwise, additional steps will be added to the simulation, at irregular intervals, in order to accommodate the requested rate.

realTimeScaling

This is a scaling factor for the viewer simulation speed.

initDraggersInWorld

If true, sets the initial orientation of transformer tools to be aligned with world coordinates, as described in Section 5.2. The default value is false.

navigationPanelLines

If true, causes lines to be drawn linking components in the navigation panel (Section 4.2).

11.1.2 Simulation

Figure 41: Simulation settings dialog.

Simulation settings involve attributes related to model simulation. They can be adjusted by selecting “Simulation ...” from the Settings menu, which opens a simulation settings dialog (Figure 41). Clicking the Save button will save the current settings to the user’s preferences (Section 11.2) so that they will be set automatically when ArtiSynth is restarted.

Note that simulation settings do not take effect until the next model is loaded or reloaded.

Simulation settings include:

maxStepSize

The default maximum step size used for simulation, in seconds. See “Simulation control properties” in the ArtiSynth Modeling Guide.

stabilization

The default stabilization method used to correct collision interpenetrations and drift from position constraints. See “Simulation control properties” in the ArtiSynth Modeling Guide.

colliderType

The default collider type used for collision detection. See “Collision methods and collider types” in the ArtiSynth Modeling Guide.

abortOnInvertedElements

This is an attribute of 3D FEM models that instructs the simulation to abort whenever inverted elements are encountered by FEM materials that don’t support element inversion (such as most hyperelastic materials). The default value for this attribute is true. Setting it to false may be useful for diagnostic purposes.

hybridSolvesEnabled

Enables hybrid solves in the sparse matrix solver used for system simulation. The default value is true. Hybrid solves combine iterative and direct methods in a way that can often improve simulation speeds several fold. However, hybrid solves do not generally produce results with exact numerical repeatability. It may therefore be preferable in some diagnostic and testing situations to disable hybrid solves.

numSolverThreads

Number of threads used by the sparse matrix solver used for system simulation. The default value is the number of threads available on the machine. Simulations will usually run faster with more threads (although the speed increase is generally sublinear). However, using more than one thread will usually produce results that do not have exact numerical repeatability. It may therefore be preferable in some diagnostic and testing situations to set the number of solver threads to 1.

11.2 Preferences

Preferences are settings saved in the user’s configuration data so that they are restored when ArtiSynth is restarted. They are stored in the file settings/preferences within the configuration folder (Section 1.1).

Figure 42: Preferences editor, with viewer preferences shown.

Preferences can be edited by selecting “Preferences ...” from the Settings menu, which opens a preferences editor dialog (Figure 42). A panel on the left contains a tree-based representation of the different preferences, which can be used to select a specific set of preferences which can then be adjusted using a preferences panel panel displayed on the right.

Values shown in the preferences editor describe stored values that are set when ArtiSynth is restarted, and setting them will not change the current settings in the ArtiSynth application. However, most preferences panels contain the button “Apply to current” which will apply the values to the current application settings. Other buttons include “Set from current”, which loads the values from the current application settings, and “Reset defaults”, which resets the panel values to their defaults.

To save preferences in the user’s configuration data, one should click the Save button at the bottom right of the preferences editor. The “Reset all defaults” button located at the bottom left resets all preference values to their defaults; the Save button must subsequently be used to save these reset values.

Preferences that can be set include settings for the viewer and mouse (Sections 3.9 and 3.10), model interaction and simulation (Section 11.1), and making movies (Section 14.5). Preferences can also be set for the application layout, as described in the next section.

11.3 Layout preferences

Layout preferences control the size and visibility of different application windows, as well as the look and feel of the user interface.

viewerWidth

Width of the main ArtiSynth viewer (in pixels). Note that this and the viewerHeight property describe the size of the viewer itself, and not the overall application window containing the viewer. The viewer width can also be set from the command line with the option

  -width <pixels>
viewerHeight

Height of the main ArtiSynth viewer window (in pixels). This can also be set from the command line with the option

  -height <pixels>
timelineVisible

Whether or not the timeline (Section 7) is visible when ArtiSynth starts up. The default value is true. Initial timeline visibility can also be controlled with the command line options

  -timelineVisible
  -timelineHidden
timelineWidth

Initial width of the timeline (in pixels). This can also be set from the command line with the option

  -timelineWidth <pixels>
timelineHeight

Initial height of the timeline (in pixels). This can also be set from the command line with the option

  -timelineHeight <pixels>
timelineRange

Default timeline range that is used to initialize the visible part of the timeline when a model is loaded. A value \leq 0 implies that the range will be set automatically. If set to a value >0, the actual amount of time visible may be slightly larger because of the way the timeline is scaled. The timeline range can also be set from the command line with the option

  -timelineRange <value>
timelineLocation

Initial location of the timeline with respect to the main ArtiSynth application window. This can also be set from the command line option with the option

  -timelineLocation <loc>

where loc is one of CENTER, LEFT, RIGHT, ABOVE or BELOW.

jythonFrameVisible

Whether or not a Jython console frame (Section 12) should be displayed when ArtiSynth starts up. The default value is false. A Jython console can also be requested at startup with the command line option

  -showJythonConsole
jythonLocation

Initial location of the Jython frame with respect to the main ArtiSynth application window. This can also be set from the command line with the option

  -jythonLocation <loc>

where loc is one of CENTER, LEFT, RIGHT, ABOVE or BELOW.

lookAndFeel

Controls the look and feel of the user interface (UI). The ArtiSynth UI is built using Java Swing, which supports pluggable look and feel. At the time of this writing, the look and feel options are:

DEFAULT

The default provided by the Java environment. On Windows and Linux systems, this is METAL, while MacOS provides its own proprietary look and feel.

METAL

The standard Swing cross-platform look and feel. On MacOS, it is necessary to specify this explicity to avoid its native look and feel.

SYSTEM

The native system look and feel.

A restart is required when changing the look and feel. It is also possible to specify the look and feel from the command line using the option

  -lookAndFeel <laf>

where laf is one of the options described above.

The SYSTEM look and feel may cause problems on some systems. For example, at the time of this writing, the Windows UI is not fully compatible with certain dialogs used to save files.