Commit Graph

8 Commits

Author SHA1 Message Date
Sergey Sharybin
e1bcc2d779 Cycles: Code cleanyp, sky model
For as long as code stays in official folders it should follow
our code style.
2015-03-28 00:28:37 +05:00
Sergey Sharybin
5ff132182d Cycles: Code cleanup, spaces around keywords
This inconsistency drove me totally crazy, it's really confusing
when it's inconsistent especially when you work on both Cycles and
Blender sides.

Shouldn;t cause merge PITA, it's whitespace changes only, Git should
be able to merge it nicely.
2015-03-28 00:15:15 +05:00
Campbell Barton
8d16869d83 Code cleanup: Add -Werror=float-conversion to Cycles 2014-05-03 07:31:46 +10:00
Campbell Barton
6c96535fd8 Code Cleanup: use static for sky_model_data.h 2013-12-13 04:40:30 +11:00
Campbell Barton
e8605f9df9 quiet compiler warnings 2013-08-30 16:52:54 +00:00
Sergey Sharybin
034d5a9578 Use static odifier for non-public functions in new sky model. 2013-08-29 12:36:02 +00:00
Thomas Dinges
d539bd4672 Cycles / Sky Texture:
* Added a new sky model by Hosek and Wilkie: "An Analytic Model for Full Spectral Sky-Dome Radiance" http://cgg.mff.cuni.cz/projects/SkylightModelling/ 

Example render:
http://archive.dingto.org/2013/blender/code/new_sky_model.png
Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/Textures#Sky_Texture

Details:
* User can choose between the older Preetham and the new Hosek / Wilkie model via a dropdown. For older files, backwards compatibility is preserved. When we add a new Sky texture, it defaults to the new model though. 
* For the new model, you can specify the ground albedo (see documentation for details). 
* Turbidity now has a UI soft range between 1 and 10, higher values (up to 30) are still possible, but can result in weird colors or black. 
* Removed the limitation of 1 sky texture per SVM stack. (Patch by Lukas Tönne, thanks!)

Thanks to Brecht for code review and some help! 

This is part of my GSoC 2013 project, SVN merge of r59214, r59220, r59251 and r59601.
2013-08-28 14:11:28 +00:00
Thomas Dinges
8b955e9b19 Cycles / Sky Model:
* Replaced the Preetham model with the newer Hosek / Wilkie model:
"An Analytic Model for Full Spectral Sky-Dome Radiance" http://cgg.mff.cuni.cz/projects/SkylightModelling/ 

* We use the sample code data, which comes with the paper, but removed some unnecessary parts, we only need the xyz version.
* New "Albedo" UI paraemeter, to control the ground albedo (between 0 and 1). 
* Works with SVM only atm (CPU and CUDA). 

Example render:
http://www.pasteall.org/pic/show.php?id=57635

ToDo / Open Questions:
* OSL still uses the old model, will be done later. In the meantime it's useful to compare the two models this way.
* The new model needs a much weaker Strength value (0.01), otherwise it's white. Can this be fixed? 
* Code cleanup.
2013-08-17 16:08:03 +00:00