Labels

Showing posts with label BGE Air Race. Show all posts
Showing posts with label BGE Air Race. Show all posts

January 4, 2012

free low-poly airplane model

I have yet another unfinished game in my portfolio (sigh)
The BGE Air Race project is dead, but from the positive side I have some nice stuff to share with you.
So I give you this nice low-poly aerobatics aircraft to play with. The model is based on Extra 300L and I used Zivko Edge 540 cockpit as the reference for the interior.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
so basically you can do anything with it.











7267 triangles
1024x1024 diffuse map

blend + textures HERE
texture pack and template for you own skins HERE

April 6, 2011

webcam head tracking using FaceAPI

FaceAPI is a real-time head-tracking engine which uses webcam input to acquire 3D position and orientation coordinates per frame of video. And it works!

I implemented it in Blender Game Engine for cockpit view of BGE Air Race game.



and here is how I got it working in BGE

1. Downloaded FaceAPI here: LINK
2. Downloaded FaceApiStreamer here: LINK
(exports 6 degrees of freedom head tracking to a UDP socket connection)
3. Acquire the values from FaceApiStramer in BGE with Python code like this (not sure if it is quite right, but it kinda works):


from socket import *
controller = GameLogic.getCurrentController()
own = controller.owner

if own["once"] == True:
# Set the socket parameters
host = "127.0.0.1"
port = 29129
addr = (host,port)
# Create socket and bind to address
GameLogic.UDPSock = socket(AF_INET,SOCK_DGRAM)
GameLogic.UDPSock.bind(addr)
GameLogic.UDPSock.setblocking(0)
own["once"] = False

GameLogic.UDPSock.settimeout(0.01)

try:
data,svrip = GameLogic.UDPSock.recvfrom(1024)
str = data.split(' ')
own['xPos'] = float(str[0])
own['zPos'] = float(str[1])
own['yPos'] = float(str[2])
own['pitch'] = float(str[3])
own['yaw'] = float(str[4])
own['roll'] = float(str[5])
except:
pass


Here is a blend file: LINK
you will need FaceAPI instaled and FaceApiStreamer running in background.