Cubemap flipped in 9.2.0rc
Cubemap order appears to have been reversed in the Z direction between v9.1.0 and v9.2.0rc. For example, with the following order:
- Positive X
- Negative X
- Positive Y
- Negative Y
- Positive Z
- Negative Z
With the following script:
for image_path in image_paths:
if not os.path.isfile(image_path):
file_str = '\n'.join(image_paths)
raise FileNotFoundError(
f'Unable to locate {image_path}\n'
'Expected to find the following files:\n'
f'{file_str}'
)
texture = pyvista.Texture()
texture.SetMipmap(True)
texture.SetInterpolate(True)
texture.cube_map = True # Must be set prior to setting images
# add each image to the cubemap
for i, fn in enumerate(image_paths):
image = pyvista.read(fn)
flip = _vtk.vtkImageFlip()
flip.SetInputDataObject(image)
flip.SetFilteredAxis(1) # flip y axis
flip.Update()
texture.SetInputDataObject(i, flip.GetOutput())
The cubemap is reversed along the Z direction.