WorldWideTelescope / wwt-web-client

The WorldWide Telescope web client lets you explore the universe in your browser.
https://worldwidetelescope.org/webclient/
MIT License
105 stars 35 forks source link

Issue with layer point visibility #190

Closed astrofrog closed 5 years ago

astrofrog commented 5 years ago

The following shows an example of plotting two points a reasonable distance from the Sun (on opposite sides)

wwt.setBackgroundImageByName('3D Solar System')
csv = 'a,b,c\r\n20,30,20000000\r\n200,-30,20000000\r\n'
layer = wwtlib.LayerManager.createSpreadsheetLayer('Sun', 'My Layer', csv)
layer.set_lngColumn(0)
layer.set_raUnits(1)
layer.set_latColumn(1)
layer.set_altColumn(2)
layer.set_altUnit(1)
layer.set_altType(2)
layer.set_scaleFactor(100000)

However, only point point is visible at any one time, because it seems the point visibility behaves as if the point was close to the planet surface (but since they are quite far in space they should both be visible).

astrojonathan commented 5 years ago

layer.set_showFarSide(true) use this to show all data regardless if it is on the far side of the sphere from you.

astrofrog commented 5 years ago

@astrojonathan - just to clarify, I still think the default with showFarSide(false) can be improved - that is, any data point that is along a line of sight that does not intercept the planet should always be visible. If you are considering e.g. a cloud of satellites around the earth, it's of course nice to hide the ones that go behind the earth, but it would make sense to always show the ones that are at high enough altitude that they are still 'away' from the planet enough to be visible. Does this make sense?

astrojonathan commented 5 years ago

There is a clear president in the Windows client for 8 years of usage. The Viz layer was mostly aimed at planetary viewing, and on sky viewing, both were the current default makes sense, the Solar System mode is the odd-duck here and only when not viewing planetary data. You don't want to see far side earthquakes, cities, raid forest, etc. on a planet or it gets impossible to view.

90% + of the real world usage is for the setting to be off, and the Windows client is set to off by default. I believe the grind in SolarSystem mode was a contrived unusual circumstance and is not representative of our common use. We should not change the default.

pkgw commented 5 years ago

I think what @astrofrog is saying is that the default behavior could potentially give the best of both worlds — not overwhelming the user with things that "shouldn't" be visible, but showing a additional points that they ought to be able to see — if you could do some kind of hit test on the underlying sphere to test for visibility a bit more carefully. Would that be impractical to implement?

astrojonathan commented 5 years ago

You can turn on Depth if you want a solid object to hide markers. We need mathematical rules that can be evaluated in parallel with just the data available at the decision time. If we could find some rules that would improve things maybe we could make a new mode, but if we change the default behaviour, then all the existing tours and layers would look different.