Converts a spherical panorama image into a cube map faces/tile tree and creates .html file to render it within browsers.
Directly supported viewers (html generation):
clone this repo
-
Clone the project with git (or download as archive and extract).
-
Execute in this directory (this means: the directory of this readme file):
mvn clean install
From core/target directory take the jar and make it available in your path. Then run (version number may different):
java -jar sphere2cube-java-core-0.0.1-SNAPSHOT-exec.jar [parameters]
Default name is "sphere2cube.json"
Example (at least change source.path for input file, everything else may be ok):
{
"debug": false,
"source": {
"path": "/home/l/prj/panos/IMG_1766_S(168.00x25.63(8.99)).psb"
},
"target": "./target",
"preview": {
"cubemap": {
"enabled": true,
"edge": 200,
"target": "preview_cube.jpg"
},
"equirectangular": {
"enabled": true,
"edge": 800,
"target": "preview_equirectangular.jpg"
},
"scaled": {
"enabled": true,
"edge": 800,
"target": "preview_scaled.jpg"
}
},
"cubemap": {
"tiles": {
"enabled": true,
"tileEdge": 512,
"target": "{{levelCount}}/{{faceNameShortLowerCase}}{{xIndex}}_{{yIndex}}.png"
},
"faces": {
"enabled": false,
"target": "{{faceNameLowerCase}}_{{levelCount}}.png"
}
},
"viewer": {
"pannellum": {
"enabled": true,
"title": "cube2sphere - Pannellum",
"target": "index.p.html",
"js": [
"https://cdn.jsdelivr.net/npm/[email protected]/build/pannellum.js"
],
"css": [
"https://cdn.jsdelivr.net/npm/[email protected]/build/pannellum.css"
]
},
"marzipano": {
"enabled": true,
"title": "cube2sphere - Marzipano",
"target": "index.m.html",
"js": [
"https://cdn.jsdelivr.net/npm/[email protected]/dist/marzipano.min.js"
],
"css": [
"https://www.marzipano.net/demos/sample-tour/style.css"
]
}
},
"archive": {
"enabled": true,
"target": "pano.zip"
}
}
- https://stackoverflow.com/questions/29678510/convert-21-equirectangular-panorama-to-cube-map/29681646#29681646
- https://github.com/jaxry/panorama-to-cubemap/blob/gh-pages/convert.js
- https://developers.google.com/streetview/spherical-metadata
- https://download.kolor.com/apg/stable/history
- More differentiated logging
- Progress bar
- Timer
- Marzipano viewer
- read embedded xml of Autopano Giga
- restrict view angle dependent from source image bounds
- Add css and js from viewers instead link to CDN
- zip file packing (multithreaded)
- simple drop-target UI
- Add configuration options to UI
-
maven pluginthat doesn't make too much sense - self containing application
- Populate README
- Panorama description file
- output image paging for images that are too big to fit in memory
- input image paging for images that are too big to fit in memory