Skip to main content
added 131 characters in body
Source Link
Antares
  • 111
  • 4

A cosine between the cam-view-direction and the ray computes something like a specular area. A highlight. You can compare that with a kind of Phong shading. The more the ray is pointing "away" from the camera center, the lower this cosine gets. In the context of path tracing this would more be like a reflection of the surrounding objects being stronger visible in that area.

(pdf = path distribution factor, if I am not mistaken) In the second snippet as I understand it, might be a bug? Because you probably want to store the average radiance and not something scaled=multiplied by pdf. But the pdf was computed as 1/... in the first snippet, so the division would turn out to be a multiplication. Seems odd.

/* Second thought: Normally you would have a factor "alpha" with the cosine, which controls the size of that highlight area. With just the cosine, that factor would be always 1.... maybe the radiance (second snippet) is meant to be that factor, but it does not quite make sense, because radiance is a vector. */

A cosine between the cam-view-direction and the ray computes something like a specular area. A highlight. You can compare that with a kind of Phong shading. The more the ray is pointing "away" from the camera center, the lower this cosine gets.

(pdf = path distribution factor, if I am not mistaken) In the second snippet as I understand it, might be a bug? Because you probably want to store the average radiance and not something scaled=multiplied by pdf. But the pdf was computed as 1/... in the first snippet, so the division would turn out to be a multiplication. Seems odd.

/* Second thought: Normally you would have a factor "alpha" with the cosine, which controls the size of that highlight area. With just the cosine, that factor would be always 1.... maybe the radiance (second snippet) is meant to be that factor, but it does not quite make sense, because radiance is a vector. */

A cosine between the cam-view-direction and the ray computes something like a specular area. A highlight. You can compare that with a kind of Phong shading. The more the ray is pointing "away" from the camera center, the lower this cosine gets. In the context of path tracing this would more be like a reflection of the surrounding objects being stronger visible in that area.

(pdf = path distribution factor, if I am not mistaken) In the second snippet as I understand it, might be a bug? Because you probably want to store the average radiance and not something scaled=multiplied by pdf. But the pdf was computed as 1/... in the first snippet, so the division would turn out to be a multiplication. Seems odd.

/* Second thought: Normally you would have a factor "alpha" with the cosine, which controls the size of that highlight area. With just the cosine, that factor would be always 1.... maybe the radiance (second snippet) is meant to be that factor, but it does not quite make sense, because radiance is a vector. */

details
Source Link
Antares
  • 111
  • 4

A cosine between the cam-view-direction and the ray computes something like a specular area. A highlight. You can compare that with a kind of Phong shading. The more the ray is pointing "away" from the camera center, the lower this cosine gets.

(pdf = path distribution factor, if I am not mistaken) In the second snippet as I understand it, might be a bug? Because you probably want to store the average radiance and not something scaled=multiplied by pdf. But the pdf was computed as 1/... in the first snippet, so the division would turn out to be a multiplication. Seems odd.

/* Second thought: Normally you would have a factor "alpha" with the cosine, which controls the size of that highlight area. With just the cosine, that factor would be always 1.... maybe the radiance (second snippet) is meant to be that factor, but it does not quite make sense, because radiance is a vector. */

A cosine between the cam-view-direction and the ray computes something like a specular area. A highlight. You can compare that with a kind of Phong shading.

(pdf = path distribution factor, if I am not mistaken) In the second snippet as I understand it, might be a bug? Because you probably want to store the average radiance and not something scaled=multiplied by pdf. But the pdf was computed as 1/... in the first snippet, so the division would turn out to be a multiplication. Seems odd.

A cosine between the cam-view-direction and the ray computes something like a specular area. A highlight. You can compare that with a kind of Phong shading. The more the ray is pointing "away" from the camera center, the lower this cosine gets.

(pdf = path distribution factor, if I am not mistaken) In the second snippet as I understand it, might be a bug? Because you probably want to store the average radiance and not something scaled=multiplied by pdf. But the pdf was computed as 1/... in the first snippet, so the division would turn out to be a multiplication. Seems odd.

/* Second thought: Normally you would have a factor "alpha" with the cosine, which controls the size of that highlight area. With just the cosine, that factor would be always 1.... maybe the radiance (second snippet) is meant to be that factor, but it does not quite make sense, because radiance is a vector. */

idea for the pdf
Source Link
Antares
  • 111
  • 4

A cosine between the cam-view-direction and the ray computes something like a specular area. A highlight. You can compare that with a kind of Phong shading.

No idea why dividing(pdf = path distribution factor, if I am not mistaken) In the second snippet as I understand it, might be a bug? Because you probably want to store the average radiance and not something scaled=multiplied by pdf. But the pdf was computed as 1/... in the first snippet, sorryso the division would turn out to be a multiplication. Seems odd.

A cosine between the cam-view-direction and the ray computes something like a specular area. A highlight. You can compare that with a kind of Phong shading.

No idea why dividing by the pdf, sorry.

A cosine between the cam-view-direction and the ray computes something like a specular area. A highlight. You can compare that with a kind of Phong shading.

(pdf = path distribution factor, if I am not mistaken) In the second snippet as I understand it, might be a bug? Because you probably want to store the average radiance and not something scaled=multiplied by pdf. But the pdf was computed as 1/... in the first snippet, so the division would turn out to be a multiplication. Seems odd.

Source Link
Antares
  • 111
  • 4
Loading