Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graticule labels not rendered with super-sample anti-aliasing enabled #421

Open
bjlittle opened this issue Sep 1, 2023 · 6 comments
Open
Labels
pyvista A PyVista related issue status: blocked type: bug Auto-labelled for bug/*, fix/* and patch/* branches

Comments

@bjlittle
Copy link
Owner

bjlittle commented Sep 1, 2023

🐛 Bug Report

Enabling anti-aliasing type ssaa results in no labels being rendered for the meridians and parallels of a graticule e.g.,

Disabled

import geovista
import geovista.theme

plotter = geovista.GeoPlotter()
plotter.add_coastlines()
plotter.add_base_layer(texture=geovista.natural_earth_1())
plotter.add_graticule()
plotter.camera.zoom(1.5)
plotter.disable_anti_aliasing()
plotter.show()

aa-disables

FXAA - Fast Approximate Anti-Aliasing

import geovista
import geovista.theme

plotter = geovista.GeoPlotter()
plotter.add_coastlines()
plotter.add_base_layer(texture=geovista.natural_earth_1())
plotter.add_graticule()
plotter.camera.zoom(1.5)
plotter.enable_anti_aliasing(aa_type="fxaa")
plotter.show()

aa-fxaa

MSAA - Multi-Sample Anti-Aliasing

import geovista
import geovista.theme

plotter = geovista.GeoPlotter()
plotter.add_coastlines()
plotter.add_base_layer(texture=geovista.natural_earth_1())
plotter.add_graticule()
plotter.camera.zoom(1.5)
plotter.enable_anti_aliasing(aa_type="msaa", multi_samples=8)
plotter.show()

aa-msaa

SSAA - Super-Sample Anti-Aliasing

import geovista
import geovista.theme

plotter = geovista.GeoPlotter()
plotter.add_coastlines()
plotter.add_base_layer(texture=geovista.natural_earth_1())
plotter.add_graticule()
plotter.camera.zoom(1.5)
plotter.enable_anti_aliasing(aa_type="ssaa")
plotter.show()

aa-ssaa

Environment

Please share the report generated by either of the following CLI commands:

scooby --report geovista

or

python -c "import geovista; print(geovista.Report())"
----------------------------------------------------------------------------------------
  Date: Fri Sep 01 13:13:39 2023 BST

                 OS : Linux
             CPU(s) : 4
            Machine : x86_64
       Architecture : 64bit
                RAM : 7.7 GiB
        Environment : Python
        File system : ext4
         GPU Vendor : Intel Open Source Technology Center
       GPU Renderer : Mesa DRI Intel(R) HD Graphics 4000 (IVB GT2)
        GPU Version : 4.2 (Core Profile) Mesa 20.0.8

  Python 3.11.4 | packaged by conda-forge | (main, Jun 10 2023, 18:08:17) [GCC 12.2.0]

            cartopy : 0.21.1
              click : 8.1.5
click-default-group : 1.2.2
            cmocean : v3.0.3
           colorcet : 3.0.1
           geovista : 0.4.0.dev9+dirty
         matplotlib : 3.7.2
            netcdf4 : 1.6.4
              numpy : 1.25.1
       platformdirs : 3.9.0
              pooch : v1.7.0
           pykdtree : 1.3.7.post0
             pyproj : 3.6.0
            pyvista : 0.40.1
             scooby : 0.7.2
                vtk : 9.2.6
            IPython : 8.14.0
        fastparquet : 2023.7.0
       nest_asyncio : 1.5.6
             pandas : 2.0.3
              scipy : 1.11.1
----------------------------------------------------------------------------------------
@bjlittle bjlittle added new: issue Highlight a new community raised "generic" issue type: bug Auto-labelled for bug/*, fix/* and patch/* branches labels Sep 1, 2023
@bjlittle
Copy link
Owner Author

bjlittle commented Sep 1, 2023

@tkoyama010 I think I've figured this one out and can replicate it in pyvista ...

Once I've confirmed the behaviour that I'm seeing, I'll share it here and consider whether to work around it or push a change to pyvista 👍

@tkoyama010
Copy link
Collaborator

Thanks. If you can reproduce the code with PyVista code, please get in touch with me or create an issue in PyVista!

@bjlittle
Copy link
Owner Author

bjlittle commented Sep 1, 2023

@tkoyama010 Awesome, thanks.

Yeah, I've narrowed it down to some inconsistent behaviour within pyvista.plotting.plotter.BasePlotter.add_point_labels.

So it's outside geovista and a fix (or explanation) would benefit the general pyvista community.

I'll raise an issue on pyvista 👍

@bjlittle
Copy link
Owner Author

bjlittle commented Sep 1, 2023

Reference pyvista/pyvista#4831

@bjlittle bjlittle self-assigned this Sep 1, 2023
@bjlittle bjlittle added the pyvista A PyVista related issue label Sep 25, 2023
@scitools-ci scitools-ci bot removed this from 🚴 Peloton Dec 15, 2023
Copy link
Contributor

In order to maintain a backlog of relevant issues, we automatically label them as stale after 180 days of inactivity.

If this issue is still important to you, then please comment on this issue and the stale label will be removed.

Otherwise this issue will be automatically closed in 28 days time.

@github-actions github-actions bot added the stale A stale issue/pull-request label Mar 24, 2024
@tkoyama010
Copy link
Collaborator

This is still important.

@bjlittle bjlittle removed the stale A stale issue/pull-request label Mar 24, 2024
@bjlittle bjlittle added status: blocked and removed new: issue Highlight a new community raised "generic" issue labels Jun 20, 2024
@bjlittle bjlittle removed their assignment Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pyvista A PyVista related issue status: blocked type: bug Auto-labelled for bug/*, fix/* and patch/* branches
Projects
None yet
Development

No branches or pull requests

2 participants