1/5‼️Gigantic new #rayverse update + blog post! Introducing {skymodelr}: render 3D scenes in #RStats with realistically-lit skies at a given location, using just a latitude, longitude, and a time.

Blog:
https://www.tylermw.com/posts/rayverse/atmospheric-simulation-in-r.html

Github:
https://github.com/tylermorganwall/skymodelr

Site:
www.skymodelr.com

2/5 #skymodelr implements the Prague (https://cgg.mff.cuni.cz/publications/skymodel-2021/) and Hosek (https://cgg.mff.cuni.cz/projects/SkylightModelling/HosekWilkie_SkylightModel_SIGGRAPH2012_Preprint.pdf) atmospheric models, which allow you to generate skies with the sun + scattered atmospheric light for any solar angle, down to -4.2 degrees (sun below the horizon) for the Prague model!
3/5 We can use this information along with solar positioning via {swephR} to generate a beautifully rendered realistic atmosphere in our #rayrender and #rayshader plots! Rayshader's `render_highquality()` now optionally takes lat/long + datetime inputs, so you don't even need to learn anything new!
4/5 Supporting realistic skies required support for a high-dynamic range image format in R, so this was all made possible by getting OpenEXR (and all it's dependancies) on the CRAN this past year via libopenexr. It was quite a task, but worth it! You can now adjust image exposure in post.
5/5 Finally, I didn't stop at daytime models: the package also includes a full night sky model that includes accurate positions and orientations of the moon, stars, and planets at a given lat, long, and time! Including moon phase, brightness, and orientation. Enjoy your upside-down moon, aussies!

And here's the hex logo! And unlike Bluesky, Mastodon actually respects PNG transparency!

#RStats #skymodelr #rayverse