14 May 2009

Ho Scene: Ho Chi Minh- Zebra crossing

In the last couple of days I returned to Blender and worked on a numner of areas, with a focus on a particular scene: Ho Chi Minh- Zebra crossing.

[-]: Textures
I had a look at some real images of zebra crossing in Ho Chi Minh and tried to recreate a similar perspective using blender and mapping textures created with real photographic textures shaped and treated in Freehand using past inside and transparency effects. Below the first result (only the floor)


Fig. above: zebra cross in Saigon


click to enlarge (rendered at 1400x900)


Below, I added a 2D cheapy vehicle for testing motion purposes using the Ipo Curve editor (no sound yet)

Vehicle test

[-]: OSC & Sound: Sending OSC (OpenSoundControl) messages from the blender game engine to Max.
I invested (wasted?) some time here looking at forums on the Internet and downloaded some examples which I could not successfully run but finally, I got it to work with a little help of my friends; (Julio d'Escriban, a colleague from the Anglia Ruskin University in Cambridge). It basically sends out movement and clicks from the mouse to PD (Pure data) via OSC using a python script. Then I rewrote the patch for MaxMSP and managed to get some audio samples to work responding to object collision in blender. I also tried other type of controllers (the rumble p3200 joystick which at some point I will need to rip off and hack if it becomes useful) and had a look at the python script hooked to the game engine (the sensors/actuators section). I will make another custom example shortly, to match with the zebra crossing scene and will upload some screen shots.
Its very messy but it works with some very small delay.


Above a maxpatch receiving OSC messages from blender via python script and the blender tutorial patch

[-]: Motion:

I thought about the aesthetics of the graphics to be used for the traffic vehicles. I finally got an idea, which may be lots of fun. Instead of trying to find or build sophisticated 3D models, I decided to create my own 2D vehicles with a bit of humoreske look. Here is the first example, a moto-rickshaw (Test: Freehand + Flash+ Capture me)


pictured above, freehand-flash movie

I tried implementing this in Blender, using a random background picture and importing the 2D image.
To do so, I had to do it in various steps:
1- Creating a mesh for Blender: I imported the picture in inkskape, (similar to Gimp)) and created a contour for the rickshaw, which I converted to Path and then exported as .svg, which blender seems to like. Then I converted the imported lines as mesh and created a new material and a texture. Then I loaded the picture (the original rickshaw) into the texture for the shaped mesh.
2- I created motion by insterting an XYZ trajectory for the object going from left to right. Then found a sound of a buick from the 50s (I recorded in Cuba a few years ago), created a cheap right to left panning effect and uploaded it but this last process with sound did not work so I did it in iMovie later on.


Turn your Genelecs on!



Above two vehicles. First step to collision and implementing audio via OSC as before.


Improved scene combining the two vehicles with the zebra cross and a city background