ArtiSynth User Interface Guide

6 Editing Properties

Most ArtiSynth model components have properties which can be changed onscreen through the graphical interface. Properties include a diverse set of attributes ranging from stiffness and damping for AxialSprings, position and velocity for particles and rigid bodies, or whether or not a component is dynamic.

The underlying software architecture of the property interface is described in the Properties chapter of the
Maspack Reference Manual.

6.1 Property panels

To edit properties for a set of components, select the components in question, then right-click in either the viewer or the navigation panel, and select Edit properties. This will create a property panel for all properties which are common to the selected components. All typical property panel is shown in Figure 15.

Property panels are initialized with the current values of the selected components, providing a view of the current property state. A blank property value will be displayed when more than one component is selected and the corresponding property value differs across components.

Some properties are read only. In this case, the corresponding widget in the property panel will display the value but will be disabled.

Figure 15: A typical property panel.

Property panels are non-modal and persistent. They can be deleted by closing them or clicking the OK button. Clicking the Cancel button will cause the properties to be reset to their values at the time to panel was created.

Normally, a property panel will refresh its widget values whenever the model view is rerendered. In particular, this will happen repeatedly while simulation is running. To disable the automatic refresh, click the live updating button at the lower left of the panel.

6.1.1 Inheritable properties

Some properties are inheritable. The value of an inheritable property can be explicitly set or it can be inherited. If inherited, then it inherits its value from ancestor components further up the hierarchy. More specifically, if a property’s value is inherited, then the value is obtained from the nearest ancestor in which the same property exists and is explicitly set. If no such ancestor exists, then the property is set to a default value.

The inherited/explicit status of an inheritable property is controlled by an additional button placed at the left of the property widget (Figure 16). Clicking this button toggles the inherited/explicit status. If set to inherited, then the property’s value is determined from the hierarchy and the updated value is placed in the widget. Setting the value in the widget itself will cause the inheritable status to be set to explicit, and the value of inherited instances of the same property in descendant nodes will be updated accordingly.

Figure 16: Property panel showing YoungsModulus as inherited (left) and explicitly set (right).

6.2 Render properties

Render properties are associated with any component that is renderable. They are defined in the class RenderProps. Because of their complexity, they are adjusted through a separate panel from the standard property panel.

To adjust the property panel for a set of components, select the components in question, using either the viewer window or navigation panel, and then right click in either the viewer or the navigation panel. Several options may appear in the context menu:

Edit render props

This will create a special property panel allowing the render properties for the selected components to be set (see Section 6.2.1 and Figure 17).

Clear render props

This will actually remove the render properties from the selected components (i.e., their render properties will be set to null). Nominally, this means that the components will not be rendered, unless their parents take responsibility for rendering children without render properties. The latter behavior is common for lists of particles, springs, finite elements, etc., in order to avoid the need for defining render properties in a large number of objects.

Set visible

This option will appear if any of the selected objects are invisible. Selecting it will set the render properties so that all components are visible.

Set invisible

This option will appear if any of the selected objects are visible. Selecting it will set the render properties so that all components are invisible.

6.2.1 Render property settings

Figure 17: A typical panel for adjusting render properties.

There are a large number of render property settings. Loosely speaking, they are divided into generic settings, along with those related to faces, lines, and points. How these are used depends on what is being rendered. Mesh rendering typically uses the face settings, along with the line settings to render edges if the drawEdges property is set true. Line settings are also used for rendering axial springs and the edges of FEM elements. Point settings are used for rendering any subclass of Point, including Particle and FemNode.

Not all render properties may appear in a render panel; usually, only those properties relevant to the selected components will be presented.

Generic properties:

visible:

Whether or not the component is visible.

alpha:

The transparency for polygonal faces (range 0 to 1. Default is 1, for opaque).

shading:

How polygons are shaded (FLAT, SMOOTH, METAL and NONE). For viewer implementations there may be no difference between SMOOTH and METAL.

shininess:

Shininess parameter for polygons (range 0 to 128). Default is 32.

specular:

If not null, specifies the specular reflectance color.

Face related properties:

faceStyle:

Which polygonal faces are drawn (FRONT, BACK, FRONT_AND_BACK, NONE).

faceColor:

Color used for drawing faces.

backColor:

Color used for drawing backs of faces. If null, faceColor is used.

drawEdges:

If true, face edgesof the polygons are drawn explicitly.

Texture mapping properties:

colorMap:

If not null, specifies the image source file and properties for color mapping.

normalMap:

If not null, specifies the image source file and properties for normal mapping.

bumpMap:

If not null, specifies the image source file and properties for bump mapping.

Edge related properties:

edgeColor:

The color for edges.

edgeWidth:

Edge width in pixels.

Line related properties:

lineStyle:

How lines are drawn (CYLINDER, LINE, or SPINDLE).

lineColor:

The color for lines.

lineWidth:

Line width in pixels when LINE style is selected.

lineRadius:

Cylinder radius when CYLINDER or SPINDLE style is selected.

Point related properties:

pointStyle:

How points are drawn (SPHERE or POINT).

pointColor:

The color for points.

pointSize:

Point size in pixels when POINT style is selected.

pointRadius:

Sphere radius used when SPHERE style is selected.

A typical panel for editing render properties is shown in Figure 17. Texture mapping properties, if present, are normally hidden by default and can be exposed by clicking on the expand... button.