I want to net render my project without GUI. I know blender command line. I also know blender -E help and tried the command blender -b file.blend -E NET_RENDER -s 10 -e 50 -t 2 –a but before running this command we need to set parameters like a master server, port etc. by GUI Can you guide me on how to set Address(master) while net rendering through command-line?
You can do it like this:
blender -b -y -P master.py -noaudio --addons netrender file.blend
Contents of master.py
:
import bpy
bpy.ops.wm.addon_enable(module="netrender")
bpy.context.scene.render.engine="NET_RENDER"
bpy.context.scene.network_render.mode = 'RENDER_MASTER'
bpy.context.scene.network_render.path = "/tmp/"
bpy.context.scene.network_render.server_address = "[default]"
bpy.context.scene.network_render.server_port = 8200
bpy.ops.render.netclientstart()
For the slave you can use the same blender command with a second python script. Create a copy of master.py
, name it slave.py
or something and change the according line for the mode to:
[...]
bpy.context.scene.network_render.mode = 'RENDER_SLAVE'
[...]
Tested in blender 2.79a.
Note: this is currently broken in the latest daily builds of blender 2.80 (refer here) I'm currently searching for a workarround, to get the new gpu / host memory feature working with automated network rendering, but they'll probably fix it anyways when blender 2.80 comes out.
-
$\begingroup$ If you're interested in the blender 2.80 thing: Just found this seems to be working (no promises) wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Render/… $\endgroup$ – Leso_KN Mar 21 '18 at 2:43