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

New sunsky emitter plugin #1491

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open

New sunsky emitter plugin #1491

wants to merge 13 commits into from

Conversation

njroussel
Copy link
Member

This PR supersedes #1473. Its content is very similar to the original PR, but has a refactoring/formatting passes.

The dataset generation code (originally commented code in #1473) was refactored, packaged and moved to the resources/data submodule.

⚠️ mitsuba-renderer/mitsuba-data#19 must be merged prior to this PR, and the resources/data submodule` must be updated accordingly ⚠️

Again, credits to @matttsss for this excellent work.

@njroussel njroussel requested a review from rtabbara February 13, 2025 15:54
@njroussel njroussel mentioned this pull request Feb 13, 2025
8 tasks
spectral or RGB mode, if the final output is an sRGB image, it can happen that
it contains negative pixel values or be over-saturated. These results are left
un-clamped to let the user post-process the image to their liking, without
loosing information.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
loosing information.
losing information.

FloatStorage params = dr::gather<FloatStorage>(tgmm_tables, indices[mixture_idx] + param_indices);

// Apply lerp factor to gaussian weights
//dr::scatter_reduce(ReduceOp::Mul, params, (FloatStorage)lerp_factors[mixture_idx], gaussian_weight_idx);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this commented out code be removed?

callback->put_parameter("to_world", *m_to_world.ptr(), +ParamFlags::NonDifferentiable);
}

void parameters_changed(const std::vector<std::string> & /*unused*/) override {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we be filtering on what to update based on the keys passed? e.g. I don't think all updates necessarily require us to update the TGMM?

Comment on lines +79 to +82
template <typename Value>
MI_INLINE Point<Value, 2> from_spherical(const Vector<Value, 3> &v) {
return { dr::atan2(v.y(), v.x()), dr::unit_angle_z(v) };
}
Copy link
Member

Choose a reason for hiding this comment

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

I keep re-implementing this function. Would it make sense to move it to math.h instead and expose it with Python bindings?

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.

4 participants