I'd like to use Blender's physics engine/rendering capabilities headlessly (so it would have to be via command line). I'd like to run a lot of little physics experiments (thousands) on a server. Python scripting will be involved in this, naturally-not sure how to do this without using the logic editor, though...I need some way to be able to run these scripts and have Blender output some sort of physics "movie" without having to deal with the GUI. Is this possible?
2
-
$\begingroup$ Yes, this is quite possible. Some related questions: blender.stackexchange.com/q/3061/599 and blender.stackexchange.com/q/724/599 $\endgroup$ – gandalf3♦ Jul 29 '15 at 0:33
-
$\begingroup$ I'm not sure about running the game engine without a gui, but you could use the built in rigid body sim. See blender.stackexchange.com/q/34400/599 $\endgroup$ – gandalf3♦ Jul 29 '15 at 0:45
-
$\begingroup$ Just a note, the physics engine in Blender is not physically-acurate nor energy conserving. I would evaluate the simulation results carefully. $\endgroup$ – Mike Pan Jul 29 '15 at 6:17
-
$\begingroup$ The physics engine used by the BGE is the Bullet engine. I suggest to check if you can find an application that uses Bullet too but provides you with a gui-less processing. The BGE is designed to serve games. Typically they need video output. An application focusing on physics simulation might fit your needs better. $\endgroup$ – Monster Jul 29 '15 at 11:34
-
$\begingroup$ I'd like video output (hence the use of blender), I just want to run it without the GUI $\endgroup$ – Archana Ram Jul 29 '15 at 19:17
1
$\begingroup$
$\endgroup$
Have you tried blender --background -P your_script.py -- py_argv1 py_argvN
?
% blender --help|grep background
-b or --background
Run in background (often used for UI-less rendering).
Enable time profiling for background jobs.
Playback <file(s)>, only operates this way when not running in background.
# blender --background test.blend --render-frame 1 --render-output '/tmp'
# blender --background --render-output /tmp test.blend --render-frame 1
# blender --background test.blend --render-output /tmp --render-frame 1