View Full Version : Altering the camera perspective
torbenschou
07-15-2007, 05:31 AM
Is it possible to skew the perspective of the camera such that if your monitor was at a (user defined) angle, the image would look flat (i.e. normal). In other words, imagine your monitor as a window into the world and that window is at an angle. Consequently, the image would only look correct when the monitor was at the correct angle. What I'm describing is not the same as just rotating the camera.
Assuming you understand what I mean, then is it possible to do this transformation and what part of the code would I need to play around with?
Cheers
Would a screen shot of what I get with the Matrox set up helpful if I can post it somewhere? Both the left and right screens of the three screen set up have skewed perspectives. I am working on solving this trying to use a HUD for the side screens.
Lolmen
07-15-2007, 11:23 AM
Would a screen shot of what I get with the Matrox set up helpful if I can post it somewhere? Both the left and right screens of the three screen set up have skewed perspectives. I am working on solving this trying to use a HUD for the side screens.
You can post screens on imageshack.us
I'm interested too, which skew you guy's do?
torbenschou
07-16-2007, 02:32 AM
A screen shot would be interesting. Did you have to do anything special to get half-life 2 run at such a wide resolution? Can you run any mod at that kind of resolution?
Personally, I'm wanting to have two monitors arranged such that they are at a right angle to each other (see http://img526.imageshack.us/img526/8994/setupvn3.jpg). Both displays would be running from the same computer using a matrox dual display (so that it basically acts like a single, large screen). Having done this, I want to split the screen into two views so that each monitor had its own view point. I then want to distort each view so that overall, the image looks flat across the two monitors (as described in my first post).
So, do you know if it's possible to distort the perspective like that? I'm happy to provide more explanation if it helps to understand what I'm wanting to do.
Cheers
Here is the screen shot from three screens
http://img128.imageshack.us/img128/6062/screenshootfull3840xx3.jpg (http://imageshack.us)
Shot at 2007-07-17
I think what want should be possible the real issue is that do it you would need to set up something like the rear view mirror example:
http://developer.valvesoftware.com/wiki/Rear_View_Mirror
to a HUD using virtual cameras, the trouble would be with interacting with imagery. I have been looking around to see if anyone has done a good remote mouse controlled remote turret to give me an idea of how to go about coding that.
torbenschou
07-17-2007, 04:23 PM
Thanks mate. Looks impresive. So, just to ask again; did you have to do anything special to get to display in such a wide resolution?
I managed to stumble upon the rear view mirror tutorial yesterday. So far I've got it working and today I intend work on splitting the screen in two. I'll post any progress I make. From initial experiments, it seems like there's probably a better way of splitting the screen though.
Also, what did you mean precisely by "interacting with imagery", and what exactly are you wanting to do with the turret?
No it works fine, checking with the matrox triple head site it lists HL2 as one of the games that can run it natively or via the matrox ap, all I had to do was change the resolutionin the options screen.
I will be reallin intersted in your work on splitting the screen, I looked into it quickly but could not see a quick way of doing what I wanted.
I am trying to get one main screen and 4 or more smaller "sub display" panels as I am trying to do a sort of steam punk styled mod. With tank/trains have muliple turrets that a single player can control. The tanks will sort of look like
http://img181.imageshack.us/img181/8688/iwmkid109vickersindepenqh3.jpg (http://imageshack.us)
Shot at 2007-07-18
or
http://img181.imageshack.us/img181/8905/t2801nx3.jpg (http://imageshack.us)
Shot at 2007-07-18
I want each panel to control a turret, at the moment the interaction I am aiming for is blowing the heck out of stuff , though I hope to add other features later.
Thanks mate. Looks impresive. So, just to ask again; did you have to do anything special to get to display in such a wide resolution?
I managed to stumble upon the rear view mirror tutorial yesterday. So far I've got it working and today I intend work on splitting the screen in two. I'll post any progress I make. From initial experiments, it seems like there's probably a better way of splitting the screen though.
Also, what did you mean precisely by "interacting with imagery", and what exactly are you wanting to do with the turret?
sslice
07-24-2007, 11:37 AM
Yes, you can change the pitch, yaw, and roll of the view angles (aka eye angles); play with the z value for what you want.
torbenschou
07-25-2007, 03:04 AM
So far I've had some success. I've managed to split the view and have each render off at different angles. I'll post a picture some time soon.
The one problem I'm having is that I want to make it possible to look up and off to one side. It seems source doesn't like that kind of angle and instead maps the roll to the pitch. Has anyone else encountered this? And do they know how to stop source correcting you?
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.