Tag: svn

Google Earth trip video capture in GNU/Linux with Yukon/Seom

by on Jul.15, 2009, under GNU/Linux, hacks, HOWTO, tools, video

This is documentation of how I used Yukon and Seom to video capture a Google Earth trip for a recent video project in Fedora 10. I used the official installation guide as a starting point.

Compile the Seom library

I choose to install both Seom and Yukon in a custom prefix /home/plouj/yukon, rather than the system wide /usr or /usr/local.

$ svn co https://devel.neopsis.com/svn/seom/branches/packetized-stream seom
$ cd seom
$ ./configure --prefix=/home/plouj/yukon --arch="x86" --cflags="-W -Wall" && \
make CC="gcc -m32" && make install LIBDIR="lib"

Note that “–arch=”x86″ and “-m32″ are only necessary for me because my operating system is 64bit and I need 32bit versions of seom and yukon (to work with 32bit Google Earth).

Compile and install Yukon

$ svn co https://devel.neopsis.com/svn/yukon/branches/rewrite yukon
$ cd yukon
$ ./configure --prefix=/home/plouj/yukon/ --libdir="lib" --arch="x86" && \
make CC="gcc -L/home/plouj/yukon/lib -I/home/plouj/yukon/include -m32" && \
make install

Install Google Earth for Linux

Obviously get it here: http://earth.google.com/

Modify the Google Earth startup script

Since I chose /home/plouj/bin/ as the “Binary path” for Google Earth I was editing /home/plouj/bin/googleearth. All I had to do was to add yukon/seom library and executable paths at the end of the script:

...
cd "${GOOGLEEARTH_DATA_PATH}/"
LD_LIBRARY_PATH=/home/plouj/yukon/lib/:$LD_LIBRARY_PATH \
PATH=/home/plouj/yukon/bin:$PATH exec yukon "./googleearth-bin" "$@"

instead of the original:

cd "${GOOGLEEARTH_DATA_PATH}/"
exec "./googleearth-bin" "$@"

Capture

Finally, the capture process is well documented on the Yukon website.

Leave a Comment :, , , , , , , , , , , more...

HOWTO increase Blender’s memory cache limit for command line renders

by on Jun.08, 2009, under GNU/Linux, hacks, HOWTO

Blender sequencer gives the ability to optimize rendering of repeated frames by keeping the first result in memory cache and re-using it. Depending on the project, it might be necessary to increase this limit beyond the default 32MB. If the limit is surpassed while rendering a single frame, Blender clears the cache before proceeding to the next frame and the re-renders everything from scratch.

Increasing the cache limit is easy to do in the UI:
blender-cache-limit
This setting is stored in the user’s preference file (~/.B.blend on Linux systems) and, therefore, applies to all projects. However, rendering from the command line requires using the -b argument, which explicitly ignores the user’s preference file. Apart from editing and re-compiling the Blender source code, I found only one way to increase the memory cache limit.

The trick is to use a Python script, like below, to change the user preferences before rendering the scene:

import sys
import bpy

def main():
	bpy.config.sequenceMemCacheLimit=4096

if __name__ == '__main__':
	main()

Add the script to the command line like this:

./bin/blender -b sample-static-text.blend -P render_settings.py -a

Note that the order of arguments matters because first we need to load the scene (with -b), then change settings through Pythons (using the -P option) and finally render the animation (with -a). Also, you need at least version 2.49a of Blender for this to work.

For reference, here’s is the the source file which hardcodes the 32MB limit:

intern/memutil/intern/MEM_CacheLimiterC-Api.cpp:

...
static intptr_t & get_max()
{
        static intptr_t m = 32*1024*1024;
        return m;
}
...
Leave a Comment :, , , , , , , , , , , , , , , more...

HOWTO build DXX-Rebirth for Windows with MSYS/MinGW

by on Mar.07, 2009, under games, HOWTO

Introduction

In this post I’ll document the steps I had to take to build DXX-Rebirth (a modernized Descent game engine) for Windows using MSYS and MinGW.

MinGW, MSYS

FromĀ  Pantokrator’s blog:

  • install MinGW
    • choose a lowercase install path: c:\mingw
    • choose to download and install current version
    • enable g++ (for physfs)
  • install MSYS
  • install msysDTK

SDL and SDL_mixer

Also fromĀ  Pantokrator’s blog:

  • download the SDL source
  • in the MSYS shell, compile it with
./configure --prefix=/mingw && make && make install
  • download the SDL_mixer source and in a MSYS shell, build it with the same command:
./configure --prefix=/mingw && make && make install

PhysicsFS

  • Compile with the same command again:
./configure --prefix=/mingw && make && make install

SCons and Python

From Globulation2 MinGW instructions:

PATH=$PATH:/c/Python26:/c/Python26/Scripts
  • to the end of /etc/profile in MSYS so that SCons can run from the MSYS shell.

Subversion

DXX-Rebirth

  • checkout DXX-Rebirth from https://dxx-rebirth.svn.sourceforge.net/svnroot/dxx-rebirth
  • change the SConstruct script to call sdl-config as ‘sh sdl-config ‘:
...
Flags and stuff for all platforms...
env.ParseConfig('sh sdl-config --cflags')
env.ParseConfig('sh sdl-config --libs')
env.Append(CPPFLAGS = ['-Wall', '-funsigned-char'])
...
  • finally, in the MSYS shell, built with:
scons sdlmixer=1

Final Remarks

I had trouble with the latest version of PhysicsFS (1.1.1) because it uses cmake. For some reason it failing to find some prerequisites in MSYS. I also had trouble with version 1.0.1 of PhysicsFS (this is the version the official d1x-rebirth_v0.55.1-win.zip is built with) because the built failed with the following error:

warning: cannot find entry symbol _DllMainCRTStartup@12; defaulting to 00401000
...
undefined reference to WinMain@16

If you notice any problems or mistakes in this post, please mention them in the comments.

1 Comment :, , , , , , , , , , , , , , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...