Using the
Abaqus Scripting Interface
to tune the graphics parameters
You can enter
Abaqus Scripting Interface
commands in the command line interface to tune your graphics parameters and to
find out information about the graphics adapter installed on your system. This
section explains how to use the
Abaqus Scripting Interface
to modify the graphics options; the
Abaqus Scripting Interface
is described in detail in the
Abaqus Scripting User's Guide.
In general, you should use the default values for most of the parameters.
However,
Abaqus
provides the capability to modify parameters to fix the following specific
problems:
The hardwareAcceleration parameter controls a number of
different graphics tuning parameters and generally should not be modified.
Hardware acceleration options are discussed in
Hardware acceleration (all platforms).
The hardwareOverlay parameter is controlled by the
hardwareOverlayAvailable parameter. If your system supports
hardware overlay planes,
Abaqus/CAE
and
Abaqus/Viewer
will use them by default. If your system supports hardware overlay planes but
viewports display a solid color and will not display a model, you may need to
manually set
hardwareOverlay=OFF.
The contourRangeTexturePrecision parameter sets the
tolerance used when computing the appropriate scale for transforming result
(contour) values to texture values. When set too low, the “out of range” colors
may be shown incorrectly for values near the range limits.
Some graphics adapters do not support the use of textures to generate
contour plots properly. If you experience problems displaying contour plots
(for example, all contours appear gray or the system aborts), you need to set
textureMapping=OFF to emulate
texture mapping in software. Similarly, if you experience problems printing
contour plots, you need to set
printTextureMapping=OFF.
Some graphics adapters do not fully support the use of vertex arrays to
process information about vertices. Some specific problems indicate that vertex
arrays are not fully supported: when you drag the radius of a circle in the
Sketcher, the circle is not visible; when you display an
X–Y plot, the axis labels are not visible; and some
facets in the shaded display of a mesh are missing. If you experience any of
these problems, set
vertexArraysInDisplayLists=OFF.
If this does not resolve the problem, suppress the use of vertex arrays
altogether by setting
vertexArrays=OFF.
The backfaceCulling parameter controls the display of
facets that are determined to be facing away from the viewer. If the front
sides of elements appear to be missing in the display or if the display is
incomplete, set
backfaceCulling=OFF.
You can disable direct rendering (set
directRendering=OFF) for Linux
systems that do not behave correctly when accessing the graphics hardware
directly.
You can disable hardware-accelerated off-screen rendering (set
accelerateOffScreen=OFF) when
you want printed images to be rendered without
OpenGL
hardware acceleration or if you experience problems with the Probe
functionality in
the Visualization module of Abaqus/CAE
(Abaqus/Viewer).
You can disable the backing store (set
backingStore=OFF) when you want
to conserve memory. When
accelerateOffScreen=ON, the
memory for the backing store is allocated from memory on the graphics card.
When OFF, the memory for backing store is
allocated from system memory. The backing store is generated by rendering the
viewport to an off-screen area. Subsequent viewport refreshes are performed
more quickly by copying the off-screen area to the viewport window. Even when
backingStore=ON, the backing
store will not be created if the viewport can be redrawn sufficiently quickly.
The translucencyMode parameter determines whether
Abaqus/CAE
optimizes the rendering of translucent objects for performance, accuracy, or
for a level in between. Lower values provide better performance, while higher
values provide greater accuracy.
The polygonOffsetConstant and
polygonOffsetSlope parameters, which affect onscreen display,
require manual tuning for each graphics adapter. On Linux systems the
printPolygonOffsetConstant and
printPolygonOffsetSlope parameters can generally be set equal to
the same values as the corresponding onscreen display parameters. On
Windows
systems the printPolygonOffsetConstant and
printPolygonOffsetSlope parameters do not generally need to be
adjusted.
The viewManipDisplayListThreshold parameter can be
lowered if there is an unacceptable delay when initiating view manipulation
operations in the
the Visualization module.
Increasing this value may increase the delay for large models but should
produce improved graphics performance during the view manipulation. If set high
with a large model, the delay can be many seconds and in excessive cases may
exceed system graphics memory and result in an empty display (no visible model)
for the view manipulation.
You can tune the graphics parameters using the following
Abaqus Scripting Interface
objects:
GraphicsOptions: The members of the GraphicsOptions
object determine the current graphics settings. These settings can be modified
during a session using the setValues method. The arguments
to the setValues method are described in
GraphicsOptions object.
You can view the current settings of the graphics parameters by entering
the following command in the command line interface:
print(session.graphicsOptions)
The following output is typical:
({'accelerateOffScreen': OFF,
'antiAlias': ON,
'autoFitAfterRotate': OFF,
'backfaceCulling': ON,
'backgroundBottomColor': '#acacc1',
'backgroundColor': '#333366',
'backgroundOverride': ON,
'backgroundStyle': GRADIENT,
'backingStore': ON,
'contourRangeTexturePrecision': 5.0e-06
'directRendering': ON,
'displayLists': ON,
'doubleBuffering': ON,
'dragMode': AS_IS,
'graphicsDriver': OPEN_GL,
'hardwareAcceleration': ON,
'hardwareOverlay': OFF,
'hardwareOverlayAvailable': False,
'highlightMethod': SOFTWARE_OVERLAY,
'highlightMethodHint': (HARDWARE_OVERLAY,
SOFTWARE_OVERLAY, XOR, BLEND),
'polygonOffsetConstant': 2.0,
'polygonOffsetSlope': 0.75,
'printPolygonOffsetConstant': 1.0,
'printPolygonOffsetSlope': 0.75,
'printTextureMapping': ON,
'shadersAvailable': True,
'stencil': False,
'textureMapping': ON,
'translucencyMode': 3,
'vertexArrays': ON,
'vertexArraysInDisplayLists': ON,
'viewManipDisplayListThreshold': 40})
Note:
Some of the parameters listed above have been deprecated. For
information on accessing deprecated parameters, see
BackwardCompatibility object.
The following command uses the setValues method to
modify some members of the GraphicsOptions object:
You can enter this command in the command line interface.
GraphicsInfo: The members of the GraphicsInfo
object provide information about the graphics adapter installed on your system.
This information may be useful for determining how to tune the graphics
adapter. The members are described in
GraphicsInfo object. The
members are for reference only and cannot be modified.
You can view the graphics information by entering the following command
in the command line interface:
print session.graphicsInfo
The following output is typical on
Windows
platforms:
Tuning the
polygonOffsetConstant and polygonOffsetSlope parameters
If display lists are enabled, you will not see the effect of tuning these
parameters; therefore, you must toggle off Use display
lists before attempting to tune your graphics adapter.
Alternatively, you can enter the following command in the command line
interface:
Setting drag mode to AS_IS is helpful for
fine tuning the parameters. Rotating the view interactively will show you if
minor adjustments are necessary.
session.graphicsOptions.setValues(dragMode=AS_IS)
It is recommended that you tune polygonOffsetConstant first,
then tune polygonOffsetSlope. To tune these parameters, you
should first display the part that is generated by the example script in
Creating a part.
To retrieve the script, use the following command in a command prompt window
(operating system shell):
abaqus fetch job=modelAExample
Select FileRun
Script from the main menu bar, select the example
script from the Run Script dialog box that appears, and
click OK. The example script creates a new viewport;
however,
Abaqus
should display only one viewport while you are trying to tune the graphics
parameters. Select any old viewports and delete them by selecting
ViewportDelete
Current from the main menu bar.
To tune the polygonOffsetConstant parameter:
From the Views toolbar, apply the bottom view
.
In the command line interface, enter the following commands:
Display the bottom view again to refresh the display.
Examine the model for visible lines. If all lines are not visible, repeat
Step 2, increasing the value of the polygon offset constant by a small
increment; for example, 0.1. The normal range
for this parameter is between 0.5 and
1.5, and two decimal places usually provide
sufficient precision. You should attempt to find a value as small as possible
that produces a correct display. Values that are too large may cause the lines
to appear to float above the part. The following figures illustrate the lines
that should be visible in your model.
Figure 1
illustrates the model with an incorrect value for
polygonOffsetConstant; some lines are missing between the shaded
areas.
Figure 2
illustrates the model with a correct value for
polygonOffsetConstant; all the shaded areas are separated by
lines.
After you have derived a value for polygonOffsetConstant, you
can tune polygonOffsetSlope.
To tune the polygonOffsetSlope parameter:
From the Views toolbar, apply the isometric view
. This view shows edges at a 45° angle on at least one axis.
In the command line interface, enter the following command:
Examine the model for visible lines. If all lines are not visible, repeat
Step 2, increasing the value of the polygon offset slope by a small increment;
for example, 0.1 or
0.05. The normal range for this parameter is
between 1.0 and
2.0, and two decimal places usually provide
sufficient precision. If the polygonOffsetConstant value is too
low, it may force the polygonOffsetSlope to be high. High values
of polygonOffsetSlope may cause the edges of hidden
polygons to show through where they meet visible polygons. In this case, raise
the polygonOffsetConstant value to get an acceptable value for
polygonOffsetSlope.
Figure 3
illustrates the model with an incorrect value for
polygonOffsetSlope; some line segments are missing between the
shaded areas, there is a line missing inside the hole, and some lines appear
dashed when they should appear solid.
Figure 4
illustrates the model with a correct value for
polygonOffsetSlope; all the shaded areas are separated by solid
lines.
Test the tuned values of polygonOffsetConstant and
polygonOffsetSlope on several models to make sure the values are
satisfactory. When you have finished tuning the graphics parameters, you should
return your settings for display lists and drag mode to the original values.