Opened 3 years ago
Closed 3 years ago
#28702 closed enhancement (fixed)
Three.js: Add option to render only single side of surface
Reported by: | paulmasson | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-9.0 |
Component: | graphics | Keywords: | threejs |
Cc: | jipilab, charpent, egourgoulhon | Merged in: | |
Authors: | Paul Masson | Reviewers: | Eric Gourgoulhon |
Report Upstream: | N/A | Work issues: | |
Branch: | 81f6275 (Commits, GitHub, GitLab) | Commit: | 81f6275d8c6524211f14dcc9f07afbd798b7113e |
Dependencies: | Stopgaps: |
Description
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.
Change History (5)
comment:1 Changed 3 years ago by
Branch: | → u/paulmasson/single_side |
---|
comment:2 Changed 3 years ago by
Commit: | → 81f6275d8c6524211f14dcc9f07afbd798b7113e |
---|
comment:3 Changed 3 years ago by
Status: | new → needs_review |
---|
comment:4 Changed 3 years ago by
Reviewers: | → Eric Gourgoulhon |
---|---|
Status: | needs_review → positive_review |
LGTM. I've tested it on top of #28699 on this notebook. Thanks for this improvement!
comment:5 Changed 3 years ago by
Branch: | u/paulmasson/single_side → 81f6275d8c6524211f14dcc9f07afbd798b7113e |
---|---|
Resolution: | → fixed |
Status: | positive_review → closed |
Note: See
TracTickets for help on using
tickets.
Branch pushed to git repo; I updated commit sha1. New commits:
Better and more consistent tests