New Sun and Sky model

The initial implementation of the Sky texture in corona, vray and probably most chaos products is an implemtation of a 1999 paper by Preetham

It has since been ammended with the Hosek-Wilkie paper from 2012 if i’m not mistaken.

The Hosek-Wilkie appoach is a clear improvement on the ancient 1999 paper, but it’s still far behind on newer models like the one in this paper: Real-time spectral rendering of the atmospheric medium

Most notably Implemented in Blender

Obviously it’s not as fast as the 1999 paper since it contains multiple scattering and spectral calculations, but there are many ways and tricks to make it quite fast (rendering more detail towards the horizon as blender does)

I have a simple implementation running in 3ds Max using python and numpy that renders as an EXR and also colors the direct color of a corona sun, but I believe it deserves a proper C++ implementation to make it feel native.

I understand this might be difficult given the deep implementation of the same sky texture in every chaos product and with the clouds layered on top.

But it’s new tech that’s worth implementing in my opinion.

How does it compare with our PRG sky model? https://cgg.mff.cuni.cz/wp-content/uploads/2021/05/atmo_model-1.pdf

First of all: For dumb some reason I thought the PRG model was your guys’ implementation of the Hosek model

Anyway, this is incredibly interesting. I took the time today to read into this paper properly and the main diference seems to be:

The fgarlin (blender) Initially takes the same route as your PRG model. eg: raytraced spectral calculations (these are expensive and are required to calculate the sky dome in the end)

Where they diverge is that your PRG sky model (stands for “Prague” , Na zdraví) essentially bakes and compresses the data beforehand and stores it in a big LUT, but its very unbiased and accurate. the fgarlin approach is different, it doesn’t bake or compress anything, it calculates live.

Now this would be really really slow, so fgarlin takes shortcuts like only taking into 4 possible wavelengths and a more simplistic model for the atmosphere particles

Arguably for what corona and vray are (realistic renderers) PRG generally wins. It has fewer knobs to tweak (because of it’s baked nature) but it covers most cases you’d encounter on earth. It does worse with really hazy or dusty atmospheres though. fgarlin gives you a little more freedom here because it has more knobs to tweak. (but at the cost of accuracy)

I personally think it’s worth giving users the option. But arguably, with PRG in place, any middle manager would say it’s a waste of time haha (the nerds can dream though)

Thanks for the reply! For some reason I honestly thought the current sky model in chaos products was the hosek wilkie one.

Cheers!