-
Notifications
You must be signed in to change notification settings - Fork 295
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
feat(graphene): multiscale meshes #460
base: master
Are you sure you want to change the base?
Conversation
@@ -3,272 +3,67 @@ name: Build | |||
on: [push, pull_request] | |||
|
|||
jobs: | |||
client: |
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.
I don't think you intended to include the changes in this file.
@@ -0,0 +1,32 @@ | |||
runtime: python27 |
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.
Probably not intended to be included in this PR.
@@ -0,0 +1,6 @@ | |||
{ |
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.
Not intended for this PR.
src/neuroglancer/mesh/draco/index.ts
Outdated
@@ -68,7 +68,7 @@ export async function decodeDracoPartitioned( | |||
heap.set(buffer, offset); | |||
numPartitions = partition ? 8 : 1; | |||
const code = (m.instance.exports.neuroglancer_draco_decode as Function)( | |||
offset, buffer.byteLength, partition, vertexQuantizationBits, true); | |||
offset, buffer.byteLength, partition, vertexQuantizationBits, false); |
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 will need to be an option, since we don't want to change this option for the neuroglancer precomputed datasource.
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.
Yes I will do that when the PR is ready to merge. This was just to get the meshes to appear during development.
@@ -44,14 +44,15 @@ import { SharedWatchableValue } from 'neuroglancer/shared_watchable_value'; | |||
import { DisplayDimensionRenderInfo } from 'neuroglancer/navigation_state'; | |||
import { forEachVisibleSegment } from 'neuroglancer/segmentation_display_state/base'; | |||
import { computeChunkBounds } from 'neuroglancer/sliceview/volume/backend'; | |||
import { verifyObject } from 'src/neuroglancer/util/json'; |
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.
Should be 'neuroglancer/util/json' -- no 'src/' prefix.
lodScales: new Float32Array(response.lodScales), | ||
octree: new Uint32Array(response.octree), | ||
vertexOffsets: new Float32Array(response.lodScales.length * 3), | ||
clipLowerBound: vec3.create(), |
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 is why the meshes aren't displaying properly --- the mesh rendering code calculates bounds for each octree node by calculating the bounds of the node according to the grid, and then restricting them by these overall clip bounds. If the resultant bounding box does not intersect the view frustum, then the octree node won't be rendered. With these values for the clip bounds, all of the calculated bounds end up being (0, 0, 0)---(0,0,0), which both defeats the normal logic of selectively rendering only visible chunks, and also means if the view frustum does not contain (0, 0, 0) then nothing will be rendered.
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.
If you don't have the real bounds available, but you can just calculate the bounds that include all of the fragments present.
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.
Thanks! I have pushed changes and updated the chunkedgraph deployment to return clip bounds.
Realized that zoom-out disappearance is being caused by resolution, changing it fixes that. But this means higher resolution meshes are loaded earlier than expected.
Currently chunkedgraph is passing bounding box of the dataset for clip lower and upper bounds. Should that fix the above issue? It doesn't look like it does though, I'm not familiar with webGL.
23a25a6
to
be12f35
Compare
be12f35
to
88a1b62
Compare
No description provided.