Skip to main content
gamedev.net
🔒 Locked

2 Cameras

Started by Interesting Dave Feb 21, 2005 at 12:32 PM 2 replies 1.1k views
Original Post
Interesting Dave
Interesting Dave
In a FPS, I was wondering if it is possible (and if so, has anyone done it?) to have 2 camera's input merged into one view. Which (hopefully) would give the effects of the ingame character's eyes. Whilst I think this would prove pretty funky to play around with and cause some good effects (like closing, covering-up or lossing an eye), focusing on the actual screen could be iffy. What do you think?
Roger that, lets run like hell!
WebsiteWill
WebsiteWill
Think about it for a second.
You would render one scene from leftCamera, then render another scene from rightCamera (both to separate textures) and then have to blend them in the middle somehow. However, where do you get the dividing line and the blending method without obscuring the middle of the image? Close one eye and take a look, then close the other eye and take a look. You will notice that you see a LOT of the same stuff from either eye.

Simulating this from two independent cameras, I think, would be impossible because the blending you would have to to between the two images would undoubetedly distort the image directly in the center.

If you want to simulate the character losing an eye I would suggest just doing something simple like blurring one side of the screen, or black part of it out all together. However, what happens if you get unlucky and get blinded but not killed? The player is then stuck wandering your game looking for a way to kill himself in order to keep on playing. Might want being blinded completely to be one of the death conditions :) Plus you won't have the overhead of rendering each scene twice per frame (which means you automatically would lose half your framerate).

Then again, you could have something totally different in mind.

Webby
kburkhart84
kburkhart84
I agree. You could just render the screen to a texture if you are blinded, then manually make half of it blurred, or maybe even the whole thing. If there is a good algorithm, maybe you could skew the image or something like that as well. Another thing(just a random thought), is that you might could go from perspective view to Ortho view, but keep the depth tests, etc... I don't know how cool it would be, but with only one eye, you can no longer see depth in stuff, only the size differences, so maybe that would work.


DaveInsurgent
DaveInsurgent
You could also experiment with altering the field of vision properties whenever the player loses an eye, then rotating the camera slightly. Since it's safe to assume you're not going to blind the player without killing him you can just have two mutually exclusive instances where if he loses the left eye then the FOV gets reduced a bit and the camera rotated to the right, and if he loses his right eye the same occurs but with a rotation to the left.

While I'm sure it wont look perfect or nearly as good as if you were actually combining two camera sources together, I think it would be neat and probably a lot simpler.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.