Reference: Global configuration file

Configuration settings

You can setup a default Vizard environment by configuring the vizcore.cfg file.  This allows you to set the default resolution, window dimensions, GUI color theme, default camera navigation handler, and more.  To set these default values, create a vizcore.cfg file in Vizards bin directory.  Then add the configuration options you are interested in by following the example vizcore.cfg file below. If there is a vizcore.cfg file in the same directory as the script, Vizard will load this as well. If the same option is specified in both the global and local vizcore.cfg file, the local copy will take precedence.

 

On a related note, any file in the Vizard plug-ins directory ending in _viz.py is run whenever a Vizard program is run.  This allows you to set all your default settings in a Python script file if you so choose.

 

You can also dynamically set and read options in your script using the viz.setOption(name,value) and viz.getOption(name) commands.

Window initialization options

Usage restrictions: These options must be set before viz.go() is called.

 

Name

Description

Default value

viz.antialias

Specifies the full screen anti-alias sample number

0

viz.window.width

Initial non-fullscreen width of the window

800

viz.window.height

Initial non-fullscreen height of the window

600

viz.window.x

Initial x position of non-fullscreen window. Relative to upper left corner.

0

viz.window.y

Initial y position of non-fullscreen window. Relative to upper left corner.

0

viz.window.icon

Name of .ico file to use as icon for graphics window and published EXE.

 

viz.window.visible

Controls the visibility of the graphics window

1

viz.display.width

Resolution width of monitor to run Vizard simulation in

0

viz.display.height

Resolution height of monitor to run Vizard simulation in

0

viz.display.color

Color resolution of monitor to run Vizard simulation in

0

viz.display.frequency

Monitor refresh rate to run Vizard in

0

viz.hmd

Initialize in HMD mode

0

viz.fullscreen

Initialize in fullscreen mode

0

viz.fullscreen.monitor

The monitor to use for fullscreen operations. If 0, the entire combined monitor region will be used for fullscreen.

0

viz.fullscreen.width

The width to use for fullscreen mode. If 0, the monitor width will be used.

0

viz.fullscreen.height

The height to use for fullscreen mode. If 0, the monitor height will be used.

0

viz.fullscreen.x

The x position to use for fullscreen mode. Relative to upper left corner.

0

viz.fullscreen.y

The y position to use for fullscreen mode. Relative to upper left corner.

0

viz.prompt

Initialize with prompt window

0

viz.stereo

Default stereo mode if none is specified with viz.go()

0

viz.quadbuffer

Initialize in quad buffer stereo mode

0

viz.stencil

Initialize with stencil buffer

0

Global initialization options

Usage restrictions: These options must be set in vizcore.cfg file, before the script is executed.

 

viz.theme.border

Theme border color

0.25 0.35 0.45 1.0

viz.theme.text

Theme text color

1.0 1.0 1.0 1.0

viz.theme.back

Theme background color

0.58 0.68 0.78 1.0

viz.theme.lightBack

Theme light background color

0.68 0.75 0.83 1.0

viz.theme.darkBack

Theme dark background color

0.25 0.44 0.64 1.0

viz.theme.highBack

Theme highlight background color

0.25 0.44 0.64 1.0

viz.theme.highText

Theme highlight text color

1.0 0.78 0.34 1.0

viz.theme.check.down

Checkbox check texture

checkbox_down.gif

viz.theme.check.up

Checkbox uncheck texture

checkbox_up.gif

viz.theme.button.down

Button down texture

button_down_blue.gif

viz.theme.button.up

Button up texture

button_up_blue.gif

viz.theme.radio.down

Radio selected texture

radio_down.gif

viz.theme.radio.up

Radio unselected texture

radio_up.gif

viz.theme.slider.bar

Slider bar texture

back.jpg

viz.theme.slider.tick

Slider tick texture

tick.jpg

viz.logLevel

Output log level (LOG_ALWAYS, LOG_ERROR, LOG_WARN, LOG_NOTICE, LOG_INFO, LOG_DEBUG)

LOG_NOTICE

viz.resource.path

Semi-colon delimited string of directories to add to resource path.

 

viz.resource.loaderOption

File loader option string

 

viz.physics.engine

The default physics engine to load on startup.

physics_opal.dll

viz.sound3d.engine

The default sound 3d engine to load on startup.

sound3d_dx.dll

viz.vsync

Vertical sync mode

1

viz.ipd

Stereo IPD value

0.06

viz.fov

Field of View and aspect ratio. If aspect ratio is negative then it will be automatically computed based on window size.

40 -1

viz.clip

Near/Far clip plane. If either value is negative, the clip planes will be automatically computed.

