Stars! Now shader points with a diffuse background in v0.2. (And a screenshot feature!) #32
charliewhitfield
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Using a simple background image for stars doesn't work very well. It could only work well if the image resolution is exactly matched to the display (not bigger nor smaller) and that's impossible to do over the whole sky due to projection warping. The problem is that stars in any real image are points with a soft halo. Bright stars are saturated at the point; they grow with intensity but not proportionately. Resizing an image resizes the stars proportionately, which doesn't look right at all.
Any screenshot that is later up- or downsized has the same problem. That's why stars sometimes are absent from my older screenshots; they were there in my 4K screen capture, but then mostly gone after downsizing to 1200 for web. (And running the Planetarium at 1200 width is a real pain because the GUI is all bunched up.)
So in order to make this post I built a screenshot feature. Just press F12 (settable in Hotkeys) and you get a 1200 pixel image (settable in Options). The system renders your current view via a transient SubViewport at your specified resolution.
That gets us to our new stars...
In v0.2, we generate stars using a vertex point shader that replicates star interaction with a camera sensor at any FOV. We currently have ~120,000 stars from the Hipparcos Catalogue, which is more than you can see without magnification and a wide aperture. Background Milky Way, other galaxies, and nebulae are still added as a 4K background image (generated by smoothing and then downsizing NASA's 64K image).
This is our system using 50 mm lens (FOV ~40°). Yes, this is really a screenshot; I just think in focal-length rather than FOV.

Here's the Large Magellanic Cloud using 100 mm lens (FOV ~20°). At this magnification, you start to see the limits of the Hipparcos Catalogue. You would see more dim stars here if we added stars from the larger Tycho set. I haven't done that because FOV < 40° is kind of niche use.

For comparison, below is what you would get if using NASA's 4K image with stars directly. NASA's 8K and 16K are better but not as much as you would want.

All reactions