pyvista.cubemap#

cubemap(path='', prefix='', ext='.jpg')[source]#

Construct a cubemap from 6 images from a directory.

Each of the 6 images must be in the following format:

  • <prefix>negx<ext>

  • <prefix>negy<ext>

  • <prefix>negz<ext>

  • <prefix>posx<ext>

  • <prefix>posy<ext>

  • <prefix>posz<ext>

Prefix may be empty, and extension will default to '.jpg'

For example, if you have 6 images with the skybox2 prefix:

  • 'skybox2-negx.jpg'

  • 'skybox2-negy.jpg'

  • 'skybox2-negz.jpg'

  • 'skybox2-posx.jpg'

  • 'skybox2-posy.jpg'

  • 'skybox2-posz.jpg'

Parameters:
pathstr, default: “”

Directory containing the cubemap images.

prefixstr, default: “”

Prefix to the filename.

extstr, default: “.jpg”

The filename extension. For example '.jpg'.

Returns:
pyvista.Texture

Texture with cubemap.

Notes

Cubemap will appear flipped relative to the XY plane between VTK v9.1 and VTK v9.2.

Examples

Load a skybox given a directory, prefix, and file extension.

>>> import pyvista as pv
>>> skybox = pv.cubemap(
...     'my_directory', 'skybox', '.jpeg'
... )