png file with transparency in flat panoramas
-
-
Hi,
transparent pano-images are currently not supported.
But they are already added as features request - and will be supported in one of the next releases.
Best regards,
Klaus -
Hello! Thanks for the info!
Interestingly, in the previous version there was support for opening a flat panorama in the layer type="krpano" with transparency -
Hi,
no, that was always the same in all versions...
That's because krpano originally uses the 'painter algorithm' to draw overlapping tiles from multiple-resolutions (e.g. draw first the low-res tile and the high-res tile over it) - and that doesn't work with transparent images. So that was always disabled, the core internal tile shaders are even skipping the alpha-channel when rendering.
But krpano offers now also a second rendering algorithm - when a depthbuffer is available (which is typically today), the tiles get rendered from high-resolution to low-resolution and in this case the usage of the depthbuffer avoid the over-draw of overlapping tiles. With that rendering-method, transparent multires-rendering should be possible.
That means adding support for transparent panos, should be now not that big thing and therefore will be added in one of the next releases.
But then I will try to add transparent support also to the tools.When it was working previously, you were either using CSS3D-rendering or using a hotspot or layer... but that should still work as before...
Best regards,
Klaus -
Klaus, thanks for the detailed explanation!
I just want to give an example that I talked about in version 1.20.11
Code<layer name="box" type="krpano" align="center" width="400" height="400" bgalpha="0" bgroundedge="7" bgshadow="0 4 20 0x000000 0.25" onloaded="showpano('plan.png');" /> <action name="showpano" type="Javascript"><![CDATA[ var plan= caller.krpano; plan.image.reset(); plan.image.flat = {url: args[1]}; plan.actions.loadpanoimage(); ]]></action>
and it doesn't work with version 1.21 -
That worked by coincidence
You hit a code-pfad where a rendering-shader with partial transparency support is used...
(and it will not work proper for multi-res panos)Add this to your js function and it would work also in 1.21:
But that's still more a hack and not a supported functionality.
Future versions will require an extra setting (e.g. image.transparent=true) to enable a real and full supported transparent pano rendering.
Best regards,
Klaus -
Klaus, thanks for the info!
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!