Actor with opacity shows through opaque actor in 9.1 (not in 8.1)
I draw a semi-transparent line through an opaque triangle, in 8.1 it shows correctly but in 9.1 it shows through as if the triangle was transparent.
pyhon code which shows the issue (on Windows 8.1):
from vtk import *
ren_win = vtkRenderWindow()
ren = vtkRenderer(); ren.SetBackground(1.0, 1.0, 1.0); ren_win.AddRenderer(ren)
#opaque triangle
points = vtkPoints()
points.InsertNextPoint(0, 0, 0); points.InsertNextPoint(0, 10, 0); points.InsertNextPoint(10, 0, 0)
pd = vtkPolyData(); pd.SetPoints(points)
cells = vtkCellArray(); cells.InsertNextCell(3, [0, 1, 2]); pd.SetStrips(cells)
mapper = vtkPolyDataMapper(); mapper.SetInputData(pd)
actor = vtkActor(); actor.GetProperty().SetColor(0.8, 0.8, 0.8); actor.SetMapper(mapper)
ren.AddActor(actor)
#semi-transparent line
points = vtkPoints()
points.InsertNextPoint(0, 0, 1); points.InsertNextPoint(5, 5, -1)
pd = vtkPolyData(); pd.SetPoints(points)
cells = vtkCellArray(); cells.InsertNextCell(2, [0, 1]); pd.SetLines(cells)
mapper = vtkPolyDataMapper(); mapper.SetInputData(pd)
actor = vtkActor(); actor.GetProperty().SetColor(1, 0, 0)
actor.GetProperty().SetOpacity(0.8)
actor.SetMapper(mapper)
ren.AddActor(actor)
istyle = vtkInteractorStyleTrackballCamera()
iren = vtkRenderWindowInteractor(); iren.SetInteractorStyle(istyle); iren.SetRenderWindow(ren_win)
iren.Initialize()
ren_win.Render()
iren.Start()