You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Saturday, February 22nd 2020, 7:13pm

Multi row object movies

Many thanks for the multi row object movie skin. It still works
with krpano 1.20! However, I'd like to know whether it could be
enhanced:
  • It flickers while the images are not yet
    loaded completely. Apparently an image is cleared, even if the next
    image is not yet available. Could that be changed or is there a
    possibility to preload images? Would it be worthwhile to preload them
    using javascript?
  • The controls on the sides of the movie are
    fixed size. Is it possible to have them always a certain percentage of
    the stage dimensions? I tried to set width and height as percentages with only
    limited success.

Background: I'm currently working on
extending my qtkrparse PHP script to work for Quicktime object movies as
well. This especially to make the otherwise hard to access
contributions in the WWP archive available for modern computers.
Currently it works like this: Multi row example , single row example. I'd like to have them working as smooth as when all images are loaded and would appreciate any help, especially since I'm pretty new to krpano scripting.
Thanks in advance
Erik

2

Sunday, February 23rd 2020, 12:21pm

Hi,

this is known.

Since version 1.20 the image.frame features is indeed supported now, but there is no special loading strategy/management for it yet. That will come with one of the following versions.

About controls - I'm not sure what you mean now, but as they are simple layers any size and behavior should be possible.

Best regards,
Klaus

3

Sunday, February 23rd 2020, 12:46pm

hi klaus,

i checked that in the docs ...
https://krpano.com/docu/xml/#image.frames

how would you add multiple frames... like this for example ?

Source code

1
2
3
4
5
	<image>
		<cube url="test.tiles/pano_%s_%f.jpg" />
		<cube url="test.tiles/pano_%s_%f.jpg" />
		<cube url="test.tiles/pano_%s_%f.jpg" />
	</image>


and then simply
set(image.frame,2);
would load that frame, while still being in the same scene?

ps. default for image.frame is really 1, not 0 ?

4

Sunday, February 23rd 2020, 1:35pm

About controls - I'm not sure what you mean now, but as they are simple layers any size and behavior should be possible.
The arrows, that appear on the sides of the stage if the mouse is moved there. Best visible in the single row example.

Tuur

Sage

Posts: 3,325

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

5

Sunday, February 23rd 2020, 1:56pm

Erik,

Did you try like width=“3%” height=“prop”
or vise versa
?

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

6

Sunday, February 23rd 2020, 3:13pm

Did you try like width=“3%” height=“prop”
Didn't know about 'prop'. With this it should be possible to do it. Thanks!

7

Sunday, February 23rd 2020, 3:47pm

I tried the following code for preloading.


Source code

1
2
3
4
5
6
7
8
9
<action name='preloadimage'>		addplugin(pre_%1);		set(plugin[pre_%1].visible, false);
		set(plugin[pre_%1].onloaded, trace(preload %1 done);removeplugin(pre_%1) );
		set(plugin[pre_%1].url, /qtkrparse.php/tile.jpg?mov=$file&amp;action=tile&amp;x_ofs=%1&amp;y_ofs=0) );
	</action>

	<action name='preloadimages'>
		trace(starting loop);
		for(set(i,0), i LT $stsz_num, inc(i), preloadimage(get(i)) );	
	</action>

It sort of works, images are visible immediately, but there is still flicker, at least for the first round. Seems like the flicker is caused by the transfer into the internal buffer. Any idea how I can preload directly into a frame? Or use layers directly for the object movie?

8

Monday, February 24th 2020, 2:46pm

I now use the approach from this thread. (Thanks Tuur for pointing me too that off list). However, as soon as it starts moving the images are loaded a second time. What could be causing this? See it working here. I use this code for preloading the images:

Source code

1
2
3
4
5
6
7
8
9
10
11
<action name='preloadimage'>
		addplugin(pre_%1);
		set(plugin[pre_%1].keep,true);
		set(plugin[pre_%1].visible,false);
		set(plugin[pre_%1].enabled,false);
		set(plugin[pre_%1].align,'center');
		set(plugin[pre_%1].handcursor,false);
		set(plugin[pre_%1].onloaded, "updateframesize(get(name)); ");
		txtadd(fname, '/qtkrparse.php/tile.jpg?mov=', get(objectvr.mov), '&amp;action=tile&amp;x_ofs=%1&amp;y_ofs=0');
		copy(plugin[pre_%1].url, fname );	
	</action>

9

Monday, February 24th 2020, 7:59pm

I suspected the visibility toggle to be the cause for the double loading, hence I tried to toggle alpha instead. This fixed the flickering, but double loading still happens. I assume now that this is a bug. Even a minimal XML file like this one causes the image to be loaded twice.

Source code

1
2
3
<krpano version='1.20.4' >
 	<layer url='/image.jpg' />
</krpano>