I recently updated my python application from 9.0.3 to 9.1 and I’m seeing behavior in 9.1 that I didn’t have in 9.0.3 and I’m not sure how to put it back. I have overlapping cells in different actors that I use to highlight portions of my model. Previously, the highlighted portion in yellow was solid no matter what angle the model was viewed at. In 9.1, its only solid if I look directly (perpendicularly) on to it. I’ve tried all sorts of lighting and interpolations options, but haven’t been able to change the behavior. I just want it to be solid yellow all the time like it used to be.
At an angle:
Straight on:
This has been driving me crazy. Any ideas what would be causing this?
By overlapping, I assume the polygons are exactly on top of one another, or at least within z-buffer resolution. During rendering, coincident objects are often a problem, and may produce different results depending on your opengl drivers etc.
Check out vtkMapper.h ResolveCoincidentTopology and related methods. There is some documentation worth reading. HTH
That’s a rendering artifact called z-fighting or depth-fighting. It occurs when two or more faces are exactly in the same place so random pixels are chosen for rendering. While the lack of a tie breaker can be regarded as a poor graphics back-end implementation (it’s not VTK’s fault), this likely signals a problem in your data/model.
The methods proposed above shift the conflicting geometries a bit to mitigate the artifact.