Reference: Viewpoints & windows

Lens correction

Vizard can perform lens correction on the output image to account for distorted displays, such as HMDs. The vizlens module has a distortion correction implementation that will perform a standard pincushion distortion on the output image. Simply add the following code to your script to enable the distortion correction:

 

import vizlens
pincushion = vizlens.PincushionDistortion()

 

The PincushionDistortion constructor accepts the following optional keyword arguments:

 

Argument

Description

Default

k1

The amount of distortion to perform. You can specify the default value using the PincushionDistortion.k1 cfg option.

0.1

scaleToFit

Scale the distorted image so that it takes up the entire window.  You can specify the default value using the PincushionDistortion.scaleToFit cfg option.

True

See also

In this section:

Viewpoint and window basics

Perspective rendering

Stereoscopic rendering

Viewpoint basics

Window basics

Viewpoints & windows command tables

Other sections:

Action Basics

Animation path basics

Application window basics