Blender and Python and VLC

Since getting home on Friday after work, I had a plan.

  1. Figure out the animation and timeline in Blender. I’ve done this. I can now rotate, translate, scale and modify objects on the timeline. As well as texturing, particles and other things useful for animations. I’ve still yet to show video in a texture, but that looks a doddle.
  2. Play animations (for testing) from the ‘.blend’ file. This was a bit fiddly as I had to use the Blender Game Engine and all the animations I had done for each individual objects, I had to add in the ‘BGE’. The Blender player works fine with the ‘.blend’ files with many exceptions. There’s a lot that Blender can do that the player doesn’t handle. A simple one is the morphing of an object. Which rules out a hell of a lot of Blenders stuff.
  3. Blender rendering videos. Awesome this one. It will render videos to OGV format. All effects included, or at least I hope so. I’ve rendered a 15 second video many times on my laptop in the background (it is an i7) and I can still get on with other stuff. This will be much quicker on my PC, but my laptop is darn fast as is.
  4. Use Bash or another scripting language to play the videos because the Blender player, although fast and smooth, doesn’t do everything. I’ve been successful with Python and the VLC plugin for it, so I now know I can use the VLC library to play these files. I’m still beginning with Python, but it did show me how easy the VLC library is to use.

Although I’ve made sure I’ve put time out to get out this weekend just to keep myself in a good mood, this progress has been great.

It’s a long learning curve with Blender, but at the moment, I can make use of it to do 90% of what I need it for. 30 frames per second with a medium 3D scene was taking on my laptop 2.0 seconds per frame to render at 1920 x 1080. And 15 seconds of full quality is about 12Mb.

The framework around all of this will be a WIP from today and it is going to be so awesome even I can’t wait.

The next stage for me will be integrating custom engines to produce these animations better then the Blender player without the need to render video files.

Back to Blender… See y’all soon…

Posted in Blender, python, VLC.