How to change orientation of skybox with paraview (like vtk renderer)

I am testing skybox with python paraview.simple

I notice that orientation up of skybox is always Y-axis. (I expect that Z-axis)
So, when I load 3d model skybox looks like being ratated.

I found the solution with vtk renderer if I use vtkRenderer.

this->SkyboxActor->SetFloorPlane(0,0,1, 0.0);
this->SkyboxActor->SetFloorRight(-1,0,0);

(Turn environment map to z-up - Development - VTK)

This way, I can see skybox’s up-orientation is Z-axis

However, I don’t know how to do this with paraview python module

with paraview trace tool, I can show skybox with below code.

view = simple.CreateView('RenderVIew')
view.UseColorPalleteForBackground = 0
view.BackgroundColorMode = 'skybox'
view.UseEnvironmentLighting = 1

back_texture = simple.CreateTexture('.....hdr')
view.BackgroundTexture = back_texture

Now, I don’t know how to code to change orientation of skybox in vtkPVRenderView.

Please help me…
Thanks in advance

I’m afraid this is not exposed in ParaView, it should be pretty simple to add though.

@Lucas_Givord

I ran into the same issue. In the mean time, you can instead rotate the data you want to display using the Transforming section of the property pane:

# trace defaults for the display properties.
partitionedDataSetCollectionSource1Display.Representation = 'Surface'
partitionedDataSetCollectionSource1Display.ColorArrayName = ['POINTS', 'Scalars']
partitionedDataSetCollectionSource1Display.LookupTable = scalarsLUT
partitionedDataSetCollectionSource1Display.SelectTCoordArray = 'None'
partitionedDataSetCollectionSource1Display.SelectNormalArray = 'Normals'
partitionedDataSetCollectionSource1Display.SelectTangentArray = 'None'
partitionedDataSetCollectionSource1Display.Orientation = [0.0, 90.0, 0.0]

Thank you Alex.

@Alexandre_Minot

I tried this already.
It makes remaning default up vector of view as Y-Axis and we can rotate 3d structure.

However, same situation happens again when I make child pipeline from structure like as creating filter.

So, this could not be the solution for me :frowning:

Anyway, thank you!

I tried also something like hack? trick?

I retrieve actor(vtkSkybox?) from view like below and then change property of FloorPlane and FloorRight.
Script seems working but skybox rendered wiered. (LOL)

I expected lucky magic… haha

renderer = view.GetRenderer()
actors = renderer.GetActors()
actors.InitTraversal()

while True:
    actor = actors.GetNextItemAsObject()

    if not actor:
        break

    if actor.__class__.__name__ == 'vtkOpenGLSkybox':
        actor.SetFloorPlane(0, 0, 1, 0.0)
        actor.SetFloorRight(-1, 0, 0)
        break
    print(actor.__class__.__name__)

In a similar vein, if you want to keep the transformation with subsequent filters, you can try applying a Transform filter on your data directly (here only the representation of current source is rotated, hence it does not apply on the rest of your pipeline)

Thank you for your reply.

I am afraid it’s not hevy when I load really huge models.
I usually load very heavy structures.

I have to test it is affordable

Thank you