Calculating tile size for multiresolution panoramas

Q&A about the latest versions
Post Reply
User avatar
JimWatters
Posts: 329
Joined: Thu Oct 07, 2010 6:16 pm
Location: Saint John, New Brunswick
Contact:

It use to be, that 512 pixels was the best size for graphic cards to process data quickly but not necessary any more. Video cards seam to handle any small tile size well these days. I still make then divisible by 4 to be safe. I tried several sizes from 100 to 800 and most devices handled then equally as well.
Keeping the tiles small allow smart phones with limited memory to still be able to show the panorama.

To determine cube sizes:
  • divide by 3.14 to preserve a 1:1 ratio of pixels in the center of the cube but overcompensate at the edge.
  • divide by 3.45 to keep the same number of pixels
  • divide by 4 to preserve a 1:1 ratio of pixels at the edges of the cube but loose a little resolution at the center.
To determine tile size:
  • Keep dividing by 2 until you are between 256 and 512.
  • Round down to nearest even number (I like divisible by 4)
Top level width is tile size
  • Keep multiplied by 2 until back to or just under the original cube size.
  • Keep adding new levels until you are around 400 to 600 to accommodate the smallest screens zoomed all the way out.
Example:
Pano 30000 X 15000
30000 / 3.45 = ~8695 pixel cube face.
8695 / 2 = 4348
4347 / 2 = 2174
2174 / 2 = 1087
1087 / 2 = 543
543 / 2 = 271
271 rounded down to nearest number divisible by 4 is 268

Tile size 268
The top level become 268 * 2 * 2 * 2 * 2 * 2 = 8576
The levels are 8576, 4288, 2144, 1072, 536
User avatar
malaga360VR
Posts: 43
Joined: Tue Sep 18, 2012 10:36 pm
Location: Spain / Málaga
Contact:

Thanks !!

Very useful info
User avatar
hum@no.id
Posts: 945
Joined: Sat Sep 09, 2006 10:35 pm
Location: Dark side of the Moon
Contact:

HI Jim!
I still wanted to ask - what is it such an attractive number - 512 (?) This is a golden magic number? I use 500px - is that bad?
Gumir J | VR Panoramic Photographer | mobile: +77055717171 | skype: gumirj
website: gumirj.com | google.com/+gumirj | facebook.com/gumirj | twitter.com/gumirj
User avatar
360Texas
Moderator
Posts: 3684
Joined: Sat Sep 09, 2006 6:06 pm
Location: Fort Worth, Texas USA
Contact:

Well, I suspect you would have to been around back in the early computing days = factor of 8 which is a whole number.

In the real early days of Random Access Memory or RAM storage were expressed in numeric terms of:

8 nibbles = 1 bit
8 bits = 1 byte (b)
1024 bytes = 1 kilobyte (kb)

8 kb
16
32
64
128
256
512 fun fact: 512/8=64 or a whole number and not a fractional decimal like 63.9
1024 or 1 mb ram
2048 or 2 mb ram

1024 mb = 1 Terabyte (tb)
Dave
Pano2VR Forum Global Moderator
Image
Visit 360texas.com
User avatar
JimWatters
Posts: 329
Joined: Thu Oct 07, 2010 6:16 pm
Location: Saint John, New Brunswick
Contact:

512 is a power of 2.
The maximum tile or texture size of graphics cards will be a power of two. Today's high end cards will have a maximum texture size 4096 and higher.
Older cards use to be as small as 64, but that is going back a couple decades.

At a time graphic cards were much more efficient when working in their maximum tile size. Now graphic cards can handle just about any size equally as well as long as it has enough memory.

When I wrote this post I tested a variety of sizes on my 3 year old phone, a new tablet, and my Desktop PC. I did not notice any change in responsiveness for different sizes. I would crash my phone some place above 800 pixels. Other mobile devices have even less memory and graphic resources. I chose the 512 size based on info from other forum post about devices crashing on larger sizes.

Sticking to a tile size divisible by 4 avoids potential bugs.

When the final version of Pano2VR 4.5 is released I would like to test the tile size limits of various devices. Improvements to the rendering engine should allow larger sizes. That means less tiles need to be generated for each pano.
User avatar
360Texas
Moderator
Posts: 3684
Joined: Sat Sep 09, 2006 6:06 pm
Location: Fort Worth, Texas USA
Contact:

512 is the power of 2^9

or 1 2 4 8 16 32 64 128 256 512

I did not know this...
after looking at the url page http://en.wikibooks.org/wiki/Primary_Ma ... _exponents

Find = A table of xn.
Bases are on the left find 2, exponents are across the top: locate 512

Math is a good thing to know... it is important because Pano2vr does a lot of mathematics behind the scene so you just have to provide the values and Pano2vr does all the work.

