Open SeanCurtis-TRI opened 1 year ago
So long as "the user has the final say", I think it'd be OK to default to better GPU.
By "the user has the final say", I mean at least that the user's --bpy_settings_file
is run last, so change anything they didn't like about our defaults.
Ideally, the *.blend
file (--blend_file
) would also trump our defaults, but I'm not sure if that's possible. Possibly it would undo our GPU settings unconditionally, even though the user didn't mean to.
When running the blender server and rendering against the Cycles renderer, I found that the default configuration was CPU bound. Within blender, I could configure blender's preferences to use GPU (which makes a huge performance difference).
Following the guidance from this stackoverflow question, I was able to introduce a
--bpy_settings_file
with the following code:This successfully changed the rendering to be GPU accelerated.
Ideally, the server should be doing this for us.
Naively, we could simply stash this code into the server. At this point, it's not clear if that could be harmful:
We might consider simply adding the code stanza and including a flag called
--disable_auto_gpu
. It would at least allow a user to opt-out if it doesn't do what they want.Finally, the stanza above is a bit of black magic incantation, it probably bears a bit more investigation to discover if it's all necessary/helpful.