-1 -1

viz.overlap

Stereo overlap

1.0

viz.screenDistance

Screen distance value for stereo modes.

1.0

viz.clearcolor

Window clear color

0 0 0

viz.stereoHUD

Controls whether HUD objects are rendered in stereo. 0 or 1

1

viz.clearDepth

Clear depth buffer when rendering screen objects.

1

viz.specularTexture

Enables/Disables specular highlights on all textured objects.

0

viz.lightModel.localViewer

Use local viewpoint for calculating specular highlights. Enabling this will fix problems with specular highlights not being consistent on CAVE edges.

0

viz.lightModel.twoSided

Enable/Disable two sided lighting calculations.

0

viz.text.encoding

The encoding to use for text display. If AUTO, Vizard will check the script for a UTF8 BOM.

( AUTO, ASCII, UTF8)

AUTO

viz.text.font

The default font to use when creating text objects.

arial.ttf

viz.text.bidirectional

Controls whether text will support displaying bidirectional UTF-8 characters.

0

viz.camera

Name of camera handler class in the vizcam module (PivotNavigate, PanoramaNavigate, etc..)

 

viz.network.buffer_size

Size of buffer that will receive all network data.

65536

viz.network.port

Port used for sending/receiving network data.

4950

viz.network.port_in

Space delimited list of additional ports to receive network data on.

 

viz.splashscreen

Image file to use as a loading splash screen

 

viz.mouse.visible

Controls if the mouse cursor is visible.

1

viz.mouse.trap

Controls if the mouse cursor is trapped inside the Vizard graphics window.

0

viz.mouse.sensitivity

Mouse navigation sensitivity.

1 1

viz.cluster.master.clients

Space delimited list of clients to connect to in cluster. Cluster master application will take precedence over this option.

 

viz.cluster.master.port

Port to use for cluster communication.

5351

viz.cluster.master.sync

Enable/Disable synchronization of frames between cluster nodes.

1

viz.cluster.master.transmit_mouse

Enable/Disable transmitting mouse navigation to clients.

1

viz.cluster.master.connect_timeout

Timeout for connecting to clients (milliseconds)

15000

viz.cluster.master.sync_timeout

Timeout for syncing frame with clients (milliseconds)

500

viz.cluster.master.init_timeout

Timeout for initializing with clients (milliseconds)

10000

viz.cluster.master.send_timeout

Timeout for sending messages to clients (milliseconds)

10000

viz.cluster.master.buffer_flush_size

Number of bytes in cluster message buffer before sending to clients.

4096

viz.cluster.master.abortOnLostConnection

Controls whether the cluster master will abort the simulation if the connection to a client is lost.

1

viz.cluster.client.connect_timeout

Timeout for connecting to master (milliseconds)

15000

viz.cluster.client.sync_timeout

Timeout for syncing frame with master (milliseconds)

500

viz.cluster.client.init_timeout

Timeout for initializing with master (milliseconds)

20000

viz.cluster.client.frame_timeout

Timeout for receiving master messages for a frame (milliseconds)

1000

python.optimize

Set the optimize flag to initialize the Python interpreter with. Can be one of the following values:

0 - No optimization (default value)

1 - Equivalent to -O option, ignores assert statements

2 - Equivalent to -OO option, doc strings will not be included in compiled pyo files.

0

 

 Miscellaneous options

Usage restrictions: These options must be set before the associated commands are executed.

 

viz.AVIRecorder.maxWidth

Maximum width for recording AVI

640

viz.AVIRecorder.maxHeight

Maximum height for recording AVI

480

viz.AVIRecorder.fps

Frame rate for recording AVI

30

viz.AVIRecorder.drawCursor

Capture mouse cursor in AVI

0

viz.preload

Tells Vizard if it should preload all objects to the graphics card before rendering the first frame.

1

viz.hint

A combination of hint flags to apply on all the scenes before the first frame is rendered.

0

viz.node.op_mode

Specifies the default op mode to use when a node is created. Can be a combination of the following values:

4 - OP_TRAVERSE

8 - OP_OVERRIDE

16 - OP_ROOT

4

viz.model.optimize

Automatically optimize models after they are loaded.

0

viz.model.hint

A combination of hint flags to apply to all loaded models.

0

viz.model.cache

The default cache mode to use. Can be one of the following values:

0 - viz.CACHE_NONE

1 - viz.CACHE_COPY

2 - viz.CACHE_CLONE

0

viz.texture.share

Tells Vizard if it should share the textures of a model after it is loaded. This helps save texture memory when loading models that reference the same image file.

1

viz.texture.hint

A combination of hint flags to apply to textures created with viz.addTexture command. Will not be applied to render/blank textures.

