3D Rendering rotation issue with Opacity
We're using VTK for medical imaging but there is long standing issue we can't understand so far
When 3D opacity is around 0.8
rotation gives some very strange mirror effect when near part is becoming invisible (very transparent)
There is issue demonstration: https://drive.google.com/file/d/0B-Ae8luypUS0UTdTNjd6a1hoS2M/view
code which adds ply image to render
double range[2];
polyData->GetScalarRange(range);
vtkSmartPointer< vtkColorTransferFunction > colorMap
= vtkSmartPointer< vtkColorTransferFunction >::New();
colorMap->SetColorSpaceToLab();
colorMap->AddRGBPoint(range[0], 0.865, 0.865, 0.865);
colorMap->AddRGBPoint(range[1], 0.706, 0.016, 0.150);
colorMap->Build();
vtkSmartPointer < vtkPolyDataMapper > mapper =
vtkSmartPointer < vtkPolyDataMapper >::New();
mapper->SetLookupTable(colorMap);
if (polyData->GetPointData()->GetNormals() == NULL) {
vtkSmartPointer< vtkPolyDataNormals > polyDataNormals
= vtkSmartPointer< vtkPolyDataNormals >::New();
setInputData(polyDataNormals, polyData);
polyDataNormals->SetFeatureAngle(90.0);
mapper->SetInputConnection(polyDataNormals->GetOutputPort());
} else {
setInputData(mapper, polyData);
}
vtkSmartPointer < vtkActor > actor =
vtkSmartPointer < vtkActor >::New();
actor->GetProperty()->SetPointSize(3);
actor->GetProperty()->SetOpacity(0.8);
actor->GetProperty()->SetColor(0.4,0.4,0.2);
actor->SetMapper(mapper);
m_renderer->AddActor(actor);
please help us to understand what's going there and is there way we can avoid that "mirror" effect with saving the same opacity