The conversation

Lessons learnedExperience excerpt · English

Awesome

Awesome. I remember much earlier in my career I was working on a 3D turn-by-turn navigation software, and one of my tasks was to draw the sky in the background. The more senior guy on the team said, just draw a blue rectangle during the day and a dark gray one at night and call it job done. Of course, I had to do it the hard way, so I looked up the relevant literature on sky rendering based on the environment, latitude, longitude, time of day and so on, which at the time was Preetham[1] ("A Practical Analytic Model for Daylight"), and built a fully realistic sky model for the software. I even added prominent stars based on a hard-coded ephemeris table. It was quite fast, too. Well, the higher ups of course hated it, they were confused as to why the horizon would get hazy, yellowish, and so on. "Our competitors' skies are blue!" They didn't like "Use your eyes and look outside" as an answer. Eventually, I was told to scrap it and just draw a blue rectangle :( All that to say, nice job on the site! 1: https://courses.cs.duke.edu/cps124/fall01/resources/p91-pree...

Original discussionShow HN: The current sky at your approximate location, as a CSS gradient160 source comments · at import
8

What was this responding to?

Parent context · original excerpt

DN

For HTML Day 2025 [1], I made a web service that displays the current sky at your approximate location as a CSS gradient. Colours are simulated on-demand using atmospheric absorption and scattering coefficients. Updates every minute, without the use of client-side JavaScript. Source code and additional information is available on GitHub: https://github.com/dnlzro/horizon [1] https://html.energy/html-day/2025/index.html

Full original

Community replies 0

No community replies yet. Add your perspective.

Replies from the source 8

Direct replies available in this import. Original-language excerpts.

NE

Not even as an easter egg? You could've sold it with telling them Vincent Van Gogh's paintings had the location of stars accurately, you were inspired by those paintings to reproduce the sky color accurately.

Full original
DA

A past coworker who worked on Cobalt[1] told me that they spent entirely too much time implementing stars in the sky of the game with some amount of real(ish) star system physics behind them. I can understand people removing polish things like that if there are usability concerns, but those small things add up to a lot in an end product and are a joy to find and explore. 1: https://en.wikipedia.org/wiki/Cobalt_(video_game)

Full original
TE

To be honest I don’t think anyone wants that kind of functionality - maybe in the satellite view but not in the vector map.

Full original
MA

Yep, if you have to draw the Sun, you better draw it yellow. If you have to draw a cloudless day sky, you better draw it blue. That doesn't apply to every single instance of those, but if the sky isn't the focus of your application, a realistic one is just a distraction.

Full original
BE

Ironically, I'm in the South of England wih clear blue sky, and the site thinks I have a much darker and beautiful reddish sunset. Im fairness, it's probably only out by an hour if that.

Full original
WA

I’ve had similar issues at work where people really overdo something and it’s difficult. On one hand you never want to kill that joy and passion someone has. That’s a great characteristic. But projects have scopes and too often instructions like “just draw a blue rectangle” get ignored.

Full original
CR

This is why specifications are important, and why design is important. The reality is that we have certain conventions that are immediately understandable, and that too much visual complexity results in confusion rather than clarity. If the sky is hazy white when I expect it to be blue, I'm confused as to whether it's the sky or if the map is still loading. It's adding cognitive complexity for no reason. Stars similarly serve no functional purpose at night. What you built sounds great for an actual planetary view like Google Earth. And it sounds fun to build. But it's an anti-feature for a navigation view. When you're navigating, simplicity and clarity are paramount. Not realism.

Full original
BR

The thing here is programming the job can be much more dull than programming the hobby. Occasionally (twice a decade) there can be a collision where you get to do something really cool like that at work. The higher ups want a realistic sky because their market research said it'll boost an OKR by 10 basis points. And then you are in luck! That said there are niches where jobs let you do cool stuff all the time. Hard to find. Probably why gaming jobs are notoriously underpaid and overworked.

Full original
Continue on Hacker News

Respect different perspectives. Share concrete experiences.

Sign in to post, reply, repost, and quote.