You are not logged in.

1

Saturday, May 6th 2023, 9:48pm

My new website and its problems.

Before I write anything, I would like to thank a few people who made it possible for me to design my website like this.

First I would like to mention kme, thanks to his help and the files he made freely available, I was able to start the whole project at all.

Many thanks to Klaus, who always answers all questions, even though they have already been asked 100 times in frum.

Thanks also to san7 for the awesome menu plugin he wrote.

You all helped me a lot, without you I would never have managed to design my website like this.


But now I have a few problems that I can't get any further.
Since I don't want to create a new topic for every question, I thought I'd just open one where I could write everything.

My problem at the moment is that the images of my Image HOtspot are not loaded or only partially loaded,
There are a total of 61 pictures, all but two are in the KB report, but

When I call up the page for the first time, some picture frames simply remain black.
Not always the same, that is very different.
But if I reload the page just a fraction of a second later, all the images are displayed correctly.

what can be the reason, or how can I prevent this?

Here is the link to the page so you can see what I mean...


www.wnlpd.com/galerie/tour.html

I would be happy if you could help me with that!

Best regards, Woiferl
Woiferl has attached the following images:
  • 1.jpg
  • 2.jpg

spacerywirtualne

Professional

Posts: 1,117

Location: Poland, Europe

Occupation: krpano developer : virtual tours : the cms4vr owner

  • Send private message

2

Saturday, May 6th 2023, 10:15pm

Whether the golden rules for files on the server are met:

1. only lowercase letters in the jpg file name
2. no special characters or spaces in the jpg file name

Piotr
Your own professional, online cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube :: wiki.cms4vr.com

cms4vr team *thumbsup*

3

Sunday, May 7th 2023, 6:33am

Thanks for the hint.
I renamed all the image files, but unfortunately the problem persists.

kme

Intermediate

Posts: 310

Location: Belgium

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

  • Send private message

4

Sunday, May 7th 2023, 8:20am

Hi,

No solution, just looking into this and I notice the following for the images that are not loading:



Looking into what could cause this...

kme

kme

Intermediate

Posts: 310

Location: Belgium

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

  • Send private message

5

Sunday, May 7th 2023, 9:41am

When I started testing, I could simulate the problem on both your website and my local environment.

But now I can't any more - all loads fine.

What I did: disabled all my extentions. And I thought I re-enabling the extentions would help, but nope, cannot simulate any more...

I also tested in other browser than chrome desktop and all works fine there (edge, mobile chrome, safari, ...).

So must be something chrome + extentions. Do you have addblock on your system?

Anyway, try:
- accessing the site in incognito (that disables plugins)
- try disabling your chrome extentions, restart your browser

will continue testing a bit to see if I can get it to (not) work again...

6

Sunday, May 7th 2023, 9:50am

the pictures are in general quite big
a 1200x800 px image shouldn't be 400-500kb...
all in all you load 31mb with this page

@75% jpg quality studio14.jpg goes down to 80kb from 623kb !

still... on desktops this should not be the reason for not loading images.

maybe something in the code.. or just a cache problem.
be sure to always empty your cache when changing and testing on a live server

7

Sunday, May 7th 2023, 12:16pm

many thanks for the help.

I have now done the following, re-exported all images for the web.
Instead of 27.2 MB, all together are now 7.5 MB.

I always clear the cache before opening the page again.
The problem occurs with Mozilla Firefox and Safari.

Pausing the adblocker on Firefox helps, but unfortunately not always.
Sometimes it works, and sometimes it doesn't.

@kme: I'm surprised that it works for you now, it just doesn't work for me. very strange...
somehow the image hotspots are sometimes not loaded or only partially loaded.
The black on the wall comes from the texture of the obj file.

kme

Intermediate

Posts: 310

Location: Belgium

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

  • Send private message

8

Sunday, May 7th 2023, 1:02pm

The good news: I have the problem again (by setting my max download speed to 10Mb).
The bad news: no idea what is happening yet

Have you tried updating to the latest krpano (april 30 release)? There were some bugfixes in regards to layer visibility.

