Augmented reality with fixed background

LukeNeo's picture

Hi guys, I’m a QC newbie, I come from videogames programming (most of the time using OGRE). I’m currently trying to add some simple 3D objects to a real scene: some sort of augmented reality, but with fixed background. I mean: I have a background image of a 3D environment (the interior of a room for example), and I’d like to add cubes/planes/and so on so as to match the perspective of the photo. Take a look at this first experiment: I used 5x“cubes” and “Kineme 3D Plane Generator”->”Kineme 3D Object Renderer” to create che 3D scene, all inside a "lighting" patch, witch is inside a "Kineme GL Field of View". For the cubes, I reach an “almost realistic” perspective, but the plane hasn’t got the right perspective at all (even if I try to move it inside the scene), and I think that it means I’m not working in the right way. I've tried also to use "Kineme GL Frustum" instead of the field of view, but it seems not to e the right solution. My question is: “what is the right way to recreate a perspective projection so as to match the background perspective?”

Thank you for any kind of help! :)

dwskau's picture
Re: Augmented reality with fixed background

If you are open to modeling in another program and importing to QC, I would highly recommend SketchUp's PhotoMatch feature.

dwskau's picture
Re: Augmented reality with fixed background

I read your post very quickly and it seems that I may have misinterpreted your needs slightly. I think PhotoMatch still may be useful to you for figuring out the correct view, however not exactly how I originally imagined.

toneburst's picture
Re: Augmented reality with fixed background

Hi LukeNeo, welcome to the Wonderful World of Quartz Composer :D

a|x http://machinesdontcare.wordpress.com

LukeNeo's picture
Re: Augmented reality with fixed background

dwskau wrote:
I read your post very quickly and it seems that I may have misinterpreted your needs slightly. I think PhotoMatch still may be useful to you for figuring out the correct view, however not exactly how I originally imagined.

Maybe I expressed my question in a wrong way. I mean: "INSIDE QUARTZ COMPOSER, how I what is the right way to recreate a perspective projection so as to match the background perspective?". I want to create a view frustum that exactly match the perspective in the background, without use any external program. How can I do that in the right way? Thank you! :)

LukeNeo's picture
Re: Augmented reality with fixed background

toneburst wrote:
Hi LukeNeo, welcome to the Wonderful World of Quartz Composer :D

Hi a|x, your blog ROCKS! :) I asked to you how to achive "god rays" effect in your blog, thank you for your reply, I'm working on it! ;)

gtoledo3's picture
Re: Augmented reality with fixed background

I don't think there is a straightforward answer to that, or a one size fits all type of solution (hey, maybe I'm wrong). It seems as though this would vary depending on lenses and techniques used.

I don't think your question is as much about augmented reality, as it is about traditional special fx, and keying stuff over so that it looks like things are "really" there. I think that lighting plays a bigger challenge.

dust's picture
Re: Augmented reality with fixed background

i would have to say that auto desk stitcher and image modeler could be great for backgrounds in a green screen environment and even a augmented reality perspective if done right but the whole idea of augmenting reality is to use reality and real background footage not fake. not that a photorealistic 3d pano environment combined with augmented reality in stereo or something isn't sweet but to augment reality predicates a pre requisite of reality is all i'm saying. check out ar tool kit or xing i thin zing its a barcode implementation that the same sort of thing.

DanieleCiabba's picture
Focal length and Perspective

I think here is a problem of "Focal length and Perspective"

there is a way to modify the default focal length of the quartz composer camera? this is the point I think..

http://www.photozone.de/focal-length-and-perspective

PreviewAttachmentSize
Orthographic_camera_distance_focal_length.gif
Orthographic_camera_distance_focal_length.gif414.86 KB

toneburst's picture
Re: Augmented reality with fixed background

Ah, thanks LukeNeo, good to hear someone's finding the blog useful! Looking forward to seeing your version of the volumetric light thing.

Incidentally, there are two variations on an alternative approach in the NVIDIA Shader Library you might also want to look at. I had a stab at making one of them work a couple of years ago, but didn't pursue it.

http://developer.download.nvidia.com/shaderlibrary/webpages/shader_libra...

a|x

toneburst's picture
Re: Augmented reality with fixed background

Double-posted by mistake. Threading doesn't seem to be working properly today. I was trying to reply to LukeNeo's post above, but it appeared down at the bottom instead of below his, for some reason. Same as the one above, in fact.

a|x

gtoledo3's picture
Re: Augmented reality with fixed background

Again, I will make the point that there is not a one size fits all solution.

If you were compositing over a panoramic image, it would be different from compositing over filmed footage, for example. If the lens has a subtle fisheye, or something else that's non-linear going on, it's not straightforward. My advice is just to work at tweaking your pieces so that it looks right for a particular scenario.