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

projector's light can't walk through polarizer or circular #1462

Open
guge2 opened this issue Jan 17, 2025 · 4 comments
Open

projector's light can't walk through polarizer or circular #1462

guge2 opened this issue Jan 17, 2025 · 4 comments

Comments

@guge2
Copy link

guge2 commented Jan 17, 2025

I am simulating a scan system. Use a projector and camera, everything going on util polarization are needed, there are some code of me:

'filter1_shape': {
      'type': 'obj',
      'id': 'filter1',
      'filename': str(data_root / '../scenes_mitsuba/meshes/rectangle.obj'),
      'bsdf': {
          'type': 'circular',
          'left_handed': False
      },
      'to_world': mi.ScalarTransform4f().translate([0, 10, -object_mean_distance+100])\
                  .scale(20*scale_to_meter).rotate([0, 0, 1], angle=45)\
                  .rotate([0, 1, 0], angle=180)
  },
"emitter": {
      "type": "projector",
      "irradiance": {
          "type": "bitmap",
          "filename": photo_abs_root
      },
      "scale": 0.05 * 1000000 / scale_to_meter / scale_to_meter,
      "to_world": proj_transform,
      "fov": fov_proj
  }

nomatter use polarizer or circular;
nomatter put filter before my projector how far between projector and object;
nomatter turn every degree;
nomatter what intensity I set;
the projector's light can't through the filter, the filter: rectangle.obj is a slice, download from official example: meshes/rectangle.obj.

why, help please, I'm gonna cry now.

@guge2
Copy link
Author

guge2 commented Jan 22, 2025

hello? I found that it's all fine if use area light, but projector or spot light can't walk through glass or polarizer.

@njroussel
Copy link
Member

Hi @guge2
Sorry, we're quite busy with other tasks at the moment. I should have more time next week.

@njroussel
Copy link
Member

njroussel commented Jan 27, 2025

Hello again @guge2

What integrator are you using?
Unless you're using a ptracer or volpath, this behavior is expected. Other integrators do not handle Null BSDFs efficiently during emitter sampling, making it impossible to connect your light path to an emitter.

@guge2
Copy link
Author

guge2 commented Feb 6, 2025

Hello again @guge2

What integrator are you using? Unless you're using a ptracer or volpath, this behavior is expected. Other integrators do not handle Null BSDFs efficiently during emitter sampling, making it impossible to connect your light path to an emitter.

Thanks for your reply, when I use volpath, projector's light can walk through glass, polarizer, but they just act as a glass, there's no any render of polarization because I can't use volpath and stokes together.
Is it means that: If someone want to simulate a scanner with polarizer, only they can do is to wait for mitsuba3's update? If yes, I'd like to wait, thank you.

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

No branches or pull requests

2 participants