camera shift in game engine mode

I’m doing some work on headtracking (see Johnny Lee’s project here for more on headtracking: http://www.youtube.com/watch?v=Jd3-eiid-Uw ) and the Blender game engine is perfect for my purposes. However, to obtain the proper perspectives, I need to be able shift the view area away from the center of the camera. This is possible in rendered images via a camera’s Shift X and Shift Y properties, but those settings don’t change the view in viewports or the game engine.

Does anyone who is more familiar with the internals of Blender’s camera system know if it’s possible to get camera shift in viewports/GE? Maybe there’s some option I’m not seeing that locks a viewport precisely to the render area? Maybe there are some internal viewport properties that aren’t accessible via the GUI but could be set via a script?

I really hope this is possible, otherwise I’m going to be writing a lot of C/OpenGL just to replicate so much of what Blender does out of the box…

Did you find a work around? I would need camera shift in game engine as well. Could it be done with a patch for blender / has somebody done something similar yet?

You could use the VideoTexture module to render the camera to a plane and move the plane to move the center of the rendering view. I think you can change Viewport settings as well.

I tried it out (can’t post the link of the tutorial, the site keeps denying my post…)
But it does not solve my problem. Perhaps I didn’t get your trick. I think as long no camera image gets distorted with its shift parameters in game engine, it’s useless to send them around with videotexture - unfortunately. thanks anyway!

My theory is to output the camera’s view onto a video texture, then scale the texture up and move it around. The video texture will be shifted, but still fill up the screen because it was scaled (you’ll lose some of the shot, obviously).

ok. got it. but it leads me to another problem: when I destort a plane the texture gets split up in triangles. Might be a newbie question, but is there a possibiliy project the texture differently on my plane? I have a quartz composer “app” which does exactly what I want: projecting a texture on a GL Quad, which can take coordinates for its vertices. Having something similar in BGE would be nice :slight_smile:

I’m not sure, but you could try subdividing your plane and moving the vertices near the ‘control points’.