linograndiotoy wrote:It's great to have several Daylight models available in Octane.
I'd love to use the newest introduced ones, but I find the visible ground in Nishita and Hosek-Wilkie models quite a showstopper.
Would it be possible to have those models behave as the Octane and Preetham variations, so to get a natural and seamless gradient without any visible ground?
The Hosek-Wilkie daylight model implementation is based on a mathematical model that only predicts the sky color in the upper hemisphere (if you are so inclined you can see all the gory details from Hosek and Wilkie themselves at https://cgg.mff.cuni.cz/projects/SkylightModelling/). The Preetham model is the same in that regard (the Hosek-Wilkie model is based on it), but Octane extrapolates below the horizon anyway. This is not too bad because the Preetham model produces a reasonably smooth gradient to a reasonable grey below the horizon. However the Hosek-Wilkie model produces a pretty abrupt transition to a greenish color when used outside its intended domain, so when implementing the Hosek-Wilkie model I "corrected" this "mistake". Logically it makes sense, as you can't see through the planet.
We could look into adding the possibility of turning off the ground, but it won't be seamless - you can basically achieve something similar by just choosing a similar greenish ground color.
I'm not intimately familiar with the Nishita model, but as it also has a much more abrupt transition at the horizon than the Preetham model, and is intended for rendering planets (rather than just the sky), I assume it would produce unusable results if attempting to use just the sky part of the model below the horizon. I haven't tested this because it isn't trivial to break the model into its individual pieces like that.
As an aside, the Hosek-Wilkie model actually uses the ground color not just for the lower hemisphere, but also to simulate sunlight that is reflected off the ground into the sky, affecting the color of the sky (apparently this is a thing).