vedo icon indicating copy to clipboard operation
vedo copied to clipboard

Styling axes - useDepthPeeling problem

Open FedeClaudi opened this issue 5 years ago • 1 comments
trafficstars

Hi Marco,

I am trying to style the axes of a Plotter by passing a bunch of parameters with a dictionary. This is the dictionary:

    _default_axes_params = dict(
        xyGrid = True,
        xyPlaneColor = 'k',
        xyGridColor = 'red',
        xyAlpha = 1,
        axesLineWidth = 10,
        gridLineWidth = 50, 
    )

which I pass to the axes argument of Plotter. I got the parameters names form the Plotter docstring: https://github.com/marcomusy/vtkplotter/blob/e09cb33c2d4071ac39af4e140be68debdf1a0635/vtkplotter/plotter.py#L396

It seems that some parameters are not doing anything... axesLineWidth works, but all the others don't seem to be doing anything.

A few more things I've tried: passing _default_axes_params to show and to plotter.show . I also tried using show with newPlotter=True but nothing changed.

I can see the axes and change the line thickness, but the planes between axes never appear Screenshot 2020-05-12 at 20 43 07


UPDATE

After a bit more of testing, it looks like the culprit is:

settings.useDepthPeeling = True

If I set that as False it all works fine.

So to be exact: the parameters above do change the axes appearance, but when using useDepthPeeling the planes that are part of the axes don't get rendered


UPDATE 2

settings.useFXAA = True also causes some problems when the axes planes have colors other than 'k'.

FedeClaudi avatar May 12 '20 19:05 FedeClaudi

Yes! this is actually a known problem ... there seems to be some weird incompatibility btw the depthpeeling algorithm and low transparency objects which belong to a vtkAssembly, I never managed to understand what's wrong with it, I can only that hope the problem will be fixed in VTK9.

marcomusy avatar May 12 '20 21:05 marcomusy