You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the off-axis projection routine for octree dataset precomputes the look of a cell from the camera angle. It does so at different resolutions, ranging from cells that span ~2pixels to the largest one.
When doing a deep zoom, however, the largest cell may be thousands of pixels across after projection, which requires a correspondingly large array to be allocated, thus leading to an out-of-memory error.
Compute how many pixels $N$ the largest cell covers,
Compute once what a cell of this size seen from the current angle looks like, and store the result in a buffer of size $N^2$.
Do the same for cells that are half this big until the cell apparent size if <1 pixel.
Iterate over all cells, and use the precomputed buffer as a kernel for each.
Overall, the buffer is a 3D array of size $\mathcal{O}(N^2\log_2 N)$. The issue is that, if a cell is large compared to the field of view, the buffer may take a huge amount of space.
Possible solutions include:
put an upper limit of how large the buffer can be, e.g. $N\lessapprox 100\mathrm{pixel}$ and interpolate for cells that would be larger than this,
directly compute ray-cube intersection for large cells, and resort to the aforementioned approach for smaller ones,
since the buffer is actually a piece-wise 2D linear function[1], we could also represent it analytically rather than using a 3D array.
[1]: The value only depends on the projected-plane position of each of the 8 nodes making a cell.
Bug report
Bug summary
Currently, the off-axis projection routine for octree dataset precomputes the look of a cell from the camera angle. It does so at different resolutions, ranging from cells that span ~2pixels to the largest one.
When doing a deep zoom, however, the largest cell may be thousands of pixels across after projection, which requires a correspondingly large array to be allocated, thus leading to an out-of-memory error.
Code for reproduction
Actual outcome
Expected outcome
No error.
Version Information
The text was updated successfully, but these errors were encountered: