Skip to content

Anti-aliasing#365

Merged
banesullivan merged 3 commits intomasterfrom
anti-aliasing
Aug 27, 2019
Merged

Anti-aliasing#365
banesullivan merged 3 commits intomasterfrom
anti-aliasing

Conversation

@banesullivan
Copy link
Copy Markdown
Member

This adds a way to control the anti-aliasing features in the vtkRenderWindow. I added options for controlling the point, line, and polygon smoothing (not sure if these really do anything, but I know they have to be called before the first render) and I added a convenient way to set the number of multi-samples used to avoid aliasing.

I'm not exactly sure if this will have any performance implications or issues across operating systems.

Examples

The aliasing was most notable on axes grid lines/text and on the edges of meshes.

Make sure to zoom into or download these PNGs if you want to compare - your web browser is likely affecting how they look!!!

Axes Grid

Current behavior - 0 multi-samples:

Screen Shot 2019-08-22 at 11 02 30 PM

New default - 4 multi-samples:

Screen Shot 2019-08-22 at 11 02 42 PM

And 8 multi-samples because why not:

Screen Shot 2019-08-22 at 11 02 52 PM

Edges on a Mesh

Current behavior - 0 multi-samples:

Screen Shot 2019-08-22 at 11 05 02 PM

New default - 4 multi-samples:

Screen Shot 2019-08-22 at 11 05 09 PM

And 8 multi-samples because why not:

Screen Shot 2019-08-22 at 11 05 16 PM

@banesullivan banesullivan added the enhancement Changes that enhance the library label Aug 23, 2019
@banesullivan
Copy link
Copy Markdown
Member Author

banesullivan commented Aug 23, 2019

I set 4 as the default number of multi-samples but 8 is better... I've seen notes on forums/docs that 8 might be "slow" but I haven't noticed any performance issues so far (I have a high-end GPU and no way to test on more common/mid-grade GPUs)

@codecov-io
Copy link
Copy Markdown

codecov-io commented Aug 23, 2019

Codecov Report

❌ Patch coverage is 75.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.60%. Comparing base (645f864) to head (af8aee0).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #365      +/-   ##
==========================================
- Coverage   83.63%   83.60%   -0.04%     
==========================================
  Files          33       33              
  Lines        7967     7989      +22     
==========================================
+ Hits         6663     6679      +16     
- Misses       1304     1310       +6     

@banesullivan banesullivan merged commit 4ca301f into master Aug 27, 2019
@banesullivan
Copy link
Copy Markdown
Member Author

Pro tip: I have a system environment variable on my machine that sets the multi_samples to 8 anytime PyVista is imported. Include this in your ~/.bash_profile:

export PYVISTA_MULTI_SAMPLES=8

@banesullivan banesullivan deleted the anti-aliasing branch September 15, 2019 23:03
@banesullivan banesullivan mentioned this pull request Nov 18, 2019
tkoyama010 pushed a commit that referenced this pull request Nov 12, 2024
Bumps [adRise/update-pr-branch](https://github.com/adrise/update-pr-branch) from 0.9.0 to 0.9.1.
- [Release notes](https://github.com/adrise/update-pr-branch/releases)
- [Commits](adRise/update-pr-branch@v0.9.0...v0.9.1)

---
updated-dependencies:
- dependency-name: adRise/update-pr-branch
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Changes that enhance the library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants