Closed Amoki closed 3 years ago
Reason for this is that the massive far clipping plane distance of 1e27
screws up picking.
Everything works fine with a distance of 100000
or 1000000
, which is still 100km or 1000km.
So not really a bug, just exceeding accuracy limitations.
I've updated the examples in an upcoming PR.
I have the same problem with far = 1000000
and far = 100000
;
Picking works with 1e27
on smaller models.
How about making the near plane 1.0
? As a general rule, that improves the projection accuracy that picking relies on - see if that helps.
It doesn't work with near = 1.0
.
As it works on Firefox, I'm not sure it's a configuration problem.
Does this work?
https://xeokit.github.io/xeokit-sdk/examples/#CameraControl_orbit_Lyon
Works for me on Ubuntu/Chrome, Android and IOS 14.2
Hmmm, It works on your example... I'll investigate.
(Enabling SmartPivot on the example doesn't work)
SmartPivot seems to work for me in that example:
My bad. We use the pivot sphere since smart pivot is out and in my mind, smart pivot == pivot sphere, which is wrong.
But this is nice :D
Ok, I got it.
I missed https://github.com/xeokit/xeokit-sdk/commit/a0205c3061cc87dae5a94918ed163a8b01739496 and was still using Viewer.logarithmicDepthBufferSupported
.
If I set viewer.camera.perspective.far = 10000000;
and logarithmicDepthBuffer
is not supported (iOS Safari), what happens?
Results will vary, depending on the geometry.
If you use a linear depth buffer, then when viewing tightly-packed geometry from a distance may result in Z-fighting. Log depth buffer may give the precision required for the Z-test to properly layer the geometries.
For the Lyon model, the geometries are distinct enough that log depth buff doesn't make much difference.
A couple of examples to try:
https://xeokit.github.io/xeokit-sdk/examples/#logDepthBuf_PerformanceModel_batching_RTC https://xeokit.github.io/xeokit-sdk/examples/#logDepthBuf_PerformanceModel_batching_RTC_logDepthBufDisabled
Describe the bug On Chrome (it works on Firefox), picking doesn't work on big models. If a load just Lyon2, it works. If I load the full city, I can't pick anymore and zoom is really slow (picked nothing, so zoom speed is set to the default I guess)
To Reproduce Steps to reproduce the behavior:
Expected behavior Be able to pick or zoom
Desktop (please complete the following information):
It works on firefox.
Additional context config: