Hi Klaus,
great release, as always Does the 1.19 use WebGL-Hotspots or still CSS3D?
Thanks and best regards,
Nupsi
Hi Klaus,
great release, as always Does the 1.19 use WebGL-Hotspots or still CSS3D?
Thanks and best regards,
Nupsi
Does the 1.19 use WebGL-Hotspots or still CSS3D?
The pre-releases are using CSS3D by default for normal rendering and WebGL when stereo-rendering.
WebGL support for hotspots could be enabled manually for normal rendering this way:
<!-- TEMP PRE-RELEASE STUFF -->
<display hotspotrenderer="webgl" devices="html5" /> <!-- force using WebGL for the hotspots -->
<view continuousupdates="true" devices="html5" /> <!-- constantly update the screen (required for WebGL hotspots for the moment) -->
<!-- TEMP PRE-RELEASE STUFF -->
Note - the hotspot WebGL support is currently not finished in the pre-releases (e.g. clicking the hotspots will be not possible).
But with the final 1.19 release the hotspots will be rendered by WebGL by default.
Best regards,
Klaus
But with the final 1.19 release the hotspots will be rendered by WebGL by default.
Thats sounds great. Would it be possible to integrate a API to modify the hotspot texture with WebGL as descriped here? http://learningwebgl.com/blog/?p=1786
What exactly do you mean or what do you want to do?
An API for using a custom framebuffer as hotspot texture?
When I enter VR mode on my phone it goes to the rotate phone image, I then rotate phone but it does not go into stereoscopic mode. I then hit "exit VR" then hit "enter VR" again and it then goes to stereoscopic but in vertical orientation. What am I doing wrong? I've tried in both Safari and Chrome, iOS 8.4.1, iPhone6. I would like it to go into stereoscopic mode the first time I hit "enter VR" and in the horizontal view not vertical.
Any help would be appreciated.
Try using the vtourskin.xml from 1.19 pre-release 3.
What exactly do you mean or what do you want to do?
An API for using a custom framebuffer as hotspot texture?
Exactly. I want to replace the image of the hotspot with an dynamic texture, which I can control with javascript.
With new parser handling styles we have situation that you have hotspot_1 with style="style_1" if we have loadstyle="style_2" in memory this hotspot is not having style_1 anymore.
Best example is: arrows hotspots with style skin_hotspotstyle, where skin_tooltips is loaded in case user want tooltips. From that moment style of the hotspot is not skin_hotspotstyle but skin_tooltips.
I had to make memory tweaking for this.
for(set(i,0), i LT hotspot.count, inc(i),
if(hotspot[get(i)].linkedscene,if(hotspot[get(i)].style EQ 'skin_tooltips', set(hotspot[get(i)].style,'skin_hotspotstyle');););
);
Do you have better proposal as I need to keep initial style of the elements?
I think you have a bug there, you can't set style, you must .loadstyle(style);
a bit syntactically different. Or did something change?
You can still have style as before but the handling is different now. First style attributes are taken in consideration and in case element attribute is same as in style than it is overwritten in memory.
https://krpano.com/docu/xml/#style
But this is not the point. If attribute style is defined on element (hotspot, layer....) and later on you have loadstyle(another style) than in memory attribute style of the element is not as defined at start but the style loaded with loadstyle.
New style handling is ok but question is why loadstyle is overwriting style attribute.
Try using the vtourskin.xml from 1.19 pre-release 3.
Klauss, just replaced the vtourskin.xml and the webvr files with the files from 1.19-pr3 and it is now not displaying stereoscopic at all. I'm confused as to what I'm doing wrong here. Thanks for your help.
hi,
when i look on a mobile (iphone 6) the webvr is just there.
But on desktop fake device url mobile not.
without fake device in url yes
Tuur
Hi,
but question is why loadstyle is overwriting style attribute.
Hmm... with which version do you compare?
When calling loadstyle() the new 'style' value will be the one that was given in the loadstyle call. But that was the same in the previous versions...
Klauss, just replaced the vtourskin.xml and the webvr files with the files from 1.19-pr3 and it is now not displaying stereoscopic at all. I'm confused as to what I'm doing wrong here. Thanks for your help.
Your colorrun.xml is wrong - you are including there the webvr.xml (and an additionally gyro - why?) and this changes/overwrites the WebVR settings that were made in the vtourskin.xml.
Please don't try adding xml code in an 'experimental way', as you can see this leads to non or wrong working stuff. Either remove the webvr.xml and the gyro from the xml or use the default output xml code.
Best regards,
Klaus
Exactly. I want to replace the image of the hotspot with an dynamic texture, which I can control with javascript.
I haven't tested that case, but that should be already possible. The necessary interfaces (or exposed properties) are already there:
Inside krpano plugins it's possible to access the krpano WebGL context and also the WebGL texture of the hotspots.
The WebGL context could be get via:
if (krpano.webGL)
{
// have WebGL support
// get the WebGL context
var gl = krpano.webGL.context;
}
and the WebGL texture of a hotspot via:
/ get the hotspot
var hotspot = krpano.get("hotspot[NAME]");
// get the hotspot WebGL texture (only possible when the texture was at least once rendered via WebGL)
if (hotspot.GL)
{
var texture = hotspot.GL.tex;
if (texture)
{
// do some stuff with the texture - e.g. bind it to a custom framebuffer:
gl.bindTexture(gl.TEXTURE_2D, texture);
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, your_tex_width, your_tex_height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
gl.bindFramebuffer(gl.FRAMEBUFFER, your_framebuffer);
gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);
gl.bindFramebuffer(gl.FRAMEBUFFER, null);
gl.bindTexture(gl.TEXTURE_2D, null);
}
}
Display More
Btw - when working with WebGL there is one thing to consider - when changing any WebGL state, it's necessary to restore them when the work is done, otherwise the following krpano WebGL code might not work.
For getting even more insight I would recommend looking at the source of this example:
Use three.js (3d objects) inside krpano (with VR support)
Best regards,
Klaus
Your colorrun.xml is wrong - you are including there the webvr.xml (and an additionally gyro - why?) and this changes/overwrites the WebVR settings that were made in the vtourskin.xml.
Please don't try adding xml code in an 'experimental way', as you can see this leads to non or wrong working stuff. Either remove the webvr.xml and the gyro from the xml or use the default output xml code.
Best regards,
Klaus
Klauss,
Sorry for the confusion. I have removed the reference to the webvr.xml file in all my tours. I did remove the <plugin name="gyro" url="gyro.js" keep="true" enabled="true" camroll="false" friction="0.5" velastic="0" /> from the xml file, but then the gyro will not work unless in VR mode. I would like to keep the gyro functionality in the tour when not in VR mode.
My main issue is I can not get my still tours in stereoscopic mode when I enter VR mode. My video tours will give me stereoscopic mode, but only in portrait mode?
Hi Klaus,
Ive discovered a possible bug.
Givens this code:
<krpano onstart="loadscene(demo)">
<scene name="demo">
<preview type="grid(CUBE,16,16,512,0xCCCCCC,0xFFFFFF,0x999999);" />
<!-- Not showing on flash -->
<style name="popup_hotspot_style" url="%SWFPATH%/skin/images/info.png" keep="true" />
<hotspot style="popup_hotspot_style" ath="-30" atv="0" />
<!-- Showing on flash -->
<hotspot url="%SWFPATH%/skin/images/info.png" ath="30" atv="0" />
<!-- showing on flash but alpha is not applied -->
<style name="popup_hotspot_style1" alpha="0.5" keep="true" />
<hotspot style="popup_hotspot_style1" ath="-60" atv="0" url="%SWFPATH%/skin/images/info.png" />
<!-- Works on flash -->
<hotspot onloaded="loadstyle(popup_hotspot_style1)" ath="-90" atv="0" url="%SWFPATH%/skin/images/info.png" />
</scene>
</krpano>
Display More
On webgl all hotspots are shown. But on the Flash version, it doesnt apply the style. Ive tried adding preload and keep and flipping around where the style is defined, but cant get it to work. Issue on all browsers Running flash 18.0.0.232
Update, when I looped the hotspots and get the 'style' I got null back. But when I named my hotspots, it suddenly started loading the styles. So atleast I can work around this bug.
Hi!
Thanks for another great release!
Is there any way at the moment to "zoom" the view of a pano while being in VR?
I was actually able to fake a zoom by lowering the mobilevr_lens_fov, but the image quality degrades quite a lot, even if I'm loading a multires image.
So I guess I must be doing something wrong..
Namastè.
Thanks Klaus for this release!
Does anyone know if it is possible to display a hotspot solely in left (or right) part of the screen in VR mode?
@VVZen
Do you want to zoom in a specific object or the image ?
Best regards.
VVZen
Do you want to zoom in a specific object or the image ?
I'd like to have the actual pano zoomed!
Thanks.
Don't change the lens_fov ! Act on the <view> fov with zoom buttons displayed as distorted hotspots for instance.
Don’t have an account yet? Register yourself now and be a part of our community!