This is for ParaView 5.13.0 on Windows 11, but it also happens with other versions and operating systems.
The structure of my question is:
The bad news
The good news
(most importantly) I need to understand the good news.
The bad news: Open the very popular cow.vtp and set the line width to 2, and select Parallel Projection. Overall it looks great, but if you zoom in on some details (I will upload the ParaView Camera Configuration file), you see that some lines have line width equal to 1.
The good news: Switch on Interactive Select Cells, and select cells in the vicinity. The good news is that all of the bright lines have line width equal to 2.
I have studied the ParaView source code but cannot find the relevant code for the Selected lines. Can someone please point me in the right direction? I am pretty sure the Selected lines have Actor->GetProperty()->LightingOff() so they are always bright, but I am not sure if it is a vtkActor or a custom actor you have created. cowViewPoint1.pvcvbc (2.3 KB)
Mathieu,
Thank you for your response. I have installed ParaView 5.13.1 on OpenSUSE Leap 15.4. Attached is a state file. I have a standard HD monitor on that machine. Sometimes these pixel-related issues depend on the screen size, so if you adjust the zoom or rotation angle a bit, you should see the effect. Again, regular edges (which I would guess are produced using VTK Edge Visibility) sometimes have a width of 1, even though 2 is selected in the GUI. However, if you select one or more cells then the bright magenta selected lines seem to have a reliable width of 2. I need to know how those reliable lines are created.
Thanks,
Matthias
I have found a solution to the problem I am facing, and I can demonstrate it using ParaView (and there is no need to use Interactive Select Cells for this demonstration).
The “bad news” I mentioned in my first post above, was bad but it was not critically important to the issue. Here is a more relevant piece of bad news: If you load cow.vtp into ParaView with Parallel Projection, and with the View set to Surface, and then load it again (so it is visible in the Pipeline Browser a second time) with the View set to Wireframe and Line Width = 4, then we get the bad behavior, shown with a green arrow in this animation (looking at a region behind the cow’s left front hoof, with the cow upside-down):
The good behavior is gotten by loading cow.vtp just once, with the View set to “Surface With Edges” which is shown in the animation below. Of course this is the right way to do this if the goal is to view the entire cow as Surface With Edges. The discussion in the previous paragraph seems nonsensical (loading the cow twice), but it is a quick way to illustrate the behavior and avoids unnecessary complications. (I have placed more detail, including minor code changes in a standard VTK example, at Selected edges disappear for certain viewing angles when using Parallel Projection - Support - VTK )
Thanks for your response. Yes, and since my overall goal is to understand how Selected Cells are displayed in ParaView (with bright highlighting that looks like a Wireframe), it now seems almost certain that this is not done with a Wireframe. Probably a new Actor is created for a 2D cell, and the color of the cell surface is chosen to match the non-selected cell, but the Edges are colored bright magenta and made visible. There are still mysteries, for example, the bright Edges seem to have Actor->GetProperty()->LightingOff() [so their brilliance is not reduced is regions with lower lighting] but the surface itself has normal lighting.
I have found a solution for the problem, which can be demonstrated with the VTK example HighlightSelection. Remarkably the Wireframe approach is successful if we use vtkProperty::SetRenderLinesAsTubes(true).
In summary:
Here is a quote from the documentation for SetRenderLinesAsTubes(): “The width of the line in pixels is controlled by the LineWidth attribute. May not be supported on every platform and the implementation may be half tubes, or something only tube like in appearance.”