Skip to content
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

Light paths recording annotations and tweaks #2629

Merged
merged 2 commits into from May 30, 2019

Conversation

fu5ha
Copy link
Contributor

@fu5ha fu5ha commented May 28, 2019

  • Annotates light path creation code
  • Uses reinhard tonemapping (x/(1+x)) for displaying the radiance as color when drawing. This gives much more helpful color results than previously when displaying light paths, since it gives a sense of intensity as well as just hue:

old:
image
image

new:
image
image

  • Takes into account secondary emitter radiance in the middle of a light path. Previously if a path intersected with an emitter that was also a reflector that was not the origin of the path, the emitted radiance of said emitter would not be added to the path's total radiance.

… path display colors, take into account secondary emitter radiance in light paths
@LZaw LZaw requested review from LZaw and removed request for LZaw May 28, 2019 08:50
@LZaw
Copy link
Member

LZaw commented May 28, 2019

Looks good,
One (you?) could possibly refactor the three functions

void LightPathStream::create_path_from_hit_emitter(const size_t emitter_event_index)
void LightPathStream::create_path_from_sampled_emitter(const size_t emitter_event_index)
void LightPathStream::create_path_from_sampled_environment(const size_t env_event_index)

since they got a lot of overlapping code.

Copy link
Member

@dictoon dictoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! You seem to already have a good understand of how light path recording works.

@fu5ha
Copy link
Contributor Author

fu5ha commented May 30, 2019

Ready for review again :)

Copy link
Member

@dictoon dictoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@dictoon dictoon changed the title Light path creation annotation and tweaks Light paths recording annotations and tweaks May 30, 2019
@dictoon dictoon merged commit 09d8370 into appleseedhq:master May 30, 2019
@@ -385,7 +385,7 @@ void LightPathsWidget::render_light_path(const size_t light_path_index) const
light_path_recorder.get_light_path_vertex(i, v1);

auto radiance = Color3f::from_array(v1.m_radiance);
radiance /= sum_value(radiance);
radiance /= radiance + Color3f(1.0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be Color3f(1.0f)

@@ -269,9 +269,18 @@ void LightPathStream::create_path_from_hit_emitter(const size_t emitter_event_in

// Update current radiance.
const auto& throughput = event_data.m_path_throughput;
// Multiply by previous throughput to attenuate by the next hit
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

End your comments with a dot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants