You are not logged in.

1

Sunday, October 28th 2018, 12:08am

obj360, OBJECT360, HTML5/Flash + VR multires object plugin

Since krpano moved to HTML5 there is missing a plugin supporting the "360-degree object rotation" to panoramas. I created one - obj360.xml - and it is running as distorted hotspot in krpano panorama here https://pavel.ursiny.sk/pano/Art/ZORICAK…rs.i18n_lang=en

Features:
- HTML5 and Flash compatible;
- supports multilevel resolution of the object frames;
- it's possible to set resolution levels by device e.g. desktop, tablet, mobile;
- rotation is done by button(s), slider or mouse +autorotate;
- done for distorted hotspots of zoom-able panorama;
- during zoom-in the image of higher resolution is downloaded;
- when rotating the lower resolution level of the frames is used;
- multiple objects per one scene of pano;
- supports all skins of skin/vtourskin.xml options (try "Change Skin" item of the context menu);

How I use it?
- using Klaus' tutorial
I aligned the first frame of the object in PTGui;
- loaded all frames into the PTGui and linked all loaded frames to the first one and unlinked them back (in the Image Parameters Tab).
- saved each frame in [Create Panorama] tab of PTGui in 4 different resolutiions
(Width=512, 1024, 2048 and 4096 pixels) in 0k, 1k, 2k and 4k directiories where the first frame starts with number 0;
- using krpano scene I create a "master" hotspot, which is aligned to the scene and set obj360 plugin attributes e.g for obj01:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
 <hotspot name="obj01" 
            style="obj360_hotspot_style" 
            title="get:i18n.scene_A.key[obj01].txt" 
            url="%SWFPATH%/objects/obj01/0k/0.jpg" 
            url.mobile="%SWFPATH%/objects/obj01/0k/0.jpg" 

            frameurl_0k="%SWFPATH%/objects/obj01/0k/%f.jpg" 
            frameurl_1k="%SWFPATH%/objects/obj01/1k/%f.jpg" 
            frameurl_2k="%SWFPATH%/objects/obj01/2k/%f.jpg" 
            frameurl_4k="%SWFPATH%/objects/obj01/4k/%f.jpg" 

            framecount="32" 
            framemoveright="prev" 
            framecontrol_btn_oy="30" 
            framecontrol_slider_oy="70" 
            framecontrol_ox="-35%|50%" 

            rotateinterval="1.0" 
            framefov="25" 
            onloaded2="obj360_pos_from_hfov_yaw_pitch_roll(13, -143, 0,    0);" 
            />


- tested in Flashplayer AND html5 on Win7 + FireFOx63.0 | Chrome70.0 | IE11.0; iMAC OSX 10.9.5 + Safari 9.3.1; iPad 9.3.5. + Safari; iPhone 5S
For me it works well.

What's next?
- to test on VR devices (I don't have) and other platforms;
- to enhance obj360.xml with:
- skin_settings.obj360 params...
- framenr %f in the frameurl with leading zeroes;
- create some blending options for the frame loading in slideshow;
- try to make the tiled images of the frames. By now it works in JIT mode (Just In Time) - no preload.
- to create an MAKE OBJECT script

When you find interesting this plugin I can create an official plugin, too. Depends on the feedback here.

My thanks goes to you Klaus for upgrading krpano and posting actual code with examples, to San7, Alexey, Leszek, Jordi, Mael, and many of you who are sharing ideas, knowledge and code. Thanks to God for giving me perseverance to go through all issues when hitting the wall.
Enjoy!
Pavel

I am attaching the plugin "AS IS" used in the example. Please note that the object location is in the /object/ directory.
pur has attached the following file:
  • obj360.zip (13.12 kB - 32 times downloaded - latest: May 19th 2019, 1:30pm)

This post has been edited 1 times, last edit by "pur" (Jan 26th 2019, 8:23pm)


fotojehle

Beginner

Posts: 29

Location: Pleigne

Occupation: Fotograf

  • Send private message

2

Tuesday, November 13th 2018, 4:49pm

looks great

Very interesting and great example. Looking forward for the release

3

Saturday, January 26th 2019, 8:25pm

Fotojehle and Fernando,
Thank you for your posibive feedback.
pur

Fernando

Intermediate

Posts: 202

Location: Habana, Cuba

Occupation: Architect, Photographer, Programmer.

  • Send private message

4

Wednesday, January 30th 2019, 3:21pm

Hi Pur, Thanks very much for sharing your code. Very interesting example!!
Best Regards,
Fernando