0

I am interested in the datastructure "quadtree" and for an project of mine, i want to use them. Ok lets make an example :

We have a 3D space where the cameraposition is locked but i can rotate the camera. Whenever i rotate my camera to a certain point, a large 2d image(bigger than frustum) is shown.

1.Loading the whole image isnt necessary when i can only see 1/4 of it! . Does it make sense to use quadtrees here, to load only the parts of the image that are visible to me?(When using opengl/webgl) If so, each quadtree node has to contain its own vertexbuffer and texture or not?

Nicol Bolas
  • 449,505
  • 63
  • 781
  • 982
greedsin
  • 1,252
  • 1
  • 24
  • 49
  • What is use case of this big image? You have something like environment map? – Ramil Kudashev Oct 15 '16 at 09:50
  • Yes for example – greedsin Oct 15 '16 at 09:51
  • You could just split map into few smaller pieces and determine visibility for each of them. Quad tree is most helpful if you have series of tiles with increasing quality (geographical maps, for example). So you could zoom in and show better quality images. If you plan to always stay on same level of precision I think quad tree is overcomplication. – Ramil Kudashev Oct 15 '16 at 09:57
  • Thanks for your reply. I think almost the same, but f.e. if the image is larger than 50mb, it would be good to load only 2 mb and THEN dynamically load other parts of the image?What do you think about this? – greedsin Oct 15 '16 at 09:59
  • Sure, you could load low quality full image and then download pieces on demand. From the other side, you need really big screen to get all precision from 50mb+ image. And also if it is high res you need to be sure that texture samplers could work with that precision. Is it 16k? – Ramil Kudashev Oct 15 '16 at 10:06
  • No. I think not even 4k.My current loading time is under 3sec, so i dont think that will the a problem (size ist ofc not 50mb ! That was just an example) Still thanks, you post your comments as answer, i will accept then. – greedsin Oct 15 '16 at 10:12

1 Answers1

2

Quad tree fits good when you need to switch between multiple precision levels on demand. Geographical maps with zooming is a good example. If you have tiles with only one level of precision it should be more handy to control their loading / visibility without having such complicated structure. You could just load low precision image fast and then load high precision images on demand.

Also, speaking of your case - 50mb for 4k image sounds strange. Compressed DDS/dxt1 or PVRTC textures should take less space (and uncompressed jpg/png much less). Also, it is helpful to determine, what is the lowest applicable image precision in your case (so you don't waste space/traffic without reason).

Ramil Kudashev
  • 1,166
  • 3
  • 15
  • 19