pbrt-v4 icon indicating copy to clipboard operation
pbrt-v4 copied to clipboard

Transparent (dielectric) material with projection light gives unexpected behavior

Open kontramind opened this issue 4 years ago • 7 comments

Hi, Using projector light to simulate a scene with structured light. The scene contains transparent (dielectric) objects.

Here is an image with ambient light, just to have an overview of the scene. One can already notice suspicious shadows behind the bottles. I would expect that patterns are penetrating the bottles. image

Things become even more apparent if env light is turned off (only projected patterns). image

I can get something when roughness is set to non-zero value, but not sure if it is "correct" (too much noise?). See image below (only one bottle is tweaked to have roughness). image

The questions are:

  • Am I doing something wrong?
  • Is this even possible to achieve with the current state of pbrt?
  • Should I use some mix of the materials?
  • Are there any suggestions how to "tweak" pbrt?

Many thanks Aleksandar

kontramind avatar Sep 08 '21 09:09 kontramind

In addition, have performed an experiment where instead of projector a focused red spot light is used.

Here is an image with a bottle shape and diffuse material - to illustrate where the light hits. image

And here is an image of same scene but bottle has been made as dielectric. image

kontramind avatar Sep 08 '21 09:09 kontramind

The VolPath integrator appears to ignore(?) SpecularTransmission but does work with GlossyTransmission (when the dielectrics have roughness). Whether that is a bug or by design I'm not sure.

If you switch to another integrator like the BDPT you can get SpecularTransmission.

bdpt bdpt2

shadeops avatar Sep 12 '21 05:09 shadeops

@shadeops Hi, Many thanks for your input. What type of light source you were using?

Please, would it be possible for you to share the scene files so I can reproduce your images? Aleksandar

kontramind avatar Sep 12 '21 06:09 kontramind

Top image is using a AreaDiffuse light with a sphere shape. The bottom image is using a projector light. Both were rendered with the BDPT.

example.zip

shadeops avatar Sep 12 '21 06:09 shadeops

Top image is using a AreaDiffuse light with a sphere shape. The bottom image is using a projector light. Both were rendered with the BDPT.

example.zip @shadeops

Found your example very useful. One thing to note wrt. my bottle(s) is that normals for the geometry may not be correct; I really hope that is not the complexity of the geometry. Hence I continued to play with your setup; simple transparent slab.

I have added color to the background planes and used more dense pattern. With BDPT, one can see that lower left corner in the slab is giving dark shadows even thought the red background should be visible. See the image below. image

Then I tried SPPM (photon mapping) and it seems that the dark area improves. However, due to the algorithm itself, patterns appear more noisy/fuzzy. See the image below. image

This kind of hints that a combination of BDPT and SSPM could give more faithful result. Maybe having VCM (Vertex Connection and Merging) light transport algorithm would help; not implemented in PBRT.

What dp you think @shadeops (and @mmp)?

kontramind avatar Sep 12 '21 11:09 kontramind

If the sppm integrator looks a bit blurry you can usually lower the photon search radius.

I'm not entirely sure where that black triangle is coming from in the bidirectional integrators. Perhaps a limitation when sampling a point light source via specular transmission.

VolPath

volpath

MLT

mlt2

BDPT

bdpt

SPPM

sppm3

Scene

scene.zip

Just to make sure that the triangle faces were facing the right way I made an alternate version using bilinear meshes as well that you can switch between.

shadeops avatar Sep 12 '21 20:09 shadeops

@shadeops Many thanks for your tips. I went with a small radius of 0.001 in SPPM. Also, box filtering worked better for my case. I also tried different integrators and got results in sync with yours.

Also have noticed, when it comes to noise with SPPM, it gets even worse if one is using realistic camera with lenses; especially for parts behind the transparent items.

Perspective camera image

Realistic with lenses image

kontramind avatar Sep 13 '21 05:09 kontramind