Using demos with Marzipano Tool (WEBVR) with own images

2,485 views
Skip to first unread message

Net Acc

unread,
Sep 19, 2016, 3:27:54 AM9/19/16
to marzipano
I just can't figure out how can I use Marzipano Tool to see my own images in WebVR.

Other option is to directly change source code and give path of images on local drive. I am using WAMP.
I looked the source code but can't understand where should I put my images and which format/size should it be. Any guidance
%% function
createLayer(stage, view, geometry, eye, rect) {
var urlPrefix = "//www.marzipano.net/media/music-room";
var source = new Marzipano.ImageUrlSource.fromString(
urlPrefix + "/" + eye + "/{z}/{f}/{y}/{x}.jpg",
{ cubeMapPreviewUrl: urlPrefix + "/" + eye + "/preview.jpg" });
%%


Net Acc

unread,
Sep 23, 2016, 3:00:09 AM9/23/16
to marzipano
Can someone plz reply and tell how can I add my own image path it....thank you.

Manuel Cabral

unread,
Sep 23, 2016, 11:21:30 AM9/23/16
to marzipano
Hi,

The Marzipano Tool does not support WebVR I'm afraid. There is a demo of Marzipano with WebVR, but there are no plans to add this to the Tool.

Net Acc

unread,
Sep 27, 2016, 2:54:19 AM9/27/16
to marzipano

Hi,
thanks for your reply. I'm asking the way to set path for my own images and how they are prepared etc...

Net Acc

unread,
Jan 5, 2017, 4:46:27 AM1/5/17
to marzipano
Hi,


There is a demo of Marzipano with WebVR, but there are no plans to add this to the Tool.

How can I add my images in WebVr. I need to see my own project images in side by side  vr.

Manuel Cabral

unread,
Jan 5, 2017, 12:13:29 PM1/5/17
to Net Acc, marzipano
Hi,

The easiest is to take the WebVR demo and change the urls in createLayer() to your tiles. To generate the tiles from your images you can use the Marzipano Tool.

All the best,
Manuel

--
You received this message because you are subscribed to the Google Groups "marzipano" group.
To unsubscribe from this group and stop receiving emails from it, send an email to marzipano+unsubscribe@googlegroups.com.
To post to this group, send email to marz...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/marzipano/1bf90bf4-1780-4ad3-bb90-2e2fd33099ad%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

VRAcc

unread,
Jan 6, 2017, 4:06:47 AM1/6/17
to marzipano
Thank you for this kind reply. But being beginer I can't figure out this path.

I did the following.

1. Using Marzipano Tool got cube images.

images are

C:\wamp\www\VRTOOLS\demos\side-by-side\tiles 

I have done nothing with images. I just copied  tiles folder in my directory 

C:\wamp\www\VRTOOLS\demos\side-by-side


I changed

function createLayer(stage, view, geometry, eye, rect) {
var urlPrefix = "//www.marzipano.net/media/music-room";
var source = new Marzipano.ImageUrlSource.fromString(
urlPrefix + "/" + eye + "/{z}/{f}/{y}/{x}.jpg",
{ cubeMapPreviewUrl: urlPrefix + "/" + eye + "/preview.jpg" }); to

function createLayer(stage, view, geometry, eye, rect) {
  var source = new Marzipano.ImageUrlSource.fromString(
   "tiles/" + eye + "/{z}/{f}/{y}/{x}.jpg",
    { cubeMapPreviewUrl: "tiles/" + eye + "/preview.jpg" });


I copied marzipano.js from  directory vendor   

and I changed

<script src="../../build/marzipano.js" ></script> to

<script src="marzipano.js"></script>


Opend

But no success. All I get is blank page.

Any help??
 What should I do more?????????

Thank u in advance.



To unsubscribe from this group and stop receiving emails from it, send an email to marzipano+...@googlegroups.com.

To post to this group, send email to marz...@googlegroups.com.
VRweb.JPG
index.js
index.html

Štěpán Kukliš

unread,
Jan 6, 2017, 6:23:42 AM1/6/17
to marzipano
Hi, I would try looking into console in developer tools for errors.

Stepan

Dne pátek 6. ledna 2017 10:06:47 UTC+1 VRAcc napsal(a):

VRAcc

unread,
Jan 6, 2017, 7:56:52 AM1/6/17
to marzipano
thank....Attached please find my log file. The real reason is that I cannot set path of images and honestly i don't know how to do it. Can some one please upload demo image tiles folder. 
-1483707222038.log

Štěpán Kukliš

unread,
Jan 6, 2017, 8:22:45 AM1/6/17
to marzipano
I used power of mighty google -> http://stackoverflow.com/a/27063551 try it.

Stepan

Dne pátek 6. ledna 2017 13:56:52 UTC+1 VRAcc napsal(a):

VRAcc

unread,
Jan 6, 2017, 8:39:44 AM1/6/17
to marzipano

I do not follow you. My problem ist image path and how to generate these images. see attached image. I put two preview images in left and right folder . It worked . As I told I used marzitool to generate 6 cube images but this code need something other.

I cannot figure out it my self. Can you provide my one sample data.
errors.JPG

Štěpán Kukliš

unread,
Jan 6, 2017, 9:35:58 AM1/6/17
to marzipano
Im sorry I must have misread you somehow.
So you want to know how to generate cubetiles from equirectangular panoramas? I use hugin/panotools toolset.
Or if you alreade have generated them? then just use this format tiles/right/zoom_level/face/y/x.jpg .


Stepan


Dne pátek 6. ledna 2017 14:39:44 UTC+1 VRAcc napsal(a):

VRAcc

unread,
Jan 7, 2017, 6:02:54 AM1/7/17
to marzipano

Štěpán Kukliš

unread,
Jan 7, 2017, 6:37:18 AM1/7/17
to marzipano
I think you need 2 images, for 2 cameras/eyes to make stereography, maybe thats the root cause of our mutual confusion (or Im understanding side-by-side wrong).

X and Y is pretty simple - look at this http://panpanika.eu/repo/tiles_x_y.jpg
This is one cubeface (you project to sdies of cube from inside), this is maximum cubetile marzipano handles, zoom_level 5, in browser its much better to serve many small images, than one big, so you cut this to squares with side 512px, counted 0 based from topleft corner, so white number is X and green number is Y.

you send equirectangular projection file, to convert this to cubetiles you can usu hugin/panotools toolset
the nona tool, is reimplementation of panotools stitcher, to get front (f) cubetile you have to do:

"C:\Program Files\Hugin\bin\nona.exe" -o C:\path\to\cubetiles\cube_front_4k C:\path\to\hugin\scripts\cubetiles_front.txt



in cubetiles_front.txt


# generate cube front face
p f0 w4096 h4096 v90 n
"TIFF_m c:LZW r:CROP"
m g1 i2 f0 m0
o w16384 h8192 f4 p90 r0 v360 y0  u10 m0 n
"C:\path\to\equirectangular_image.jpg"

the r, p, y are roll pitch yaw coordinates in spheric projection, value is right next to variable name without whitespace, for other faces you need to set for faces f,b,l,r,u,d

r0 p0 y0
r0 p0 y180
r0 p0 y90
r0 p0 y270
r0 p270 y0
r0 p90 y0

then you need crop and size individual faces by zoom_levels, this script makes you maximal size face with side 4096 so you need 8x8 tiles (zoom_level=4).
smaller zoom levels are
3 2048 4x4tiles
2 1024 2x2tiles
1 512 1x1tile
0(preview) - this is halftiles (256px side) composited from top to bottom in one image in order - f,b,l,r,u,d and is saved in tiles/pano_id/preview.jpg

is that clear? english is not my native tongue as you can probably guess, so ask and I will clarify if I know it :)

Stepan


Dne sobota 7. ledna 2017 12:02:54 UTC+1 VRAcc napsal(a):

Štěpán Kukliš

unread,
Jan 7, 2017, 6:47:53 AM1/7/17
to marzipano
and I realized one small correction, I think there no reason why marzipano itself will not handle bigger zoom level than 4, its marzipano tool limitation. But I didnt tested (or needed) cubefaces bigger then 4096px.

also I think tile size and therefore all relative numbers can be changed in index.js, but I think 512px is ok.

Stepan

Dne sobota 7. ledna 2017 12:37:18 UTC+1 Štěpán Kukliš napsal(a):
Reply all
Reply to author
Forward
0 new messages