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?
Asked
Active
Viewed 3,393 times
4
-
Yes, this is quite possible. Some related questions: http://blender.stackexchange.com/q/3061/599 and http://blender.stackexchange.com/q/724/599 – gandalf3 Jul 29 '15 at 00:33
-
I'm not sure about running the game engine without a gui, but you could use the built in rigid body sim. See http://blender.stackexchange.com/q/34400/599 – gandalf3 Jul 29 '15 at 00:45
-
Just a note, the physics engine in Blender is not physically-acurate nor energy conserving. I would evaluate the simulation results carefully. – Mike Pan Jul 29 '15 at 06:17
-
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. – Monster Jul 29 '15 at 11:34
-
I'd like video output (hence the use of blender), I just want to run it without the GUI – 29374819 Jul 29 '15 at 19:17
-
Headless means you do not have a video output device. Typically the results are written to persistent storage (e.g. files). The BGE does not support such feature. With Blender I do no know .. see the comments above. I'm still not sure if you talk Blender or the BGE. Blender does not need any input from the logic editor. – Monster Jul 30 '15 at 07:24
-
Oh ok-I've been using bge up to this point but if I can achieve the same results just with blender that would be great – 29374819 Jul 31 '15 at 00:02
1 Answers
3
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
CeDeROM
- 141
- 7
-
how do you enable time profiling for background jobs in 2.83 from the command line? – Pierre Schiller Jun 04 '20 at 20:11