mitsuba-renderer / mitsuba2

Mitsuba 2: A Retargetable Forward and Inverse Renderer
Other
2.04k stars 267 forks source link

render_torch doesn’t work when setting vertex_positions_buf to be a torch tensor #205

Open yaying-00 opened 4 years ago

yaying-00 commented 4 years ago

Hi,

I am doing optimization about the height profile of a glass panel. I would like to combine the differentiable rendering with Pytorch. I have only one sphere area emitter and a glass panel in the scene. The back of the glass panel is defined by a 256*256 grid. I keep the ‘grid.vertex_positions_buf’ parameter of that grid and set it to be a torch tensor. The program is killed when running render_torch.

I also tried keeping the reflectance.value of the emitter and setting params to be a torch tensor, and the code works fine.

I am attaching the files to reproduce this issue. Thanks in advance! vertex_position_torch.zip

kopetri commented 2 years ago

Any updates on this?