-
Notifications
You must be signed in to change notification settings - Fork 332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Physically-based Sky Model based on Nishita93 #2907
base: master
Are you sure you want to change the base?
Physically-based Sky Model based on Nishita93 #2907
Conversation
Updating local appleseed repo
…ce through earth surface
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey,
This is a first iteration. I didn't mark all things everywhere, but one or two examples of the same thing (e.g. comments, alignment, formatting in general).
I didn't go into the math and numbers yet, that's up for a second iteration (possibly joined).
I'm not sure about the current class/namespace/... splits. I'll evaluate the workflow in a later iteration and possibly come up with a different module-layout.
class opticaldepth { | ||
|
||
public: | ||
float rayleigh; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
classvariables start with an m_
. Also, why did you make them public?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do need to access these variables in physicalsky.cpp l:226, for example.
I could write a getter, but I don't think that is very C++ like. What would be your recommended solution?
|
||
// Sun irradiance (W*m^-2*nm^-1) values at the top of the atmosphere. | ||
// Source: https://www.nrel.gov/grid/solar-resource/spectra.html, Table SMART MODTRAN ETR Spectra. | ||
const float sun_radiance[num_wavelengths] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These values are already present in src/modeling/light/sunlight.cpp
. Can we join them somehow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's discuss a good solution for joining these arrays before I touch someone elses code :)
|
||
using namespace foundation; | ||
|
||
namespace nishita { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we discussed before, I think a class makes more sense here.
src/appleseed/renderer/modeling/environmentedf/nishita93environmentedf.cpp
Show resolved
Hide resolved
src/appleseed/renderer/modeling/environmentedf/nishita93environmentedf.cpp
Show resolved
Hide resolved
Thanks for the review! I'll try to resolve most of the commends next week, maybe we can schedule a meeting afterwards |
This PR implements a new environmentEDF based on the Nishita93 sky model.
The sky model was implemented by me as part of a university thesis with support from @LZaw.
The here proposed sky model, referred to as "Applesky20" within my thesis, implements Nishita93 single scattering sky model but extends on Nishita93 by adding the support for Ozone. A comparison of the here proposed "Applesky20" model shows that it can easily compete with the new physical sky model released by Blender v2.92 a few months ago. A port of Blender Cycles sky model can be found in my fork of appleseed.
Full implementation details are given in my bachelor thesis about phsyically based sky models in appleseed.
This PR is marked as "WIP" since the following issues must be resolved first:
None the less, a first review of this PR would be much appreciated, primarily focusing (at least) on the following:
Note that a full review (testing with demo-scenes etc.) will only be possible once the three points above are resolved.