ChristopherChudzicki / math3d-react

A user-friendly 3d graphing calculator for the web. Create, share, and animate 3d mathematical scenes.
https://www.math3d.org
Mozilla Public License 2.0
245 stars 34 forks source link

issues with visibility, shading, and opacity #376

Open assaultdoor opened 1 year ago

assaultdoor commented 1 year ago

Hi - I'm not sure if this is related to issue #202 and MathBox, or if it's something else, but I've captured several issues with opacity in one image.

initial

First, the bottom surface (the cone) and the top surface have the same color, gridOpacity (.5), and opacity (.4), and both are shaded, yet the bottom surface is opaque to everything except the axes, the grid, and the black line down the middle of the object. Lowering the opacity of the bottom surface to .395 or lower makes the top surface visible through it, but causes another problem.

lower bottom opacity

Second, while the grid lines on the bottom surface are visible through the upper surface (assuming bottom surface's opacity > .395), the grid lines on the upper surface are not. Changing gridOpacity didn't change that.

Third, the central cone is lighter on one side of the axis than the other, at least when it is not between your line of sight and the bottom surface. I tried turning off shading, but that didn't help. However, turning shading on changed the color of the grid lines and also made all of them visible.

turned off and on again