Script to render with gpu activated ?

Hi ! I am searching a script to enable GPU rendering since the normal command line will only offer to render with cpu. But my searches didn’t return anything. Is there any trick Python can make ? Thanks ! LeHibou

Can’t you just save the .blend file with GPU activated for rendering then issue the render command? It should work assuming the .blend file is being rendered on the same machine with the same GPU it was saved on.

Nope ! I work on travel on a laptop and I send my files to my “farming computers” via ssh. My macbook is clearly not to apply as cuda capable (gma950). As a result, I just don’t have the GPU option in the preferences. That’s why one should be able to tell cycles to render on GPU even if they can’t select it in their preferences. Any idea how I could do ? Thanks ! LeHibou

the new cycles rendering can use a gpu (if new enough, mine is not supported :wink: )

Yep PKHG,

But I would like to be able to enable this before sending it to render.
There should be an option forcing the system to find a suitable gpu to render online.

Don’t think so ?

@LeHibou: I thought my macbookpro wouldn’t do cycles gpu either, but after some research I discovered it was just that most builds assume shader model 1.3 or above. The 2010 MBP models with geforce 330M do support shader model 1.2 …

Thus, it is a matter of getting a hold of a blender build which has had sm_12 compiled for it.

Also, odd but probably to be expected, you can’t do gpu rendering if you have launched blender using an external monitor in dual-screen mode, because then you are forcing the intel integrated graphics, instead of the nvidia. Closing the lid and using only the external -> works.

I know you said ‘macbook’ and not ‘macbook pro’, but I thought maybe, its a longshot, maybe this will help somebody to know.