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

Three.js: Add option to render only single side of surface #28702

Closed
paulmasson mannequin opened this issue Nov 7, 2019 · 6 comments
Closed

Three.js: Add option to render only single side of surface #28702

paulmasson mannequin opened this issue Nov 7, 2019 · 6 comments

Comments

@paulmasson
Copy link
Mannequin

paulmasson mannequin commented Nov 7, 2019

The current implementation of WebGL has known issues with transparent surfaces, one being noticeable rendering artifacts for closed transparent surfaces. This ticket adds the option of rendering the front side of the surface only, thereby reducing rendering artifacts. Compare these two graphics:

polytopes.dodecahedron().plot(opacity=.5)
polytopes.dodecahedron().plot(opacity=.5,single_side=True)

This option is only meant to be used with closed surfaces, because an open surface will disappear from view from certain angles if both sides are not rendered.

CC: @jplab @EmmanuelCharpentier @egourgoulhon

Component: graphics

Keywords: threejs

Author: Paul Masson

Branch/Commit: 81f6275

Reviewer: Eric Gourgoulhon

Issue created by migration from https://trac.sagemath.org/ticket/28702

@paulmasson paulmasson mannequin added this to the sage-9.0 milestone Nov 7, 2019
@paulmasson paulmasson mannequin added c: graphics labels Nov 7, 2019
@paulmasson
Copy link
Mannequin Author

paulmasson mannequin commented Nov 7, 2019

Branch: u/paulmasson/single_side

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 7, 2019

Branch pushed to git repo; I updated commit sha1. New commits:

81f6275Better and more consistent tests

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 7, 2019

Commit: 81f6275

@paulmasson paulmasson mannequin added the s: needs review label Nov 7, 2019
@egourgoulhon
Copy link
Member

Reviewer: Eric Gourgoulhon

@egourgoulhon
Copy link
Member

comment:4

LGTM. I've tested it on top of #28699 on this notebook.
Thanks for this improvement!

@vbraun
Copy link
Member

vbraun commented Nov 8, 2019

Changed branch from u/paulmasson/single_side to 81f6275

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants