I can't really use the Big Volume because I use multi-threading. A few month ago David mentioned scrolling as a way to implement paging, just wondering what you guys/gals think about this.
I'm about to implement something similar (scrolling) for streaming data into textures on the GPU. The idea is to map pages into a single texture with a torus topology. The way my system is setup, I have multiple pages centered around the camera, ex: a 9x9 square. (Each page correspond to a NxNxN region of Volume.) The pages on the outermost border (imagine a castle wall) are prefetched, ie. they exist in memory but are not visible to the player. For any new pages (or any page actually) it's position is relative to the center page, which is the location of the camera. So to map a page into a torus texture--in-place without allocation--we just need to use:
Code:
h(x, y) = (x % n , y % n).
h(x, y) defines a vector which goes into the texture.
where x, y are the coordinate of the page in question.
and n is the number of pages that fit into this texture, per axis.
With texture wrapping this will work, because everything is defined relative to the camera, which is also the "center" page. New pages are always paged into the correct page relative to the camera.
...
I was thinking with a small tweak this would also work for SimpleVolumes. Just need to implement texture wrapping for the SimpleVolume. With this we can do paging without allocation. Multithreading would still work (assuming you are doing multithreading the way I'm doing it).
What do you think?
If I get around to implementing this in a SimpleVolume like class I will provide the source.