Category Archives: Uncategorized

Build OGRE On Mac OSX 10.5.8

It seems I have problem building OGRE 1.7.3 source on Mac OSX 10.5.8, even the .xcodeproj file generated by CMake cannot be opened, which suggesting a usual suspect: XCode 3.0 is too old for this job. So I tried the older version 1.6.5. It comes with a .xcodeproj file I can open. After redirecting Base SDK Path to MacOSX10.5.sdk, most targets are built without error.


Leave a comment

Filed under Uncategorized

Google Reverse Image Search

Google seems to pull out another new trick: reverse image search. You can drop an image into the search bar, wait for a while, and get supposed relevant results. I have been playing with it for a while. Following two images, snapshots from news podcast. One is Ronald Reagan, the other is JFK. Both search returns good result:

The icon of VLC player leads to the site of VLC

And this blue figure actually leads todoctor manhattan!

Man, this is crazy. How does it work?

Leave a comment

Filed under Uncategorized

Flying Monsters Got Award

David Attenborough is still making natural history programs, and his Flying Monsters is rewarded with the BAFTA. Also feel good to see my work in the hand of the old man. It is a Quetzalcoatlus.

Leave a comment

Filed under Uncategorized

Boost Python Embedded Example

The reason to call Python inside C++ program is I want to use PyQt for UI stuff. This document is intended to show how to build a minimal example to embed Python in C++ using Boost Python, on Max OS X.

To make this working, one should install a few programs in the system, including: Python, Qt, PyQt, and Boost.

For Leopard, the built-in Python is 2.5, which is too old to work with PyQt. Need update to 2.6. I would prefer to  download the tar ball of Python source and build myself:

$ ./configure --enable-framework

$ make

$ make install

When framework is enabled, Python will be built into


Now you have multiple versions of Python in the system, probably you are still using the old one. To make sure it is up-to-date, start Python, type:

import sys


Should return


This is what Python you are using. Type:


Should return a string array about where the Python is searching for modules, should include:


If you are getting ‘/usr/local/’ stuff, means you are still calling the old Python. To work round this, add environment value


to explicitly choose the version just installed. Now one can build PyQt and Boost.

Create the source file Main.cpp:

#include <boost/python.hpp>
#include <iostream>
using namespace std;
using namespace boost::python;

int main()
 cout<<"hello boost python embedded "<<endl;

cout<<"version "<<Py_GetVersion()<<endl;

PyRun_SimpleString("from time import time,ctime\n"
 "print 'Today is',ctime(time())\n");
FILE *file_1 = fopen("./","r+");


return 0;

Compile it by Makefile:


 g++ -o test main.cpp -I$(PYTHON_INC) -I$(BOOST_INC) -L$(BOOST_LIB) -lboost_python -framework Python

Still need the file to call from the test program, I just use the form PyQt tutorial examples. But for some reason

app = QtGui.QApplication(sys.argv)

doesn’t work. I have to change it to

app = QtGui.QApplication(sys.path)

If everything works out, the program is compiled, run it, a little window will pop up:

Well done! It is the first time you call Python inside a C++ program.

Leave a comment

Filed under Uncategorized

Install Wizard with PyQt

My work is mostly about developing tools, which consists of a lot files of different kinds: dll, mll, mel, slim, exe, ini, py etc. Each of them should be copied into specific folders to be functional. But artists don’t have the mind taking care of all the technical details, so there always be a lot of confusion about copy what to where. I decide some automatic install script with user interface should be necessary to help artists out of the trouble copying those files by hand, and to prevent error.

This is a simple install wizard in Python and PyQt.

First page introduces what will be installed.

Second page shows where RAT/RMan is found on your system. Also asks which disk your Maya project resides.

Let the wizard do the tricks.

So it is finished.


Leave a comment

Filed under Uncategorized

Git Bare Repository

Assume programmer A already have a Working Directory at //serverA/share/proj, and programmer B want to help. A bare reposittory shold be created at //serverB/share by:

git clone --bare //serverA/share/proj

there will be just a folder – proj.git. Now programmer B can get a fresh copy of his own by:

git clone //serverB/share/proj.git

When he finished a few commits, try:

git push //serverB/share/proj.git master

Then programmer A can have the changes by:

git pull //serverB/share/proj.git

The need for a bare repository is due to git rejects any pushing to a non-bare work tree by default. That rule can be overrided by changing config of receive.denyCurrentBranch, but pushing directly to a checked out work tree still feel like tricky.


Leave a comment

Filed under Uncategorized

Fake Hair Dynamics Again

Fake Hair Dynamic from angersaurus on Vimeo.

Changed the fake dynamic deformer a bit. The dragging effect is achieved by tracking position of vertex at previous frame. There is no fancy bend/shear resistance, damping, attraction or coliding, but it is fast and much easier to handle. Just a simple trick to cheat, to give some movement to the fur, when there is no time for nCloth simulation.

Leave a comment

Filed under Uncategorized