Weizhen Huang weizhen
  • Joined on 2022-10-03
Weizhen Huang commented on pull request blender/blender#123532 2024-09-30 14:54:31 +02:00
Cycles: Additional scattering phase functions

Why is this clamp to 2 here?

Weizhen Huang commented on pull request blender/blender#123532 2024-09-30 14:54:29 +02:00
Cycles: Additional scattering phase functions

This is trivial, but I think writing hg->g = fast_expf(-0.0990567f / (d - 1.67154f)); inside the if (hg) condition etc. makes it more clear to which phase functions these parameters are associated to.

Weizhen Huang commented on pull request blender/blender#123532 2024-09-30 14:54:28 +02:00
Cycles: Additional scattering phase functions

Should add a comment that this function is for path guiding.

Weizhen Huang commented on pull request blender/blender#123532 2024-09-30 14:54:27 +02:00
Cycles: Additional scattering phase functions

It's not obvious what sin2_theta_2means. I would suggest to rename it sin_half_theta_sq and add/or a comment saying it's sin^2(theta / 2).

Weizhen Huang commented on pull request blender/blender#123532 2024-09-30 14:54:25 +02:00
Cycles: Additional scattering phase functions

This condition is incorrect, it should be the same as phase_draine().

Weizhen Huang commented on pull request blender/blender#123532 2024-09-30 14:54:24 +02:00
Cycles: Additional scattering phase functions

The constraint of positive x in the comment is easy to miss. Better adding kernel_assert()

Weizhen Huang commented on pull request blender/blender#125999 2024-09-30 12:11:54 +02:00
Cleanup: Cycles: Consolidate coordinate system conversions

Mostly looks fine to me, have some suggestions about naming

Weizhen Huang commented on pull request blender/blender#125999 2024-09-30 12:11:53 +02:00
Cleanup: Cycles: Consolidate coordinate system conversions

Not sure if you want to split the commits when merging, if you do then in 3945ce06f9 it should be *wo = X * localO.Z + Y * localO.X + Z * localO.Y (You wrote localO.X twice).

Weizhen Huang commented on pull request blender/blender#125999 2024-09-30 12:11:51 +02:00
Cleanup: Cycles: Consolidate coordinate system conversions

The to_global()/to_local() and template change is gone?

Weizhen Huang commented on pull request blender/blender#125999 2024-09-30 12:11:50 +02:00
Cleanup: Cycles: Consolidate coordinate system conversions

polar_to_cartesian()

Weizhen Huang commented on pull request blender/blender#125999 2024-09-30 12:11:49 +02:00
Cleanup: Cycles: Consolidate coordinate system conversions

disk_to_hemisphere()

Weizhen Huang commented on pull request blender/blender#125999 2024-09-30 12:11:48 +02:00
Cleanup: Cycles: Consolidate coordinate system conversions

Can use safe_divide()

Weizhen Huang commented on pull request blender/blender#125999 2024-09-30 12:11:47 +02:00
Cleanup: Cycles: Consolidate coordinate system conversions

Add brakets {}

Weizhen Huang pushed to main at weizhen/.profile 2024-09-30 11:00:19 +02:00
730c8177b1 Update reports/2024.md
Weizhen Huang pushed to unbiased-ray-marching at weizhen/blender 2024-09-25 21:23:03 +02:00
59747d30f9 WIP: shade volume
a56971571b WIP: traverse Octree
f829199d4d Don't add volume to global BVH, update octree when needed
ae195e7e3d Initial commit of Octree build
Compare 4 commits »
Weizhen Huang commented on pull request blender/blender#123046 2024-09-20 12:01:39 +02:00
Cycles: add Central Cylindrical Panoramic camera model

@susman This change will be part of Blender 4.3, for now you can download the latest 4.3 Alpha build here https://builder.blender.org/download/daily/

Weizhen Huang commented on pull request blender/blender#123532 2024-09-17 14:25:05 +02:00
Cycles: Additional scattering phase functions

This formulation has a singularity when s_theta == 1, which causes many fireflies when looking again the light source, can you deal with this special case?

Weizhen Huang commented on pull request blender/blender#123532 2024-09-17 14:25:04 +02:00
Cycles: Additional scattering phase functions

You can just write float v = -logf(2.0f * B * (s90 - 1.0f) + 1.0f) / logf(s90); to save some computation.

Weizhen Huang commented on pull request blender/blender#123532 2024-09-17 14:17:46 +02:00
Cycles: Additional scattering phase functions

The most important thing is to make it clear what the arguments are and what this function computes. I guess you can add a comment above the function:

/* Given a random number `rand`, sample…
Weizhen Huang commented on pull request blender/blender#123532 2024-09-17 11:48:02 +02:00
Cycles: Additional scattering phase functions

For Volume Scatter the new mode is not necessary, the colors are allowed to go above 1 so you can just put your per channel density there. For Volume Absorption I admit the new parametrization is…