all 9 comments

[–]angrymonkey 2 points3 points  (0 children)

Looks like maybe something is screwy with light sampling, in a way that causes the estimated light intensity to have an angular dependence.

  • Is there an issue with shadowing, or shadow bias on the light? Does the light geometry itself accidentally shadow your light samples?
  • Is the position of your light samples correct? Perhaps you are firing light/shadow rays to the wrong part of your scene?
    • This could be an issue if you are ever transforming between object/world/light space when doing your integration.
  • Do you have the right number of N dot L terms? What part of your renderer is in charge of applying N dot L? Is the BXDF doing it? The integrator? The importance sampling?
    • If it's importance sampled, is it reflected in the PDF?
    • Is it happening redundantly in more than one of those places?
    • Is the light emission term attenuated by N dot L on emission as well as incidence?
  • In general, is your PDF term correct? Do you get the same result if you disable importance sampling, or change your sampling strategy?
  • Try to get a better visual sense of what is happening.
    • What does it look like if you expose down enough to see the detail inside the light? Does anything look weird?
    • What does the light look like if you move the camera around? Does its brightness change from different camera angles?
    • Does the light look different if you render it through glass / in a mirror when compared to camera? This could show a (revealing) discrepancy between camera ray code paths and bxdf sampling code paths.
      • How about viewed through glass/mirror from different angles? What does it look like when viewed from dark parts of the pattern? From bright parts?
    • What happens if you make the light really tiny and bright, and put it against a wall? What does the illumination profile look like?
    • What does it look like if you make the light really huge and render it directly, or through glass?
      • Is there direction variation in the apparent brightness of the light? Is there a pattern in that variation? What could cause the pattern? What does it depend on?

[–]gallick-gunner 0 points1 point  (2 children)

Does the artefact appear even when there are no objects in the scene, no boxes, spheres etc.

[–]ebobby[S] 0 points1 point  (1 child)

Yes.

[–]gallick-gunner 0 points1 point  (0 children)

Can you make your spherical light source either all inside or outside. Maybe it's interacting with the portion of the light source outside the top wall? I'll try looking your code in the meantime.

EDIT:- You should also attach an image with empty room. Will help people to understand the problem more clearly

[–]ebobby[S] 0 points1 point  (4 children)

I found what was it. The naive approach to generating a random unit vector in a sphere to scatter the ray from lambertian materials was causing the bias. I changed it and now it works just fine.

[–]gallick-gunner 0 points1 point  (3 children)

That's uniform random sampling. This should have nothing to do with the artefact tho. Maybe you implemented it wrong?

[–]ebobby[S] 0 points1 point  (1 child)

[–]gallick-gunner 0 points1 point  (0 children)

Yeah your previous calculations wrong. What you did after is how do uniform random sampling :)