-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Color and alpha blending bug fix for scenes with transparent gl3d objects #4234
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
Conversation
- separate color and alpha blending - the applied algorithm works for point clouds, surfaces as well as volume rendering - remove unnecessary calls to axes draw
package.json
Outdated
@@ -81,7 +81,7 @@ | |||
"gl-mat4": "^1.2.0", | |||
"gl-mesh3d": "^2.1.1", | |||
"gl-plot2d": "^1.4.2", | |||
"gl-plot3d": "^2.2.2", | |||
"gl-plot3d": "git://github.com/gl-vis/gl-plot3d.git#67b5aed84d02429bbc4e8c5a45d4cd23e03280c6", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -6,10 +6,10 @@ | |||
"lighting": { | |||
"facenormalsepsilon": 0 | |||
}, | |||
"opacity": 0.2, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This opacity for a volume
trace was too high.
"opacityscale": "extremes", | ||
"colorscale": "Blackbody", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a bad colorscale
choice for a volume with extreme opacityscale
.
Hmm. At first look, the new baseline for the @archmoj can you tell us why this happens? Note that, this mock is used on https://plot.ly/javascript/3d-scatter-plots/ |
This happens because we need to blend colors and opacity values while the opacity values (as well as the marker sizes) are too large on this mock. |
Addressed in 40b1c6c. |
Good call. That one is actually a |
For point-clouds (including |
I'm curious @archmoj - what made you close this? |
Am working on another branch to make darker color blending not lighter. |
Addressing an old bug in
gl3d
scenes with transparent objects affectedscatter3d
,mesh3d
,surface
,volume
and possibly other 3-D traces:#1267
#3243
#4111
One codepen for comparing before vs after of all 3d mocks with transparency added
Before
After
Before
After
Before
After
Before
After
As well as point clouds (
scatter3d
plots), this PR improves renderings of volumes and surfaces.Also please refer to 3632eea that illustrates some issues fixed in this PR.
cc: @plotly/plotly_js