Monday, 5 December 2011

Building Blender Cycles

Building Blender from source is quite hard, especially under Fedora which packages things... strangely.
http://wiki.blender.org/index.php/Dev:2.5/Doc/Building_Blender/Linux


Gives you most of the information you need.


If you wish to modify the build configuration you should:
cp ./build_files/scons/config/linux-config.py user-config.py  


Currently the following changes are needed under fedora 16 (fc16):

11c11
< BF_PYTHON_ABI_FLAGS = 'm'  # Most common for linux distros
---
> BF_PYTHON_ABI_FLAGS = 'mu'  # Most common for linux distros
90c90
< BF_GETTEXT_LIB = 'gettextlib'
---
> BF_GETTEXT_LIB = 'gettextpo'
137c137
< BF_FFMPEG_INC = '${BF_FFMPEG}/include'
---
> BF_FFMPEG_INC = '${BF_FFMPEG}/include/ffmpeg'

If you don't have a 3D mouse this will make the irritating warning go away:
233c233
< WITH_BF_3DMOUSE = True
---
> WITH_BF_3DMOUSE = False





I had the problem that running resulted in the pythin error:
found bundled python: /home/user/Blender/install/linux/2.60/python
Fatal Python error: Py_Initialize: Unable to get the locale encoding
LookupError: no codec search functions registered: can't find encoding
Aborted (core dumped)

The solution to this I found on this page:

The following script which sets various environmental variables for python then starts blender is suggested:
#!/bin/sh
export PYTHONPATH='/usr/lib64/python3.2:/usr/lib64/python3.2/lib-dynload:/usr/lib64/python3.2/site-packages'
export PYTHONHOME='/usr/lib64/python3.2'
cd ../install/linux/
./blender

Which appears to work.

There is currently the issue that cycles renderer is not actually included in the build... kind of missing the entire point of the escapade... I will edit when I work out why that is...

Friday, 25 November 2011

glmatrix background

Having recently been upgraded to Fedora Core 16 and discovering that Gnome3 and KDE are both unusable I have switched to XFCE4 and have been pleasantly surprised by how light and fast it is by comparison. A further surprise is that I can once again easily run an animated glmatrix background.

http://inspirated.com/2010/11/17/howto-use-animated-xscreensaver-matrix-backgrounds-with-xfce

/usr/libexec/xscreensaver/glmatrix -window-id $(xwininfo -name "Desktop" | grep 'Window id' | sed 's/.*\(0x[0-9a-z]*\).*/\1/g')

If you then enable compositing and transparent windows beautiful things happen :D

Friday, 23 September 2011

Changing video container format to AVI

My camera records .m4v video files, these are one of the formats that blender does not appear to support well, I use the following command for mencoder to put the video in an avi container.

mencoder -ovc copy -oac mp3lame -of avi -fps 19 -ofps 19 INFILE -o OUTFILE

It can be scripted over multiple files with a for loop:
for i in *.m4v; do video.prepare $i $i.avi ; done

Where video.prepare is the script:

#!/bin/bash
mencoder -ovc copy -oac mp3lame -of avi -fps 19 -ofps 19 $2 -o $1

Monday, 6 June 2011

MultiCam In Blender 2.5

So, I was wondering how to switch between multiple cameras in a blender scene when rendering to video. There are several tutorials that suggest making marks on the timeline and binding them to camera switches. eg:
http://www.youtube.com/watch?v=kq0wtgekSyA
This seamed rather cumbersome and inflexible. I found that one can achieve the same effect in a more intuitive manner in the video sequence editor (VSE) by using multiple scene tracks with different camera overrides set. You can then use soft cuts in the tracks to open holes in the higher tacks to achieve cuts to and from lower track cameras. This makes for a much more visual and intuitive editing system as you can see what camera is in action at each frame etc.







On the flexibility front one can use hard cuts to create time jumps, repeats or other effects.