I’ve spent the week sparing with Java layout managers and Swing components, but at least I have something to show for it. Here are two of the finished dialog boxes, fairly simple as far as purpose, the first one is where most of the meat of what I’m doing is. This dialog will allow users to specify settings for what I’m adding, with different settings for Image exporting and previewing in the viewer. This dialog is pretty self explanatory, it leads into the next thing I did this week…
After talking with Tordanik and Basti I decided to flip my first two goals around, tackling the lighting first. It was a good decision, I was able to do all of the work without diving too far into the shader code. The gif above is 23 separate renders all taken an hour apart. There are still some colors I want to tweak, and right now the color of the lighting is a hard cut off between day, sunset, and night. I want to implement a gentler transition, mostly likely just by adding more steps to the lookup table. If I find some time, I may come back and try and implement some sun effects with shaders (atmospheric scattering, glare/lens flare) but for now a fixed color transition provides the effect I was aiming for.
The direction of the shadows is actually calculated based on the latitude and longitude of the location. The calculations follow the wikipedia page, its a bit of a fun exercise in trigonometry.