You are not logged in.

1

Thursday, April 6th 2023, 8:47am

from ATH,ATV,depth to tx,ty,tz after update to 1.21

Hello,


i have an app loading hundred of VR hotspots from an excel sheet containing ATV,ATH und DEPTH values.
Any hotspot consits of a background hotspots (depth=1200) and a hotspot with an image above the background (depth=1199)

Now after updating to 1.21 the icon is always behind the background, changing the depth values makes no difference, or i miss something.
Any hints what to do?

Set the tx.ty.tz values is the way to go for the future, i suppose?
Is there a convenient way to convert my ATH,ATV,DEPTH values to tx,ty,tz values?

Thank you

kme

Intermediate

Posts: 310

Location: Belgium

Occupation: Long time coder, product manager and 3D enthousiast

  • Send private message

2

Thursday, April 6th 2023, 8:49am

You can use spheretospace:

https://krpano.com/docu/actions/#spheretospace

gr,
Kristof

3

Thursday, April 6th 2023, 9:17am

you shouldnt need to convert to tx/ty/tz
maybe use a bigger distance than 1... try to use depth="800" instead of "1199"
or maybe your problem has something to do with this...
https://krpano.com/docu/xml/#hotspot.zorder2

4

Thursday, April 6th 2023, 10:48am

hmmm, what am i missing? no matter what values i set for depth or zorder (chrome browser), the icon is always behind the background, see screenshot, this is my test code.... any idea?

const icon = krpano.addhotspot('icon');
icon.type = 'image';
icon.distorted = true;
icon.url = "%CURRENTXML%/assets/icons/spots/vision.png";
icon.atv = 0;
icon.ath = 30;
icon.depth = 800;
// icon.zorder = 1;
icon.width = icon.height = 48;

const bg = krpano.addhotspot('bg');
bg.type = 'text';
bg.distorted = true;
bg.atv = 0;
bg.ath = 30;
bg.depth = 1200;
// bg.zorder = 2;
bg.width = bg.height = 48;
bg.bgcolor = '0xffffff';
bg.bgalpha = 0.5;



things i have changed:
  • updated to INFO: krpano 1.21 (build 2023-03-30)
  • the previous scene is now a depthmap obj scene (based on the tuscany example), the actual scene is loaded via 'loadscene' with "REMOVESCENES" flag

Many thanks for hints!
holo has attached the following file:
  • depth.png (351.76 kB - 56 times downloaded - latest: Today, 6:19am)

Tuur

Sage

Posts: 3,839

Location: Netherlands

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

  • Send private message

5

Thursday, April 6th 2023, 12:01pm

Hi,

Try adding renderer="webgl" to your hotspots.

Because of the new renderer="auto".
With that textfields get rendererd using CSS3D by default - and CSS3D is always above WebGL content.


Hope it helps,
Tuur *thumbsup*

6

Thursday, April 6th 2023, 1:09pm

yes, icon.renderer="wegl" did the trick!

again learned a lot of new things, thanks to all!

7

Thursday, April 6th 2023, 1:55pm

3740 posts of experience ;) *thumbsup*

Tuur

Sage

Posts: 3,839

Location: Netherlands

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

  • Send private message

8

Thursday, April 6th 2023, 3:25pm

hehe.. yes.. it helps to have some experience yes..
I had exact the same problem when 121 was released.. so it was sort of fresh in my sucky brains..



Tuur *thumbsup*

This post has been edited 1 times, last edit by "Tuur" (Apr 8th 2023, 12:43am)


Similar threads