Created
August 9, 2017 22:53
-
-
Save balbinus/8cafe43cd72ccec4d649fc1d7cf6387e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bpy | |
bpy.context.user_preferences.system.compute_device_type = 'CUDA' | |
bpy.context.user_preferences.system.compute_device = 'CUDA_0' | |
bpy.context.scene.cycles.device = 'GPU' | |
print(bpy.context.scene.cycles.device) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# it's super important to give the script AFTER the Blender file so that the scene can be set to GPU. | |
blender -noaudio --background file.blend \ | |
--python gpurender.py \ | |
--render-output /tmp/ --render-anim --frame-start 1 --frame-end 140 \ | |
--engine CYCLES |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment