General workflow questions

Q&A about the latest versions
Post Reply
RockHunter
Posts: 20
Joined: Thu Jan 30, 2020 4:29 pm

Hello,

I've taken over from a colleague at work who's moved on, and I'm trying to dive into Pano2VR and optimize our workflow. so I have a few general questions as to what's best practice.

We produce Panoramas from photography and from CGIs (rendered). While the Photographic route automatically produces equirectangular panos, (PTGui) we have a free choice as to how we render CGIs.

I understand that Pano2Vr converts input images to cubeface projections so it would seem better to generate CGIs as cubefaces, as this will avoid (lossy) remapping of images on export. Is that correct? It seems that both web and VR/headset outputs use the same cubemaps.

Furthermore, VR headsets limit resolution to 2048px per face, so there's no benefit to produce images larger than 4 x 2048px = 8192px?

Which brings me onto the questions of the "preferences setting" Advanced > "Use width/Pi as a conversion factor". What does this setting affect exactly?
For a VR/headset output, I've set the Output>Image to "Single Res" with a cubeface size of 2048px. With an 8192px input image, there should be no re-sampling/mapping, just "cutting" the input image into individual faces. Is that how it works?

So what about output to web, where I can use multires images with higher input/output resolution of panoramas? How do I use the Preferences > Advanced>"Use width/Pi as a conversion factor" setting to understand at what resolution the output files will be generated? My guess is, with the setting set to "off", the calculation is "width/4". So say I have an input file of 25000px, and set the "Level Tile Size" to 510px, and set the highest level to 4080px in "manual" mode, the highest level resulting panorama would be:
4080px / 510px = 8 tiles/cubeface
Final pano = 8 tiles x 4 cubefaces = 32 tiles = 32 x 510px = 16320px wide.

I know that's a lot of questions, but hopefully the answers will help to clarify these considerations for others as well. I'd like to streamline the production, so it seems important to understand the inputs/outputs.

kind regards,
Wolfgang
User avatar
Tony
Posts: 1342
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Hi Wolfgang,

I hope I can help with your enquiry :)
I understand that Pano2Vr converts input images to cubeface projections so it would seem better to generate CGIs as cubefaces, as this will avoid (lossy) remapping of images on export. Is that correct?
Yes, if you are generating the cubeface projections directly from the CGI software application then they will not have undergone any remapping. Remember, that even though you are generating them directly from the CGI application, you are still using a JPEG Compression algorithm which is an inherently lossy process. You may want to consider creating and saving lossless Tiff files, for backup or other uses, and then using Pano2VR to create the cube faces later in the workflow process.
It seems that both web and VR/headset outputs use the same cubemaps.
Yes
Furthermore, VR headsets limit resolution to 2048px per face, so there's no benefit to produce images larger than 4 x 2048px = 8192px?
In regard to publishing on TourViewer yes. However if you want to publish on other platforms such as the web you may want to reconsider using Multi-resolution instead of Cube Faces. As per TourViewer documentation you can use multi-resolution as long as you have a 1536 or 2048 level.
Which brings me onto the questions of the "preferences setting" Advanced > "Use width/Pi as a conversion factor". What does this setting affect exactly?
Here's where I'm a bit in the dark. As I understand it Pi is the ratio of a circle's circumference to its diameter. So using the width of an equirectangular image divide by 3.14159 (Pi) obtains a value that can then be used to calculate a number of tile sizes. I'm not sure what the effect of turning it off is aside from creating more tiles than the Pi version does.

If you take a look at my tutorial, An Unexpected Benefit of Multi-Resolution in Pano2VR projects - Part 1 https://tonyredhead.com/pano2vr/unexpec ... efit-part1 halfway down the page I have an interactive form that calculates Tile Level Sizes using the width/Pi algorithm.

Note: This version of the calculator sets an automatic Tile Size based on the longest dimension of the equirectangular image.

To open the calculator directly you can use this link https://s3-ap-southeast-2.amazonaws.com ... index.html

In fact there are two "Use width/Pi" settings in Preferences/Advanced. The first is under Output: and it's "Use width/Pi as output factor" and the second is under Remapping: and it's "Use width/Pi as conversion factor".

My best guess here is that the two options related to whether or not you want to use the function width/Pi with each particular setting and you can turn on or off either one.
For a VR/headset output, I've set the Output>Image to "Single Res" with a cubeface size of 2048px. With an 8192px input image, there should be no re-sampling/mapping, just "cutting" the input image into individual faces. Is that how it works?
There will be no resizing of the cube faces however depending upon the JPG compression settings you may loose some resolution. In this case you would be better outputting from a lossless Tiff file of 8192px.
So what about output to web, where I can use multires images with higher input/output resolution of panoramas? How do I use the Preferences > Advanced>"Use width/Pi as a conversion factor" setting to understand at what resolution the output files will be generated? My guess is, with the setting set to "off", the calculation is "width/4". So say I have an input file of 25000px, and set the "Level Tile Size" to 510px, and set the highest level to 4080px in "manual" mode, the highest level resulting panorama would be:
4080px / 510px = 8 tiles/cubeface
Final pano = 8 tiles x 4 cubefaces = 32 tiles = 32 x 510px = 16320px wide.
If you wanted to create a multi-resolution output, maintaining the quality of the image without remapping, you would need an input file of 25,735px a Tile Size of 512 this would give you a number of levels e.g 4096 | 2048 | 1536 | 1024 | 512. I'm not quite sure why TourViewer use a tile size of 510 ?

There is an interesting thread you might like to read that deals with calculating file sizes for multiresolution panoramas before Pano2VR had automated the process. viewtopic.php?f=6&t=8526&p=37302&hilit= ... ing#p37302

Hope this makes some sense :?

cheers,

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
User avatar
Tony
Posts: 1342
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

I've just created another calculator that has defined level sizes but allows you to change the Tile size and see the suitable panorama width.

I think I've got the math right but I need to test.

Here it is https://p2vrtutorials.s3-ap-southeast-2 ... -size.html

Tony

Update: I've done some testing and it seems to be right. I can output tiles and compare them to the original file and they are the same size.
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
RockHunter
Posts: 20
Joined: Thu Jan 30, 2020 4:29 pm

Tony,

Thank you so much for the detailed explanations. I've seen your "unexpected" calculator in the forum as I was searching for answers, and your write up helped me a lot in understanding how the whole process of outputting images works.

I hadn't realized that there were two settings in the preferences for width calculations. Would be interesting to find out if these preferences are saved with the project files, of if loading the project on another workstation might yield a different result.

I would hazard a guess that the VRTourviewer tile size of 510px is not actually the image size - I think it's "net pixel size" as they include 1px edge for overlap, so the "gross pixel size" of the canvas is still 512px.

There might be another good reason to render Directly into cubeface maps from 3D, I believe that the memory consumption for a cube map is far more beneficial than for an equirectangular projection (cubemap has 75% of the net pixels of an equirectangular map.)

Kind regards,
Wolfgang
Post Reply