pyvista.examples.downloads.download_cubemap_space_16k

pyvista.examples.downloads.download_cubemap_space_16k#

download_cubemap_space_16k(load=True)[source]#

Download the 16k space cubemap.

This cubemap was generated by downloading the 16k image from: Deep Star Maps 2020 and converting it using https://jaxry.github.io/panorama-to-cubemap/

See vtk-data/cubemap_space for more details.

Parameters:
loadbool, default: True

Load the dataset after downloading it when True. Set this to False and only the filename will be returned.

Returns:
pyvista.Texture

Texture containing a skybox.

Notes

This is a 38MB file and may take a while to download.

Examples

Display the cubemap as both an environment texture and an actor. Note that here we’re displaying the 4k as the 16k is a bit too expensive to display in the documentation.

>>> import pyvista as pv
>>> from pyvista import examples
>>> cubemap = examples.download_cubemap_space_4k()
>>> pl = pv.Plotter(lighting=None)
>>> _ = pl.add_actor(cubemap.to_skybox())
>>> pl.set_environment_texture(cubemap, True)
>>> pl.camera.zoom(0.4)
>>> _ = pl.add_mesh(
...     pv.Sphere(), pbr=True, roughness=0.24, metallic=1.0
... )
>>> pl.show()
../../../_images/pyvista-examples-downloads-download_cubemap_space_16k-1_00_00.png

See also

Cubemap Space 16k Dataset

See this dataset in the Dataset Gallery for more info.

Cubemap Space 4k Dataset

Cubemap Park Dataset

Sky Box Cube Map Dataset