Giter Club home page Giter Club logo

genmistsky's Introduction

genmistsky

Generate a multi-layered participating atmosphere for Radiance

Build and run

With GCC installed on a Linux computer, this should build and run with:

git clone https://github.com/markstock/genmistsky.git
cd genmistsky
make
make test

The last command will generate the Earth and some mist volumes and render a view of the sunrise line from space in an rvu window. It assumes that Radiance is installed and the binaries are in your PATH.

render from space station

Details

Rayleigh scattering (from gas molecules) is the primary source of the sky's color; Mie scattering (from larger particles such as dust and water droplets) serves to spread the sun's rays into a halo, and refraction (due to density changes) causes very low-angle sun rays to curve. The combination of these three effects can be simulated in Radiance with mist and interface materials applied to Earth-sized sphere and bubble geometry.

This program assumes that the scene is centered around (0,0,0) with East along positive x, North toward positive y, up along positive z, and all spatial units in meters. The center of the Earth (and of all atmospheric shells) is (0,0,-6378100).

It it important to note that this code does not specify the sun's direction, nor does it provide the bubble that is necessary if the view point is inside of one of the mist volumes. The user is responsible for those.

rendering of dawn

To Do

  • Consider adjusting the top-of-atmosphere color such that a grey object at the Earth's surface is really achromatic.
  • Generate rendering samples: of a standard scene at Earth's surface but with varying Mie coefficients, the same but with different numbers of layers, the same but at different altitudes.
  • Add option to load image of Earth lights at night, correlate them to viewer's location, and apply them as area light sources on the ground in order to allow distant cities to add horizon-glow realistically.

Thanks

The original idea for modeling skies in Radiance came from Taoning Wang's post on the Radiance Discourse server. The standard atmosphere code is from R.J. Yager. Radiance is a lighting simulation package created by Greg Ward.

Citing Genmistsky

I don't get paid for writing or maintaining this, so if you find this tool useful or mention it in your writing, please please cite it by using the following BibTeX entry.

@Misc{Genmistsky2022,
  author =       {Mark J.~Stock},
  title =        {Genmistsky: Generate a multi-layered participating atmosphere for Radiance},
  howpublished = {\url{https://github.com/markstock/genmistsky}},
  year =         {2022}
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.