Comments (17)
On iOS, Apple only permits the Safari web browser so there is no way around any limitations it may have. Other browsers like "Chrome" and "Firefox" available in the app store are actually just reskinned versions of Safari.
Safari 15 and later have support for WebGL 2, which is required by Neuroglancer, but it is possible there are still limitations. If you can provide a screenshot or any error messages, that may help in determining what the problem is.
from neuroglancer.
@jbms thanks for your response, I am on the FlyWire Codex team with Arie. Apologies in advance for the awkwardly sized screenshots
For example, take this neuroglancer view
Which on macOS Safari, and other desktop browsers, renders as so:
Note both layers render, the whole-brain mesh and the neuron.
Loading the same view on iOS (after waiting some time for the particularly large neuron to load), we see this:
No whole-brain mesh. This view sometimes simply crashes the entire page on iOS as well:
These were captured on a device running the latest iOS 17 Beta, but we see the same results on other iOS versions
Upon connecting the iOS device up to the debugger, and loading the page, I am seeing some errors:
We're continuing to debug and explore this issue, and will provide anything else we find out. Thank you for your help
from neuroglancer.
Here is our construction of the view URL, in case it is helpful
def url_for_cells(segment_ids, data_version):
if data_version not in DATA_SNAPSHOT_VERSION_DESCRIPTIONS:
log_error(
f"Invalid version '{data_version}' passed to 'url_for_cells'. Falling back to default."
)
data_version = DEFAULT_DATA_SNAPSHOT_VERSION
config = {
"dimensions": {"x": [1.6e-8, "m"], "y": [1.6e-8, "m"], "z": [4e-8, "m"]},
"projectionScale": 30000,
"layers": [
{
"type": "image",
"source": "precomputed://https://bossdb-open-data.s3.amazonaws.com/flywire/fafbv14",
"tab": "source",
"name": "EM",
},
{
"source": "precomputed://gs://flywire_neuropil_meshes/whole_neuropil/brain_mesh_v3",
"type": "segmentation",
"objectAlpha": 0.05,
"hideSegmentZero": False,
"segments": ["1"],
"segmentColors": {"1": "#b5b5b5"},
"skeletonRendering": {"mode2d": "lines_and_points", "mode3d": "lines"},
"name": "brain_mesh_v3",
},
{
"type": "segmentation",
"source": f"precomputed://gs://flywire_v141_m{data_version}",
"tab": "segments",
"segments": [
str(sid) for sid in segment_ids
], # BEWARE: JSON can't handle big ints
"name": f"flywire_v141_m{data_version}",
},
],
"showSlices": False,
"perspectiveViewBackgroundColor": "#ffffff",
"showDefaultAnnotations": False,
"selectedLayer": {
"visible": len(segment_ids) > 1,
"layer": f"flywire_v141_m{data_version}",
},
"layout": "3d",
}
return f"{NGL_FLAT_BASE_URL}/#!{urllib.parse.quote(json.dumps(config))}"
from neuroglancer.
I haven't had much time to debug it but it is reproducible using the Xcode IOS simulator and attaching the mac safari dev tools to the simulator.
from neuroglancer.
Any fix for this? The same is happening to me. But the problem is a 308 http error and the difference in some GET request succeeding and failing is safari is requesting
/data/somefile
For ones that succeed
And
/data//somefile
For ones throwing 308 http error.
Is there some configuration for the webserver I'm using to serve the files?
I'm using flask airflow
from neuroglancer.
As far as the initial issue, I suspect it may be that the mesh is too large and it's exceeding some memory limit on iOS. Reducing the size of the mesh (e.g. with simplification) may help.
Not sure about the extra slash issue, can you provide more details about that?
from neuroglancer.
When neuroglancer is requesting info files it is fine. But when it requests some of the data that is in the info files sometimes it requests
/data/file
and sometimes it requests
/data//file
The double slash throws a 308 error on safari which results in the cannot fetch chunk error above
When I run my web server locally it works but when I deploy to ec2 it fails
from neuroglancer.
Hey @jbms, thanks again for your help with this.
As far as the initial issue, I suspect it may be that the mesh is too large and it's exceeding some memory limit on iOS. Reducing the size of the mesh (e.g. with simplification) may help.
We don't believe it's a size/memory issue. As an example, take this mainline neuroglancer view showing a very small mesh. On all other platforms/browsers it renders correctly, but on iOS does not render at all.
from neuroglancer.
If you set the opacity of the meshes to 1 (in rendering tab) does it then render on iOS?
from neuroglancer.
Ahh, yes it does apparently, thank you! I think we will be able to use this as a workaround for rendering neuropil meshes, but not for our whole-brain mesh
from neuroglancer.
@jbms @rmorey has this been resolved, i am trying to use opacity and silhouete in iOS safari and it just makes them dissapear?
from neuroglancer.
@jbms @rmorey has this been resolved, i am trying to use opacity and silhouete in iOS safari and it just makes them dissapear?
I believe it's not, there's some underlying issue with the way WebKit handles transparency in WebGL
from neuroglancer.
There are a few different issues mentioned here. Can you clarify which ones you are referring to?
Let's keep this issue just for the meshes only appearing with opacity 1, and open a separate issue for the slash issue if that still exists.
One thing that isn't clear to me: the out of bounds memory access error --- does that still occur? How is that related to the meshes appearing or not and how does it relate to the opacity?
from neuroglancer.
There are a few different issues mentioned here. Can you clarify which ones you are referring to?
from our perspective, the only issue is the one you mention, that transparent meshes don't render.
One thing that isn't clear to me: the out of bounds memory access error --- does that still occur? How is that related to the meshes appearing or not and how does it relate to the opacity?
I originally posted that error because it came up, I don't know whether or not it's related. I can do some testing to see if it reliably shows up alongside the rendering issue.
I have no idea what the slash issue is, we're not seeing that.
from neuroglancer.
Oh the slash issue can be discarded, I am just wondering about opacity now
from neuroglancer.
@jbms @rmorey any solutions to this problem? I am still trying to get opacity and sihloetting to work with neuroglancer, but the meshes are just invisible on ipads
from neuroglancer.
@jbms @rmorey any solutions to this problem? I am still trying to get opacity and sihloetting to work with neuroglancer, but the meshes are just invisible on ipads
Can you provide the contents of the webgl2 tab on webglreport.com?
Unfortunately I don't have a convenient way to test out iOS safari.
The code for transparent rendering is here:
The likely candidates for the issue are:
- A problem with rendering to a R32F texture ( ), which is used to accumulate the transparent rendering information.
- A problem with copying it back to the main buffer, possibly something involving the stencil buffer.
You could try reading back the accumulation textures to see if it contains any non-zero values. You could also try changing the texture format from R32F / RED to RGBA32F / RGBA . The implementation might happen to support RGBA better.
from neuroglancer.
Related Issues (20)
- Add more obvious UI feedback when data is loading HOT 3
- Detecting double click events on segmentation labels (javascript) HOT 4
- Programmatic Segment property representation (Javascript)
- Information text box
- How to customize annotation for adding a bounding box
- Running neuroglancer behind nginx with another server HOT 6
- How to use the segment_split_merge_tool
- Expose `bind_port` in python server arguments HOT 1
- Zstandard support? HOT 1
- Support for datasets in authenticated S3-compatible private buckets HOT 6
- N5 now supports Zstandard HOT 2
- "StarredSegments" object has no attribute "_visible" on release 2.37
- Consider using SolidJS HOT 1
- Use FinalizationRegistry to manage inter-worker object mappings without reference counting
- undock layer side panel HOT 1
- Set matrix transform for ImageLayer via Python HOT 2
- Hiding yellow border for images? HOT 3
- neuroglancer default framebuffer size artificially limits resolution HOT 7
- MAX_DRAW_BUFFERS limit error with shader in Safari
- Spatial dimensions, xy, is rendering in the 'zy' plane instead of the 'xy' plane when using the zarr format HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neuroglancer.