yuki-koyama / blender-cli-rendering

Blender Python scripts for rendering images directly from command-line interface
GNU General Public License v3.0
756 stars 108 forks source link

Enable GPU acceleration when rendering #31

Closed bsridatta closed 3 years ago

bsridatta commented 3 years ago

The added code blocks let blender leverage the GPU if available. (Code Source - https://blender.stackexchange.com/a/196702)

Running 10_mocap.py with resolution 100, samplings 128, and rendering single frame without GPU - Time: 01:57.42 (Saving: 00:00.37) with GPU - Time: 00:35.81 (Saving: 00:00.36) CUDA GeForce GTX TITAN X (Display) 1 Intel Core i7-5930K CPU @ 3.50GHz 1

Much faster!

yuki-koyama commented 3 years ago

Thank you! This PR is very helpful.

bsridatta commented 3 years ago

Thank you for accepting the PR! I do not see myself learning bpy without this repo. Thanks!