mmp / pbrt-v4

Source code to pbrt, the ray tracer described in the forthcoming 4th edition of the "Physically Based Rendering: From Theory to Implementation" book.
https://pbrt.org
Apache License 2.0
2.8k stars 429 forks source link

Gpu rendering works really well, but does not render animated objects #353

Closed BlueBudgieNeedsWater closed 1 year ago

BlueBudgieNeedsWater commented 1 year ago

I am really happy that the gpu acceleration works so well. I use cmake gui 17.5, Cuda 11.8 and Optix 7.5 on Win10. Not a single warning or issue when compiling pbrtv4 with gpu support. The speed up is in the ball park of 150+ up to 200 for me with a RTX4070Ti, but I am on a slow Xeon cpu.

I checked animated objects today to see how motion blur looks, and all is fine without the --gpu option. I can set camera shutter times and animation start-stop times. All works as expected. When I use the gpu though, a warning appears that the animated object will be ignored. And indeed, in the rendered image the animated object is gone. Are animated object transforms only possible on cpu? I did not check an animated camera yet.

mmp commented 1 year ago

I'm glad it's working well for you!

Indeed, it's a known issue (#7) that the GPU path doesn't support animation. It's a matter of mapping pbrt's animation specification to optix API calls, which hasn't been done yet. (That isn't discussed in the book, so has been relatively low priority.)

PRs to fix it would be welcome. :-)