0

viznet.server.port

The port viznet servers will communicate over.

viz.NETWORK_PORT

viznet.server.port_in

The port for viznet servers to receive messages on. If not specified, it will inherit the value from the viznet.server.port option.

viznet.server.port

viznet.server.port_out

The port the viznet servers will send messages on. If not specified, it will inherit the value from the viznet.server.port option.

viznet.server.port

viznet.client.port

The port viznet clients will communicatye over.

viz.NETWORK_PORT

viznet.client.port_in

The port for viznet clients to receive messages on. If not specified, it will inherit the value from the viznet.client.port option.

viznet.client.port

viznet.client.port_out

The port the viznet clients will send messages on. If not specified, it will inherit the value from the viznet.client.port option.

viznet.client.port

hd.version

Version of OpenHaptics plugin to use. Can be either 1 or 2. Must be set before hd module is imported.

2

viz.shader.normal_map_unit

The texture unit to use when generating tangent/binormal data for geometry.

0

viz.shader.tangent.name

The attribute name to use for tangent data.

Tangent

viz.shader.tangent.index

The attribute index to use for tangent data.

6

viz.shader.binormal.name

The attribute name to use for binormal data.

Binormal

viz.shader.binormal.index

The attribute index to use for binormal data.

7

viz.link.resetOriPriority

The priority to use for link reset ori operators.

-10

LiveCharacter.connectionWarnTimeout

Print warning if LiveCharacter has not received response from server after this many seconds.

2

LiveCharacter.connectionRetryTimeout

Retry connecting to LiveCharacter server if have not received update after this many seconds.

2

viz.publish.crc

Controls whether published EXEs will perform CRC on the exe when running. Set to 0 if you need to disable the CRC check.

1

viz.publish.load_message

Message to display in popup box while publish EXE is loading. If set to an empty string, the popup box will not appear.

Vizard launching, please wait...

viz.publish.load_title

Title of popup box while publish EXE is loading. The title appears in the taskbar.  If set to an empty string, the popup box won't appear in the taskbar.

Vizard launching

viz.publish.persistent

Controls whether the contents of the published EXE will persist on the users drive after being unpacked. If enabled, you must also specify a unique name for the viz.publish.product option. The files will persist in a directory based on the specified company/product names:

 

 %TEMP%/<company>/<product>

 

When enabled, this option allows for much faster startup times of the published EXE, since it will only need to be unpacked once on the end users system, and subsequent executions will run form the existing directory.

0

viz.publish.product

The product name to use for published EXEs

 

viz.publish.company

The company name to use for published EXEs

WorldViz

viz.prevent_screensaver

Controls whether Vizard should prevent the screen saver from starting while the script is running.

0

viz.max_frame_rate

The maximum framerate to allow Vizard to run at. If 0, then Vizard will run as fast as possible.

0

viz.html.allowEscape

Controls whether the Escape key will close the HTML window when it as focus.

1

sound3d.useViewRotation

Controls whether the viewpoint rotation is used for spatializing the sound.

1

sound3d.dx.algorithm

The algorithm used by the DirectX 3D sound plugin. Can be one of the following string values:

 

NO_VIRTUALIZATION

HRTF_FULL

HRTF_LIGHT

 

If no value is specified, a default algorithm will be selected based on the user preference in the Control Panel.

 

Information options

Usage restrictions: Read-only.

 

viz.version

Current version of vizard

NA

viz.monitor.count

Number of monitors

NA

viz.monitor.width

Current width of monitor resolution.

NA

viz.monitor.height

Current height of monitor resolution.

NA

viz.monitor.refresh_rate

Current refresh rate of monitor

NA

viz.cluster

1 if running in cluster mode, otherwise 0

NA

viz.cluster.clients

Number of clients, when running in cluster mode.

NA

viz.publish

1 when running in published mode, otherwise 0.

NA

viz.publish.path

The path of the published exe, when running in published mode.

NA

gl.extensions

List of OpenGL extensions supported by graphics card. Extension names are separated with spaces.

NA

gl.version

OpenGL version supported by driver

NA

gl.vendor

OpenGL driver vendor. Typically maker of graphics card.

NA

gl.renderer

OpenGL renderer. Typically name of graphics card.

 

NA

Example vizcore.cfg

Here is a sample vizcore.cfg file that will perform the following for all scripts:

 

viz.antialias = 4
# Lines beginning with the '#' symbol will be treated as comments
viz.fullscreen = 1
viz.clearcolor = 0.5 0.5 0.5

See also

In this section:

Dynamic configuration settings

Other sections:

Scene basics

Application window basics