Archive Page 2

Cubic panorama in Alternativa3D

Until v5.6 is out, at least, we have no means to make real skybox in Alternativa3D. We can fake it by placing very large static box around our scene. The problem with this solution is that there are many ways to unwrap the box and, correspondingly, there are many incompatible skybox textures. Changing box UVs by hand every time you replace skybox texture in your project is getting boring at some point, and when they want you to support multiple textures originating from all kinds of different sources, it gets nearly impossible. And then you write this thing:

Alternativa3D skybox demo

Continue reading ‘Cubic panorama in Alternativa3D’

Alternative to adaptive thresholding

As cool as it is, adaptive thresholding generates too much redundant data. The only alternative implemented before seems to be the method called automatic thresholding, suggested by ARToolKitPlus folks:

ARToolKitPlus can do dynamic thresholding by looking at the marker content (pattern) and taking the average between the darkest and brightest pixels. If no marker is found the threshold value is randomized.

From this description alone, it is clear that there will be frames with marker undetected even though it is clearly visible in the image, so I thought, until now, that this method has to be quite bad. It turns out, however, that this method actually works very well and the number of lost frames is very small. In practice, you don’t even have to find pixel values range, it suffices to assume that current good threshold value lies close to last known one.

On code side, you no longer need to write or import some fancy filter classes, all you have to do is to modify your fixed thresholding main loop just a bit:

private var threshold:Number = 0.5;
private var confidence:Number = 0, confidenceThreshold:Number = 0.5;
private function onEnterFrame (e:Event):void {
	videoSnapshot.draw (video);

	if (confidence < confidenceThreshold) {
		// randomize threshold
		threshold *= 0.8;
		threshold += 0.2 * Math.random ();
	}

	confidence = 0;
	if (detector.detectMarkerLite (raster, 255 * threshold)) {
		confidence = detector.getConfidence ();

		detector.getTransformMatrix (result);
		stuff.setTransformMatrix (result);
	}

	scene.render ();
}

If you’re sandy fan, you can play with this method using this stub code.

Augmented reality based on blob detection

It’s long time no post now, so I thought why not post something :) So, here goes this little augmented reality experiment. Let me warn you first, it is not impressive at all, nothing fancy on 3D side, and tracking – to be fair – sucks. This is in part because it does not use any solid technology such as FLARToolKit, just something hastily hacked in haXe, for a change. In other part, it uses very simple fixed threshold filter, that can (and does) harm tracking. To save me some typing, I have made this short video explaining what this experiment is about:

Continue reading ‘Augmented reality based on blob detection’

FLARToolKit adaptive filter experiment sources

For those who asked about sources of my little experiment from last week, here they are. Make sure you are using FLARToolKit revision 2570 with these.

If you wasnt reading FLARToolKit mailing list, here is short summary: FLARToolKit converts color image to ”binary” image before doing any magic on it, using fixed threshold filter. In fact, this threshold is simply hard-coded to be 80 in many examples, and you will need to write more code to detect good values for threshold if you want your application to run regardless of lighting settings. The filter in this experiment avoids the problem by using local average brightness as a threshold for every pixel; the downside is that it enables FLARToolKit to “see” far more details, thus wasting even more CPU time. As a work-around, I tried to narrow down search area in the image using last detected square, but this only helps when marker motion is limited.

Well, check it out, play with it, and let me know what you think.

FLARToolkit and Alternativa3D, anyone?

Shortly after FLARToolkit was married to Sandy, I arranged it a secret date with Alternativa3D. The date was quite fruitful, and in a week this baby was born:


This is modified ”Ballance” game released by Alternativa3D team in november, with FLARToolkit used to control camera instead of mouse. Unfortunately, due to GPL2 section 2 clause B I cannot distribute stuff including both FLARToolkit and Alternativa3D for free, so no SWF for you to play with atm, sorry. But, if anyone is interested in sponsorship to enable this thing to go online, contact me.

Continue reading ‘FLARToolkit and Alternativa3D, anyone?’

« Previous PageNext Page »


Old stuff

November 2009
M T W T F S S
« Oct    
 1
2345678
9101112131415
16171819202122
23242526272829
30  

Oh, btw…