Sie sind nicht angemeldet.

1

Mittwoch, 26. Juli 2023, 07:51

Loading 3D-object (OBJ) as plugin/layer possible?

Hi there,

I´m testing right now the possibilities with 3d-objects (OBJ) inside krpano. Loading a 3d-object as the scene itself is pretty easy and straight forward:

Quellcode

1
2
3
<image>
		<depthmap url="model.obj" texurl="texture.jpg" hittest="true" scale="100" />
	</image>


But how can I add a one or more 3d-models above another pano-image? Unfortunately there is no documentation on this topic - or at least I did´nt find any.

Thx in advance,
Nupsi

Beiträge: 141

Wohnort: Russia, Komi republic, Uhta

Beruf: developer

  • Nachricht senden

2

Mittwoch, 26. Juli 2023, 08:30

But how can I add a one or more 3d-models above another pano-image?
There is no way in this version. Only one model at a time is supported. This issue has been long overdue and has been formalized as a wish that many people are waiting for. But we just have to wait for Klaus to realize the possibility to add more than one object/model).

Hello from uhta3d )))
I'm in telegram: Lastromantik

kme

Fortgeschrittener

Beiträge: 310

Wohnort: Belgium

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

  • Nachricht senden

3

Mittwoch, 26. Juli 2023, 09:42

I saw a post of tuur who did it with a hotspot:

https://krpano.com/forum/wbb/index.php?p…&threadID=19184

In the second example of "hotspot type krpano (no vr):", he loads an .obj as a hotspot.

Basically, he loads a hotspot as type "krpano" and dynamically loads an .obj file in that frame.

I experimented with that approach too, but in my tests, the quality of the generated hotspots was pixelated. If you find a way to improve that, I would be very interested in it.



In the screenshot above, the blue/grey background is a 3D model of a gallery, and the person is an .obj that has been loaded using Tuurs method.

4

Freitag, 28. Juli 2023, 12:49

There is no way in this version. Only one model at a time is supported. This issue has been long overdue and has been formalized as a wish that many people are waiting for. But we just have to wait for Klaus to realize the possibility to add more than one object/model).

That´s what I thought *sad* But it´s always good to ask to be sure ;-)



I saw a post of tuur who did it with a hotspot:
https://krpano.com/forum/wbb/index.php?p…&threadID=19184
In the second example of "hotspot type krpano (no vr):", he loads an .obj as a hotspot.

Wow...thanks for the link. Did´nt see his examples and will check ´em out *thumbsup*

That´s exactly what I´m trying to achieve, but there are still quite a few problems to solve.
The biggest problem for me right now is the backface-culling which I just can´t get to work properly *wacko*

5

Samstag, 29. Juli 2023, 09:22


I experimented with that approach too, but in my tests, the quality of the generated hotspots was pixelated. If you find a way to improve that, I would be very interested in it.

It´s a scaling-problem! Just use the depth-parameter to set the hotspot in 3d-space instead of scaling.

Quellcode

1
2
3
4
5
6
7
8
9
10
l.enabled = false;
l.type = "krpano";
l.depth = "500";
l.distorted = "true";
l.width = "2000";
l.height = "2000";
l.scale = "1";
l.tx = "0";
l.ty = "0";
l.tz = "200";


I used oz="10000" and scale="500" for the 3d-model. and it´s sharp.


But unfortunately this method does NOT work in VR *thumbdown*
As soon as I switch to VR the hotspot disappears, no matter what I try (renderer="webgl",renderer="css3d",depthbuffer.....).

kme

Fortgeschrittener

Beiträge: 310

Wohnort: Belgium

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

  • Nachricht senden

6

Samstag, 29. Juli 2023, 09:59

It´s a scaling-problem! Just use the depth-parameter to set the hotspot in 3d-space instead of scaling.

I'll have a play with it, thank you for taking the time to report back here!

kme

Fortgeschrittener

Beiträge: 310

Wohnort: Belgium

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

  • Nachricht senden

7

Samstag, 29. Juli 2023, 10:00

As soon as I switch to VR the hotspot disappears, no matter what I try (renderer="webgl",renderer="css3d",depthbuffer.....).


I believe it is because the hotspot is basically displaying a HTML page (the krpano player), and HTML is not supported in VR.

kme

Fortgeschrittener

Beiträge: 310

Wohnort: Belgium

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

  • Nachricht senden

8

Samstag, 29. Juli 2023, 10:32

I'll have a play with it, thank you for taking the time to report back here!


I had a play with it and the depth can indeed solve the scaling issue.
But then it also moves the object in 3D space and I want it to be in an exact position. When I then move the hotspt so that the final obj is in the good position, the model is too big and I have to make it smaller again, running into the same quality issue again.

Also, I noticed that the 3D model is not interacting with other 3D models - it is drown over. You can see it in the screenshots below where the person is standing in the hall, but when you move the camera so that the bench is intersecting with the view to the person, the person is drawn over the bench, making it not realistic.





So all in all, multiple .obj files in krpano: not now.

9

Samstag, 29. Juli 2023, 11:11

Next release ;-)

Beiträge: 141

Wohnort: Russia, Komi republic, Uhta

Beruf: developer

  • Nachricht senden

10

Samstag, 29. Juli 2023, 11:50

Next release
This is awesome news!!!)))))) *thumbsup* *thumbsup* *thumbsup*

Hello from uhta3d )))
I'm in telegram: Lastromantik

11

Samstag, 29. Juli 2023, 12:49

Next release ;-)

OMG - CAN´T WAIT *w00t* *w00t* *w00t*

EDIT: Oh...and if you could take a look at the cull-function it would be perfect! Right now it´s not working quite right when using cull="twosided" for object-maps with alpha-channel
index.php?page=Attachment&attachmentID=3465


I had a play with it and the depth can indeed solve the scaling issue.
But then it also moves the object in 3D space and I want it to be in an exact position. When I then move the hotspt so that the final obj is in the good position, the model is too big and I have to make it smaller again, running into the same quality issue again.

Also, I noticed that the 3D model is not interacting with other 3D models - it is drown over. You can see it in the screenshots below where the person is standing in the hall, but when you move the camera so that the bench is intersecting with the view to the person, the person is drawn over the bench, making it not realistic.


I noticed the same problems. At first it was´nt obvious, because I was just testing with planets, but there is indeed no way of using multiple obj´s right now.
Looking forward to the next release *thumbsup*

Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »Nupsi« (29. Juli 2023, 13:25)


Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

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

  • Nachricht senden