Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

cuongdevjs

Anfänger

Beiträge: 13

Wohnort: Viet Nam

Beruf: JavaScript Engineer

  • Nachricht senden

61

Samstag, 28. Mai 2022, 04:00

onclick on model can't be detected

I using the newest verion of threejs and loading .gltf model, it's working normally but event on it can't fire, the do_object_hittest always return null. Does anyone have any idea to fix this? Thank you.

Eze

Anfänger

Beiträge: 13

Wohnort: china

Beruf: software development

  • Nachricht senden

62

Montag, 13. Juni 2022, 05:29

[.WebGL-000012B000398E00] GL_INVALID_OPERATION: Insufficient buffer size. Has anyone solved this problem

63

Donnerstag, 16. Juni 2022, 11:26

Good morning we are facing similar issues with three.krpanoplugin and GLTFLoader .

We have the same issue about memory buffer, but also one related to the 3D object.

At first glance, the 3d models are correctly loaded, but if I move all around a scene the 3D objects disappear.
Have you ever experience this issue?
I already tried to change the threejs plugins (https://cdn.jsdelivr.net/npm/three@0.141.0/build/ ), but result does not change.

Any suggestion ?

cuongdevjs

Anfänger

Beiträge: 13

Wohnort: Viet Nam

Beruf: JavaScript Engineer

  • Nachricht senden

64

Donnerstag, 23. Juni 2022, 06:55

Good morning we are facing similar issues with three.krpanoplugin and GLTFLoader .

We have the same issue about memory buffer, but also one related to the 3D object.

At first glance, the 3d models are correctly loaded, but if I move all around a scene the 3D objects disappear.
Have you ever experience this issue?
I already tried to change the threejs plugins (https://cdn.jsdelivr.net/npm/three@0.141.0/build/ ), but result does not change.

Any suggestion ?
I can't click on model, can you clicked on it?

65

Mittwoch, 29. Juni 2022, 01:25

Good morning we are facing similar issues with three.krpanoplugin and GLTFLoader .

We have the same issue about memory buffer, but also one related to the 3D object.

At first glance, the 3d models are correctly loaded, but if I move all around a scene the 3D objects disappear.
Have you ever experience this issue?
I already tried to change the threejs plugins (https://cdn.jsdelivr.net/npm/three@0.141.0/build/ ), but result does not change.

Any suggestion ?
I can't click on model, can you clicked on it?
not clickable in vr mode

Eze

Anfänger

Beiträge: 13

Wohnort: china

Beruf: software development

  • Nachricht senden

66

Dienstag, 5. Juli 2022, 04:14

I added the model to the normal panorama, but I haven't tried it in the depth scene. Next, I will try to load the model in the project with the depth map.

https://deyou360.com/krpobj/index.html

67

Montag, 19. September 2022, 12:28

Hi,



here as example an open source krpano plugin that shows how to use the three.js html5 3d rendering engine inside the krpano html5 viewer. The plugin handles everything about the rendering and interaction between krpano and three.js. This includes also stereo-rendering and WebVR support. For user interaction there is also a mouse and touch interface for the 3d objects. For all details please have a look into the plugin source.



krpano Three.JS integration example:





The krpano plugin source code:

http://krpano.com/plugins/threejs/opensource/threejs_example/three.krpanoplugin.js



Download the example:

krpano_three_js_example.zip (2.5 MB)





The current plugin here is mainly intended for developers with Javascript- and 3d-knowledge. All necessary basics for using three.js should be there and I think by using the krpano 'framework' the cross-platform usage of three.js becomes even easier.



Therefore this plugin is open source at the moment, but there are also plans to advance that plugin even more by adding a xml interface and more features. Then it will be possible to use that plugin to load and control 3d models via easily via the krpano xml/action interface.



Best regards,

Klaus
Thank you so much! I'm newbie. I'm learning how to insert model3d into 360 images. I have a question, hope you all can answer. How to insert a model3d into 360 images with different coordinates ath, atv?

68

Mittwoch, 21. September 2022, 05:43

I added the model to the normal panorama, but I haven't tried it in the depth scene. Next, I will try to load the model in the project with the depth map.

https://deyou360.com/krpobj/index.html
Is it gltf or js model insert into the panorama. How do you do if it's gltf format? It's great thing if you can share!!!!!1 Thank you so much

cuongdevjs

Anfänger

Beiträge: 13

Wohnort: Viet Nam

Beruf: JavaScript Engineer

  • Nachricht senden

69

Samstag, 1. Oktober 2022, 07:30

I added the model to the normal panorama, but I haven't tried it in the depth scene. Next, I will try to load the model in the project with the depth map.

https://deyou360.com/krpobj/index.html
Is it gltf or js model insert into the panorama. How do you do if it's gltf format? It's great thing if you can share!!!!!1 Thank you so much
use GLTFLoader to load gltf model and same with other formats

70

Montag, 10. Oktober 2022, 19:35

hi there,
is it possible to use gltf 3d model as depthmap for navigation?

If yes, does it makes any benefits compares to compressed .DEPTH format it term of browser performance and speed to load it?

71

Montag, 10. Oktober 2022, 20:36

is it possible to use gltf 3d model as depthmap for navigation?
no, look at the possible input formats:
https://krpano.com/docu/xml/#depthmap.url

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »indexofrefraction« (10. Oktober 2022, 20:57)


72

Donnerstag, 9. März 2023, 03:52

How to load glb model with threejs, anyone have example ?
*thumbup* Woody *thumbup* KEEP MOVING FORWARD *thumbup*

73

Freitag, 10. März 2023, 07:36

2023 and I still have error Screen get black at some spots when turning the pano :(
*thumbup* Woody *thumbup* KEEP MOVING FORWARD *thumbup*

74

Montag, 17. April 2023, 09:15

Interaction with 3d models

Hi everyone,
I am very new to krpano and I have been trying to get a 3d model (eg. cube) as a part of the 360 image(scene). I have been able to do that with the three.krpanoplugin.js but I also want to make it draggable and also get it synced for multiple users. Any idea how I could achieve this?
Also, I was trying to import Loaders for OBJ and GLTF to use in this plugin, but I haven't been able to. I would really appreciate if someone could help out.

Thanks.

75

Mittwoch, 28. Juni 2023, 16:07

Depth compatibility THREEjs / krpano

Hello,
I have been using krpano and threejs for a while, and have manged to insert glb objects into 360 scenes and depthmap scenes. With the developpement of depthmaps, there is a depthbuffer attribute for hotspots so that they appear correctly in 3d space relatively to other hotspots or the depthmap object, however it is not the case with threejs objects. The threejs objects always appear in front of hotspot and depthmap regardless of their position.
At first I thought that threejs was a layer that simply appeared on top of the krpano layer, but in some rare cases I was able to have three js objects intersect with a depthmap wall, although not in the right place.
This led me to believe that the intersection between threejs and krpano elements was possible, with a correct z-culling.
My guess is there are parameters to change regarding the depthbuffer, or something with the frustum planes of the cameras, I have tried tweeking parameters in threejs plugin here (in threejs.js) :


var krpano_depthbuffer_scale = 1.0001; // depthbuffer scaling (use ThreeJS defaults: znear=0.1, zfar=2000)
var krpano_depthbuffer_offset = -0.2;

with a small effect but no success,

Here is another guess on where the problemecan be solved, but I don't have enough experience with webgl to know what I'm doing.

function restore_krpano_WebGL_state() {
// console.log("restore_krpano_WebGL_state");
var gl = krpano.webGL.context;

//gl.disable(gl.DEPTH_TEST);
gl.cullFace(gl.FRONT);
gl.frontFace(gl.CCW);
gl.enable(gl.BLEND);
gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
gl.activeTexture(gl.TEXTURE0);
gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, false);
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
gl.pixelStorei(gl.UNPACK_ALIGNMENT, 4);

// restore the current krpano WebGL program
krpano.webGL.restoreProgram();

renderer.state.reset();
}


function restore_ThreeJS_WebGL_state() {
//console.log("restore_ThreeJS_WebGL_state");
var gl = krpano.webGL.context;

gl.enable(gl.CULL_FACE);
gl.cullFace(gl.BACK);
if (!krpano.image.depthmap.url) {
//enable visibility of 3D Objs in 360 scenes. Else krpano walls will hide the 3D objects.
gl.enable(gl.DEPTH_TEST);
gl.depthFunc(gl.LEQUAL);
gl.clearDepth(1);
gl.clear(gl.DEPTH_BUFFER_BIT);
}
renderer.state.reset();
}

I also tried changing the display.depthrange krpano parameter with no success.

Here is an example of what the problem looks like in a depthmap scene (attached screenshots)
The room is a depthmap, the objects are glb objects displayed with threejs, and the yellow + button is a hotspot.
Capture d’écran du 2023-06-28 15-58-30.png
Capture d’écran du 2023-06-28 15-56-48.png

If anyone has another idea on how to solve this depth compatibility problem please let me know. Don't hesitate to ask questions if you need more precisions. Thanks in advance ! *smile*

76

Mittwoch, 28. Juni 2023, 19:34

krpano and threejs both use their own render engine, i doubt that what you want is possible *huh*

77

Montag, 17. Juli 2023, 14:31

Depth compatibility THREEjs / krpano

Hello and thank you for answering.

I also thought this was impossible at first, but then I came across situations where threejs objects where occluded by krpano objects. For example, in this scene I have a threejs helmet object behind a wall that is a depthmap wavefront (.obj) object :

If I move to the right so as to have the wall between the camera and the helmet, the expected and ideal behavior would be that the wall hides the helmet which is not the case :

But if I get closer to the wall, the helmets begins to be hidden by the wall (completely hidden if I get close enough but I stayed at a distance where we could see the intersection between the wall and the helmet)



So it seems that an interaction between the two renderers does occur, and my guess is that it is because they both use webGL and maybe share a depthbuffer. If I had more information on the depthfunction of krpano I could maybe tweek threejs to match it and have a nice occlusion, that would be ideal. Otherwise I would have to do everything in threejs...

Beiträge: 141

Wohnort: Russia, Komi republic, Uhta

Beruf: developer

  • Nachricht senden

78

Montag, 17. Juli 2023, 14:47

Keep up your research!) And report back with your findings. It's a useful topic) *thumbsup*

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

79

Montag, 17. Juli 2023, 21:23

If I had more information on the depthfunction of krpano I could maybe tweek threejs to match it and have a nice occlusion, that would be ideal.

Hi,

the depthbuffer scaling would need to match.

Typically configured using a projection matrix with near/far settings.

In krpano it can be set using the depth.depthrange setting:
https://krpano.com/docu/xml/#display.depthrange

In ThreeJS it might be possible to set the same near/far settings using the Camera settings:
https://threejs.org/manual/#en/cameras

or alternatively using the projection matrix directly:
https://threejs.org/docs/#api/en/cameras…rojectionMatrix

In my older threejs example the depthbuffer scaling was using hardcoded values (krpano_depthbuffer_scale, krpano_depthbuffer_offset) but these don't match the current version anymore.

In the next krpano release there will be an API that exposes the current projection matrix that is used in krpano, then this could be directly reused for rendering also the threejs content.

Best regards,
Klaus

Beiträge: 141

Wohnort: Russia, Komi republic, Uhta

Beruf: developer

  • Nachricht senden

80

Dienstag, 18. Juli 2023, 14:15

In the next krpano release there will be an API that exposes the current projection matrix that is used in krpano, then this could be directly reused for rendering also the threejs content.
If I understand correctly, this would give the ability to load third-party models via Three.js that would overlap with the model loaded via krpano? ))

If so, this is exactly what we've all been waiting for for a long time. It's just like we are waiting for support for the glb format, shaders, model animation))))
Very very very very very very waiting!!!))))))
*g* *g* *g* *g* *g*

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

Ähnliche Themen