How to implement three js panorama viewer with multi resolution images, Like pannellum:https://pannellum.org/documentation/examples/multiresolution/.
Current code is here using three.js:(//codepen.io/w3core/pen/vEVWML
).
- From equirectangular image to panoroma viewer.
- I have faced problem for high resolution images, takes long time to render.
- When i seek some solution pannelum and Kprano solved this case by loading multi resolution images instead of single images.
So i tried to do loading multi resolution images instead of single equirectangular image.
Solution i tried below:
Converting single equirectangular image to low resolution 6-cube map images.
And render those images like this sample. (https://threejs.org/examples/canvas_geometry_panorama.html)
var materials = [ loadTexture('px.jpg'), // right loadTexture('nx.jpg'), // left loadTexture('py.jpg'), // top loadTexture('ny.jpg'), // bottom loadTexture('pz.jpg'), // back loadTexture('nz.jpg') // front ]; mesh = new THREE.Mesh(new THREE.BoxGeometry(300, 300, 300, 7, 7, 7), materials); mesh.scale.x = -1; scene.add(mesh);
If zooming in any cube map image, i need to render my another medium level resolution images.
Struck here
How to proceed below things
- How to render next level resolution images when zooming.
In Below sample zoom image...
I have made zoom 0 level but i couldnt make rendering zoom1,2,3 etc.
Zoom : 0(Example of low resolution cube map front image)
Zoom: 1 (When zooming , Need to render next set of medium level resolution tile front images like below)
Zoom : 3 (When zooming further, Need to render next set of high level resolution tile front images like below)
Zoom : 4 (When zooming , Need to render next set of very high level resolution tile front images like below)