I’m using VTK 9.0 with Python 3.8 on a windows 64 bit machine.
I downloaded the PBR example from the VTKExamples site and the sample cubemaps, textures etc.
But the example program exits with the message
renderer.SetEnvironmentCubeMap(cubemap)
AttributeError: ‘vtkmodules.vtkRenderingOpenGL2.vtkOpenGLRenderer’ object has no attribute ‘SetEnvironmentCubeMap’
renderer is a vtkRenderer and I see from the nightly docs that this class does not in in fact have a SetEnvironmentCubeMap method,
If anyone help me get this example running, I’ll be vey grateful.
@scotsman60 Yes, unfortunately the site has not been updated in a while since the passing of Bill Lorenson.
In the meantime, I have been catching these changes and updating the master. So there is now a disconnect between the web pages and the master.
In the master the changes are:
renderer.UseImageBasedLightingOn()
if vtk.VTK_VERSION_NUMBER >= 90000000000:
renderer.SetEnvironmentTexture(cubemap)
else:
renderer.SetEnvironmentCubeMap(cubemap)
renderer.SetBackground(colors.GetColor3d("BkgColor"))
renderer.AddActor(actor)
I have been maintaining the master so the VTK 9.0 changes are present for Python and C++. So at this stage, if there is a problem with an example, it is best to check out the master.
Thanks Andrew. I had no idea that Bill Lorensen had passed.
He responded to several of my questions over the years and even though I never met him in person I did feel somehow that I knew him…