kme

Intermediate

Posts: 310

Location: Belgium

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

  • Send private message

9

Sunday, May 7th 2023, 2:01pm

I'm starting to get some idea: the tx/ty/tz values for the hotspots have "NaN"
So for some reason, the style settings are not applied to the hotspot...

If I set the tx/ty/tz values manually, the "black" spots get filled with the picture...

Still debugging :)

10

Sunday, May 7th 2023, 3:08pm

I downloaded and installed the April 30 release.
If open the XML file in the krpanoTools in the tour editor, the error is there.

If I open the xml file in my obviously older release, everything is ok...

Maybe that's where the error is hiding?
But to be honest I have absolutely no idea.

I am a photographer and an enthusiastic 3D modeler, and also a creative person.
I'm not good at programming as you've probably noticed... ;-)

Edit: the release doesn't make a difference, sometimes it doesn't work sometimes...

This post has been edited 1 times, last edit by "Woiferl" (May 7th 2023, 3:30pm)


kme

Intermediate

Posts: 310

Location: Belgium

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

  • Send private message

11

Sunday, May 7th 2023, 3:09pm

I have sent some ideas by direct message in order to not overflow the forum :)
If we find a solution, we can do a summary afterwards.

12

Sunday, May 7th 2023, 3:31pm

you are awesome! *thumbsup*

jl-krp

Intermediate

Posts: 154

Location: Bath

Occupation: Panographer - hobby and commercial

  • Send private message

13

Sunday, May 7th 2023, 7:10pm

modelling for vitual gallery

Wolfert
Congrats on an elegent virtual gallery! well done.
Can you tell us more about the modelling process?
Thanks
JL

14

Monday, May 8th 2023, 1:56pm

KME found the bug!
He wrote me a private message with some tips.

In the Image Hotspot XML I should use another word instead of <style/>. for example <paintig/ and he rewrote the scrpit right away.

What can I say, suddenly everything works!
KME tried to explain to me why that was, but I didn't quite understand it, as I said, I'm still learning.
It will take a while until I can really program independently.

Thank you KME! *thumbsup*

kme

Intermediate

Posts: 310

Location: Belgium

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

  • Send private message

15

Monday, May 8th 2023, 2:18pm

To those who are interested...

The script loads images that are in <style ... /> tags with an attribute autohotspot="true".
It loads them using a loop:

Source code