Pano2vr is a great program !!!! And Jim helps us understand how Pano2vr works to our benefit
Dave
Pano2VR Forum Global Moderator
Image
Visit 360texas.com
User avatar
hum@no.id
Posts: 945
Joined: Sat Sep 09, 2006 10:35 pm
Location: Dark side of the Moon
Contact:

Thank you. But one question remained open - "500px tile, can somehow cause errors? Or something else that I do not know ..."
Gumir J | VR Panoramic Photographer | mobile: +77055717171 | skype: gumirj
website: gumirj.com | google.com/+gumirj | facebook.com/gumirj | twitter.com/gumirj
User avatar
JimWatters
Posts: 329
Joined: Thu Oct 07, 2010 6:16 pm
Location: Saint John, New Brunswick
Contact:

I see no problem what so every with 500px.
One reported bug, but I was not able to reproduce regarding tile size. Tile size not divisible by 4 and preview of 1/4 selected caused 1 pixel wide black border on some of the preview tiles.
If a graphics card is going to have trouble with a tile size, it is going to because it is not divisible by 2 or too large.
User avatar
hum@no.id
Posts: 945
Joined: Sat Sep 09, 2006 10:35 pm
Location: Dark side of the Moon
Contact:

Thank you. 500px - It is very good. I would not want to break my brain via complex numbers...
Gumir J | VR Panoramic Photographer | mobile: +77055717171 | skype: gumirj
website: gumirj.com | google.com/+gumirj | facebook.com/gumirj | twitter.com/gumirj
User avatar
JimWatters
Posts: 329
Joined: Thu Oct 07, 2010 6:16 pm
Location: Saint John, New Brunswick
Contact:

I can think in base 2 almost as well as base 10.
I have been know to count in binary using my fingers. I can get up to 31 on one hand.
User avatar
360Texas
Moderator
Posts: 3684
Joined: Sat Sep 09, 2006 6:06 pm
Location: Fort Worth, Texas USA
Contact:

LOLLL ah.... hold both hands above your head.. consider this to be HIGHER Mathematics ?

I think base 10 is 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 etc etc

Are we having fun yet ? Probably getting off topic too.. So I will stop
Dave
Pano2VR Forum Global Moderator
Image
Visit 360texas.com
User avatar
360Texas
Moderator
Posts: 3684
Joined: Sat Sep 09, 2006 6:06 pm
Location: Fort Worth, Texas USA
Contact:

Ok 1 more ASCII Character Table in decimal and binary suitable for use on Servers. Probably the reason why filename sometimes do not work.

Server reads decimal and converts machine binary code to actually process the command

So if you use a upper case character like Davefilename.html in Pano2vr but the server searches for a file name on the server and can not find davefilename.html
already on the server you will get a path/ filename error because:

Davefilename.html and davefilename.html are not the same because the capital D and lowercase d are not the same machine codes values

Find chart on http://sticksandstones.kstrom.com/appen.html
Capital D is binary code 01000100
Lower d is binary code 01100100

For general rule we always use lower case characters for file names. I also understand why special characters in foreign languages are very tricky when creating different language versions of Pano2vr .

And learning how to add and subtract in binary is very difficult [read not possible] for me.

OK now I will stop now
Dave
Pano2VR Forum Global Moderator
Image
Visit 360texas.com
cesarp
Posts: 21
Joined: Tue Jul 07, 2009 6:14 pm

I’m getting up to date with the new version of Pano2VR after several months away from panoramics.
There are wondeful improvements but the best news for me are the ones about multiresolution in HTML5. However I have some questions before replacing the files of my clients’ panoramas.

It’s now recommended the use of multiresolution without the need to create mobile files. Is this an absolutely safe method? Or is there a risk that some panos will not be displayed properly on some device(s)?

Should the multiresolution levels tile sizes be the same that we have been using in the mobile tab or is it safe to use the power of 2 rule described by Jim?

The same question applies to the use of the Flash fallback player (instead of the Flash fallback file).
Does this mean that we can say goodbye to the Flash format once and for all?

Thanks in advance for your recommendations.
User avatar
Hopki
Gnome
Posts: 13005
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi,
Jim is the Dungeon Master when it come to pixels so his advice is sound.
Multi resolution is far better then using the mobile tab for many reasons but for me its because it looks at logical screen size rather than actual screen size.
Example the iPad Air's logical screen size is 1024 x 760.
The opening multi resolution level will be looking at this and load sensible quality tiles and not the 2048 x 1536 which will take a long time to download an then crash Safari.

However as you zoom in it will load high quality tiles, with a fixed mobile setting it is what it is and can't get any better.
Regards,
Hopki
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
cesarp
Posts: 21
Joined: Tue Jul 07, 2009 6:14 pm

Thanks Hopki,

Everything is getting clearer now. I'll make some tests and keep investigating,

Best regards
Post Reply