[vtk-developers] Rendering of vtkPolyData broken on Nvidia systems

Cory Quammen cquammen at cs.unc.edu
Fri Jun 22 09:35:19 EDT 2012


Oleg,

What OS are you using? I have had problems with rendering in ParaView
(built on VTK) using NVIDIA's 295.20 driver under Red Hat Enterprise
Linux Workstation release 6.1. Reverting to 275.43 solved my problem.

I spent a lot of time trying to track down specific changes in VTK and
ParaView that would explain this. Here's a snippet of an email I sent
to the ParaView mailing list:

> After compiling and testing an embarrassing number of different
> commits in ParaView's git history, I narrowed it down to the
> v3.12.0-RC1 tag. The rendering problem didn't appear for any revision
> prior to the v3.12.0-RC1 tag, but it was present at the tag and every
> commit after it. After looking at the source code, there didn't appear
> to be a change to any relevant rendering code in ParaView or VTK, much
> less anything that could have caused this problem.

I'm sorry I don't have a solution for you. It may be that there is
some misuse of OpenGL code in VTK that didn't manifest itself in
rendering errors on NVIDIA cards in previous drivers, but I'm
skeptical of that.

Perhaps you could use an OpenGL call logger (e.g.
http://code.google.com/p/glintercept/) and send the output of your
succinct example off to NVIDIA?

- Cory

On Fri, Jun 22, 2012 at 9:00 AM, Oleg Koren <koren at curefab.com> wrote:
> Looks like VTK cannot render vtkPolyData correctly when Nvidia driver of
> version 295.73 or above is installed. If more than one actor is defined, all
> but the first one are rendered black.
>
> Image 1: correct rendering -
> http://image-upload.de/image/YsvZ2O/a7a73bbf38.png
> Image 2: wrong rendering -
> http://image-upload.de/image/2f28ij/b9c5ffb4d5.png
>
> The problem can be reliably reproduced:
>
> 1) Install Nvidia driver 295.73 or above (e.g. from CUDA 4.2
> http://developer.nvidia.com/cuda-downloads)
> 2) Compile and run the code snippet (s. further down)
>
> Some more information:
>
> 1) Hardware is not the issue. Confirmed on GeForce GTX 460, 550 Ti, 560 Ti,
> 580 and 680.
> 2) Driver 286.19 and below works ok.
> 3) Seems to depend on the number and ordering of actors. Replacing
> mapper_1->Modified(); with mapper->Modified(); gives correct results.
> 4) Direct rendering with OpenGL works ok, which is strongly suggesting a bug
> of VTK.
>
> I would consider this problem a major issue, as it currently doesn't allow
> to use VTK on a modern Nvidia system. Happy to offer my help with testing
> and fixing it.
>
> Probably similar to:
> http://vtk.1045678.n5.nabble.com/nVidia-driver-problems-td4739635.html
>
>
> int main(int argc, char** argv[]) {
>
>        vtkRenderer* renderer = vtkRenderer::New();
>        vtkRenderWindow* renderWindow = vtkRenderWindow::New();
>        renderWindow->AddRenderer(renderer);
>
>        double origin[3] = {0.0, 0.0, 0.0};
>        double point0[3] = {1.0, 0.0, 0.0};
>        double point1[3] = {1.0, 1.0, 0.0};
>        double point2[3] = {0.0, 1.0, 0.0};
>        double point3[3] = {0.0, 0.0, 0.0};
>
>        double origin_1[3] = {0.0, 0.0, 0.0};
>        double point0_1[3] = {0.0, 1.0, 0.0};
>        double point1_1[3] = {-1.0, 1.0, 0.0};
>        double point2_1[3] = {-1.0, 0.0, 0.0};
>        double point3_1[3] = {0.0, 0.0, 0.0};
>
>        vtkPoints* points = vtkPoints::New();
>        points->InsertNextPoint(origin);
>        points->InsertNextPoint(point0);
>        points->InsertNextPoint(point1);
>        points->InsertNextPoint(point2);
>        points->InsertNextPoint(point3);
>
>        vtkPoints* points_1 = vtkPoints::New();
>        points_1->InsertNextPoint(origin_1);
>        points_1->InsertNextPoint(point0_1);
>        points_1->InsertNextPoint(point1_1);
>        points_1->InsertNextPoint(point2_1);
>        points_1->InsertNextPoint(point3_1);
>
>        vtkPolyLine* line = vtkPolyLine::New();
>        line->GetPointIds()->SetNumberOfIds(5);
>
>        vtkPolyLine* line_1 = vtkPolyLine::New();
>        line_1->GetPointIds()->SetNumberOfIds(5);
>
>        for(unsigned int i = 0; i< 5; i++) {
>                line->GetPointIds()->SetId(i, i);
>                line_1->GetPointIds()->SetId(i, i);
>        }
>
>        vtkCellArray* cellArray = vtkCellArray::New();
>        cellArray->InsertNextCell(line);
>
>        vtkCellArray* cellArray_1 = vtkCellArray::New();
>        cellArray_1->InsertNextCell(line_1);
>
>        vtkPolyData* polyData = vtkPolyData::New();
>        polyData->SetPoints(points);
>        polyData->SetLines(cellArray);
>
>        vtkPolyData* polyData_1 = vtkPolyData::New();
>        polyData_1->SetPoints(points_1);
>        polyData_1->SetLines(cellArray_1);
>
>        vtkPolyDataMapper* mapper = vtkPolyDataMapper::New();
>        mapper->SetInput(polyData);
>
>        vtkActor* actor = vtkActor::New();
>        actor->SetMapper(mapper);
>        actor->GetProperty()->SetColor(255,0,0);
>
>        vtkPolyDataMapper* mapper_1 = vtkPolyDataMapper::New();
>        mapper_1->SetInput(polyData_1);
>
>        vtkActor* actor_1 = vtkActor::New();
>        actor_1->SetMapper(mapper_1);
>        actor_1->GetProperty()->SetColor(255,255,0);
>
>        renderer->AddActor(actor);
>        renderer->AddActor(actor_1);
>
>        while(true) {
>                mapper_1->Modified();
>                renderWindow->Render();
>        }
>
>        return 0;
> }
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/Rendering-of-vtkPolyData-broken-on-Nvidia-systems-tp5714114.html
> Sent from the VTK - Dev mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>



-- 
Cory Quammen
Research Associate
Department of Computer Science
The University of North Carolina at Chapel Hill



More information about the vtk-developers mailing list