aces / brainbrowser

Web-based visualization tools for neurological data.
https://brainbrowser.cbrain.mcgill.ca/
GNU Affero General Public License v3.0
351 stars 122 forks source link

Shapes not responding well to opacity slider #310

Open jonathanlurie opened 8 years ago

jonathanlurie commented 8 years ago

This issue is actually more obvious on Bigbrain Surface Viewer (which shares almost the same core) since we tend to load a larger number of shapes.

In some situations, the opacity slider does not work and makes some shapes visible or totally hidden, partially transparent is not possible. For example, the shape 253-white cortical surface right from BigBrain experiences this issue.

After investigation, BrainBrowser core does not seem responsible for that and the problem seems to rather be on THREE.js side. I made a test using a recent version of THREE (rev 76) in BigBrain Surface Viewer and the shape 253-white cortical surface right now plays well with opacity but some other shapes do not anymore.

No matter which version of THREE, the shapes that don't play well with opacity seems masked (or partially masked) by another shape rather than completely invisible. I noticed that with a rotation, some parts of the invisible shapes become visible.

Here are the possibilities that come to my mind (other than THREE has a bug):

jonathanlurie commented 8 years ago

To illustrate the last point "a shape can be masked by an invisible shape" , here are some snaps where the green shape continues to hide the grey shape even though it is invisible. It is especially clear in the the last image where we can see the demarcation at which the grey shape is not visible anymore. This border matches exactly the position of the green shape.

1 2 3 4

Though, in some other cases, overlapping several shapes that are all partially transparent works just fine.