cubemap#

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

Construct a cubemap from 6 images.

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, optional

Directory containing the cubemap images.

prefixstr, optional

Prefix to the filename.

extstr, optional

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

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