3d perspective vs 3d object transform

theepilepsy's picture

Ive got an idea I want to "register"...I joke I joke... I want to create the effect of there being a 3d world behind the screen and use head tracking to create this effect. i.e The user moves, and the object or scene warps relatively so the user can see the side of the objects etc, the resulting effect (possibly) being a 3d object behind the screen. The problem Ive encountered is to have the correct perspective "warp" of the object the object must move.. however the object should remain stationary to be true to reality. What is the best approach to achieve this effect? Im currently os and dont have the original patch so ive just (pilfered &) hacked together a simple example of the problem, the cubes "warp" is correct, except the object moves from side to side! What is the best approach to get the object to warp and yet it remain stationary? Sorry for the mundane triviality and many thanks for your help!

PreviewAttachmentSize
3d behind screen.qtz39.68 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

cybero's picture
Re: 3d perspective vs 3d object transform

Was this produced using a pre 0.2 version of CV Tools [OpenCV] ?

Crashes on SL 32 or 64 bit boot regardless.

Might give it a whirl later in Leopard, but even then , I think it will need the pre 0.2 version of OpenCV, can anyone confirm that this example works on Leo, with what version of OpenCV, [ I'm stuck offline rendering and watching the FA Cup :-) ].

Sounds like an interesting idea though.

gtoledo3's picture
Re: 3d perspective vs 3d object transform

Right now you have your info connected to x/y translations. What you want to do is for stuff to rotate not translate. The simplest route would be to take the same info and add a multiplier to it, and connect up to x/y rotations. That way, everything will stay in the center, as long as the rotation origin corresponds.

theepilepsy's picture
Re: 3d perspective vs 3d object transform

thats a shame cybero..mmm.. its leopard and i used one of tonebursts earlier headtracking patches

theepilepsy's picture
Re: 3d perspective vs 3d object transform

Thanks gtoldeo for your reply! If i use rotation, yes i will see the side however.. surely one corner will be closer to the viewer than the other right? if it were a "real" 3d box behind the screen, I think the bottom edge (etc) should remain parallel to the bottom edge of the computer screen to be true to reality...right? (the appearance of one corner being closer is already formed by one corner actually being closer in "physical reality"... as you move side to side) maybe if you put a box in front of your monitor you will see what i mean.. you see the side of the box as you move side to side however the bottom edge still remains parallel to the bottom edge of the screen regardless.

Lango's picture
Re: 3d perspective vs 3d object transform

theepilepsy's picture
Re: 3d perspective vs 3d object transform

Sort of lango! ive way drunk too much saki and sochu... my left frontal lobe maybe slightly inoperative. Im going for a 3d effect "behind the screen" but to me it appears the targets are moving side to side (equivalent in qc "translation") and hence this guy is either going for an effect "infront of the screen" or is otherwise a few quid short. In the case of this video, If it were a 3d effect "behind the screen" the red targets should remain stationary (i.e xy), and the lines behind them (i.e z) only become apparent as one moves side to side. Perhaps it is a fine point to articulate.. but (I think?) an important one to correctly fooling perception. Thanks though lango!

cybero's picture
Re: 3d perspective vs 3d object transform

thanx for the feedback theepilepsy - will give that example file a try when I next boot into Leo :-)

theepilepsy's picture
Re: 3d perspective vs 3d object transform

lango this what I mean! can you get a cube to look like this jpg using viewing angle? (and thus so all 3d objects can be viewed in this way without having to actually warp the objects themselves)

PreviewAttachmentSize
left side cube view.jpg
left side cube view.jpg19.79 KB

theepilepsy's picture
Re: 3d perspective vs 3d object transform

gtoldeo this what I mean! can you get the perspective on a cube to look like this jpg just using viewing angle? without having to actually warp the objects themselves? (and thus so all 3d objects can be viewed in this way)

PreviewAttachmentSize
right side cube view.jpg
right side cube view.jpg19.6 KB