Rendering issues when tried vtk examples

Hello,

I’ve successfully built vtk by following this documentation without any errors. When trying out the examples, I am facing difficulties related to how the scene renders in the window.

I’ve tried the two examples: CylinderExample and HighlightPickedActor and I got completely different output:

image

In the first example, the cylinder does not appear, nor does the background color.

In the second example, there is the same issue with the background color, and when I click on any of the spheres, it turns black.

Can anybody help me to solve these issues?

Okay, I’ve tried yet another CircleExample and in this example, two colors, Cornsilk and DarkGreen, are used to set the background for the actor and renderer, respectively. However, when I try to check if they really exist using vtkNamedColors’s ColorExists method, it returns false.

I’ve also tried to manually set the color using the SetColor method, but ColorExists still returns false.

I think that’s probably the reason I am getting a black background in the renderer as the default behavior of vtkNamedColor’s GetColor3d method.

Why am I getting this behavior? Is this related to my hardware issue or something?

Hello,

Which VTK version did you build?

best,

PC

@Paulo_Carvalho I’ve built the latest version 9.3.

Never mind, got it working. I had to change solution configuration type in visual studio from Debug to Release.

1 Like