1
2
		for(set(i,0), i LT style.count, inc(i),
			if(style[get(i)].autohotspot == true, ...


After changing the <style> tags to <painting> tags, and adjusting the script to have load these painting tags instead of style tags, everything was resolved.

I think (not sure) there was a timing issue where not all <style> tags were loaded when the script started the loop and somehow the script got "confused" when more style tags were added to the krpano environment. But it is a dirty theory that I cannot confirm/explain.

Anyway, problem solved and Woiferl happy. And me too :)


This is was the old code:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
	<action name="generate_hotspots"  scope="local" autorun="onstart" >
		for(set(i,0), i LT style.count, inc(i),
			if (style[get(i)].autohotspot == true,
				copy(st, style[get(i)]);
				addhotspot(calc('image-' + (i+1)), hs);
				copy(hs.url, st.url);
				copy(hs.height, st.height);
				copy(hs.width, st.width);
				copy(hs.scale, st.scale);
				copy(hs.tx, st.tx);
				set(hs.ty, calc(st.ty));
				copy(hs.tz, st.tz);		
				copy(hs.ry, st.ry);		
				copy(hs.type,image);
				copy(hs.distorted,true);
				copy(hs.depth,0);
				copy(hs.torigin,world);
				copy(hs.zorder,2);
				copy(hs.depthbuffer,"true");
				copy(hs.capture,false);
				set(hs.keep,true);
				hs.addevent(onloaded,calc('resize('+get(hs.name)+')'));
				hs.addevent(onclick,calc(st.onclick));
			);				
		);
	</action>	


This is the new code:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
	<action name="generate_hotspots"  scope="local" autorun="onstart" >
		for(set(i,0), i LT painting.count, inc(i),
			if (painting[get(i)].autohotspot == true,
				copy(st, painting[get(i)]);
				addhotspot(calc('image-' + (i+1)), hs);
				copy(hs.url, st.url);
				copy(hs.height, st.height);
				copy(hs.width, st.width);
				copy(hs.scale, st.scale);
				copy(hs.tx, st.tx);
				set(hs.ty, calc(st.ty));
				copy(hs.tz, st.tz);		
				copy(hs.ry, st.ry);		
				copy(hs.type,image);
				copy(hs.distorted,true);
				copy(hs.depth,0);
				copy(hs.torigin,world);
				copy(hs.zorder,2);
				copy(hs.depthbuffer,"true");
				copy(hs.capture,false);
				set(hs.keep,true);
				hs.addevent(onloaded,calc('resize('+get(hs.name)+')'));
				hs.addevent(onclick,calc(st.onclick));
			);				
		);
	</action>	

16

Monday, May 8th 2023, 2:51pm

@jl-krp

Of course I'm happy to tell you a little bit about the modeling process!

It all started when I found a post by KME where he made a gallery freely available for photographers.

I've wanted to do something like this for a very long time, this was my chance! :)
i have to say that i'm a full-time photographer, i'm quite familiar with 3d modelling, i used to make 3d models for games.
only for private purposes and "mods" but we had a lot of fun in our worlds!

I can't really program XML, I can read codes to some extent, I understand what I have to do to implement my projects.
I always teach myself exactly what I need to know.
And forget some things very quickly....

But now to the modeling process, I have inserted 4 pictures from the creation.
I work with Blender, the program is free and has become incredibly good.

Since I didn't have enough space for my pictures in the KME model, I built one myself.

Determining the halfway right size of the foundation walls was not that easy, so I first sketched everything on a piece of paper and thought about which pictures I wanted to take and where they should hang.

In Blender I then started with the floor, then the walls all around.
And so one thing led to another, the wooden beams, the ceiling lamps and the picture frames.
Each picture has its own frame. (Image 1)

Next I put the light in the scene.
Each picture frame has its own lighting and the room itself is illuminated again by the ceiling lights.
In total there are 96 lights I think. (Picture 2)

During modeling, I also created a UV map for each object in the scene. that is quite important.
I modeled the wooden beam once, unwrap the UV and then just copied and moved it on the map.
If you don't want to do that right away, it will be very tedious later on with many objects...

I then exported the UV map and loaded it into Photoshop and created the textures.
This finished textured image then went back to Blender and was placed on the model. (picture 3)

Last but not least comes the "baking", the texture.
Baking means you have your ready lighted scene and render it.
The rendered image now has all the information of the light.
You then place this rendered image on the model.
This is how it looks in Krpano, as if it were obvious. (picture 4)

The whole thing is then exported as an OBJ file from Blender.

And the new gallery is ready!
Woiferl has attached the following images:
  • 1.jpg
  • 2.jpg
  • 3.jpg
  • 4.jpg

This post has been edited 1 times, last edit by "Woiferl" (May 8th 2023, 3:01pm)


ramirox3

Intermediate

Posts: 354

Location: La Ceja, Colombia

Occupation: photographer

  • Send private message

17

Monday, May 8th 2023, 4:01pm

Interesting evolution of the problem. Much to learn. By sharing problem and solution we all benefit. Thanks to all the contributors

18

Monday, May 15th 2023, 10:31am

its strange...

Yesterday I changed the map a bit and provided the passages with glass panes.
This also works wonderfully in the texture map.

What I find strange, however, is that the image hotspots cannot be seen through the glass.
How can that be?
Woiferl has attached the following image:
  • map.jpg

kme

Intermediate

Posts: 310

Location: Belgium

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

  • Send private message

19

Monday, May 15th 2023, 10:46am

I experienced a simular issue with transparant materials and filed a feature request for this.

I'll add a link to your post too as it extends on that even further.