oolite cockpit/increasing the viewing angle
Moderators: winston, another_commander
oolite cockpit/increasing the viewing angle
So I am fairly new to oolite but no less obsessed. I have been wanting to build a cockpit for FPV airplanes and general flight stuff but I am actually in the serious planning stages now. With most flight sim software you can fairly easily tweak it to work with a curved screen and projectors, oolite on the other hand is locked in to its default viewing angle. I am a fairly proficient C and python coder so I would probably end up digging into this at some point regardless of difficulty but I wanted to see how hard you folks thought it would be before I start buying expensive hardware. So here are my questions:
What sections of code would I want to start looking at to adjust the viewing angle?
Are there any inbuilt issues with changing this?
Is it even "possible" with the current codebase to go up to say 180 degrees? 220? 360?
Thanks to anyone who can help point me in the right direction
What sections of code would I want to start looking at to adjust the viewing angle?
Are there any inbuilt issues with changing this?
Is it even "possible" with the current codebase to go up to say 180 degrees? 220? 360?
Thanks to anyone who can help point me in the right direction
-
- Quite Grand Sub-Admiral
- Posts: 6667
- Joined: Wed Feb 28, 2007 7:54 am
Re: oolite cockpit/increasing the viewing angle
I believe the best place to start looking for field of view modifications would be GameController.m, method
For angles higher than this, we seem to be getting some positioning and depth buffer issues (mainly objects popping in/out of existence, exhausts misplacement etc.). Also the scanner gets scaled together with the view depending on selected FOV, which is not what we really want, but for the purposes of testing and proof of concept, this much should be good enough for now.
Edit to add: Topic moved to Discussion, as it is not Linux specific.
- (void)setUpBasicOpenGLStateWithSize:(NSSize)viewSize
, particularly the glFrustum call line. With some very crude, quick and dirty experiments, it seems that it is relatively straight forward setting the FOV to values other than the default. Here is one screenie taken at Lave with a FOV set close to 180 degrees.For angles higher than this, we seem to be getting some positioning and depth buffer issues (mainly objects popping in/out of existence, exhausts misplacement etc.). Also the scanner gets scaled together with the view depending on selected FOV, which is not what we really want, but for the purposes of testing and proof of concept, this much should be good enough for now.
Edit to add: Topic moved to Discussion, as it is not Linux specific.
Re: oolite cockpit/increasing the viewing angle
Hi everybody,
here is a new Jameson having flown only some short hours, with most OXZ activated.
I would find really useful to be able to modify via oxp the viewing angle.
I went to see into the code, and what it would take for this is to make writable by oxp the variable GameController.setUpBasicOpenGLStateWithSize.ratio, currently fixed to 0.5.
Currently, this gives (if i'm doing it correctly) a viewing angle of 2*Tan-1(ratio=0.5/1) = 53° for the vertical axe.
The angle for the horizontal axe depends on the geometry of your screen.
I look forward to having some equipments upgrade allowing to have a greater angle of view
And better still, an angle of view depending on the current activity, for example greater when in jump mode
Would this be possible?
here is a new Jameson having flown only some short hours, with most OXZ activated.
I would find really useful to be able to modify via oxp the viewing angle.
I went to see into the code, and what it would take for this is to make writable by oxp the variable GameController.setUpBasicOpenGLStateWithSize.ratio, currently fixed to 0.5.
Currently, this gives (if i'm doing it correctly) a viewing angle of 2*Tan-1(ratio=0.5/1) = 53° for the vertical axe.
The angle for the horizontal axe depends on the geometry of your screen.
I look forward to having some equipments upgrade allowing to have a greater angle of view
And better still, an angle of view depending on the current activity, for example greater when in jump mode
Would this be possible?
-
- Quite Grand Sub-Admiral
- Posts: 6667
- Joined: Wed Feb 28, 2007 7:54 am
Re: oolite cockpit/increasing the viewing angle
Changes that occurred in the rendering code after my initial message seem to have complicated things a bit. At the moment of writing this, I am not able to change the field of view just by changing the ratio value in trunk.
But even if it worked, it would still need plenty of fine tuning, as you don't really want the scanner to follow changes in the FOV. The side effects with objects popping up and disappearing at certain ratio values would also have to be fixed. So it needs some work. It would be quite interesting to have FOV set via preferences or OXP methods, provided that it gets done properly and not as a quick hack (which what changing ratio really was).
But even if it worked, it would still need plenty of fine tuning, as you don't really want the scanner to follow changes in the FOV. The side effects with objects popping up and disappearing at certain ratio values would also have to be fixed. So it needs some work. It would be quite interesting to have FOV set via preferences or OXP methods, provided that it gets done properly and not as a quick hack (which what changing ratio really was).
Re: oolite cockpit/increasing the viewing angle
Hi another_commander, thanks for answering.
Well, I wasn't aware of it as I just got a quick view in this method, but you're right if some things like the scanner are related to the FOV, then the change is not obvious.
Oh well, i guess i'll have to wait for the time this idea is considered top of TODO :-p
Well, I wasn't aware of it as I just got a quick view in this method, but you're right if some things like the scanner are related to the FOV, then the change is not obvious.
Oh well, i guess i'll have to wait for the time this idea is considered top of TODO :-p
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: oolite cockpit/increasing the viewing angle
G'day, Day - welcome aboard!
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
And any survivors, their debts I will certainly pay. There's always a way!
-
- Quite Grand Sub-Admiral
- Posts: 6667
- Joined: Wed Feb 28, 2007 7:54 am
Re: oolite cockpit/increasing the viewing angle
@Day: If you would like to give it a try by all means go ahead! Patches with improvements are more than welcome and we can help with questions that may pop up along the way.
Re: oolite cockpit/increasing the viewing angle
@Cody: thank you, Cody
@another_commander: well, i'm proficient in a number of languages, but not in C or objective-C :-/
Is there somebody in the dev team working on linux? What is the config they use? Eclipse like in http://wirecode.blogspot.fr/2007/11/obj ... lipse.html ?
@another_commander: well, i'm proficient in a number of languages, but not in C or objective-C :-/
Is there somebody in the dev team working on linux? What is the config they use? Eclipse like in http://wirecode.blogspot.fr/2007/11/obj ... lipse.html ?
-
- Quite Grand Sub-Admiral
- Posts: 6667
- Joined: Wed Feb 28, 2007 7:54 am
Re: oolite cockpit/increasing the viewing angle
OTOH cim, kanthoney, submersible and quite often Getafix all work on Linux. I'm sure one (or more) of them will be here soon to help with your question.Day wrote:Is there somebody in the dev team working on linux? What is the config they use? Eclipse like in http://wirecode.blogspot.fr/2007/11/obj ... lipse.html ?
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: oolite cockpit/increasing the viewing angle
The Penguinistas have taken over the asylum!another_commander wrote:... cim, kanthoney, submersible and quite often Getafix all work on Linux.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
And any survivors, their debts I will certainly pay. There's always a way!
- Smivs
- Retired Assassin
- Posts: 8408
- Joined: Tue Feb 09, 2010 11:31 am
- Location: Lost in space
- Contact:
Re: oolite cockpit/increasing the viewing angle
An asylum as a refuge for the sane - interesting concept
...and welcome, Day.
...and welcome, Day.
Commander Smivs, the friendliest Gourd this side of Riedquat.
Re: oolite cockpit/increasing the viewing angle
Thank you Commander Smivs
Re: oolite cockpit/increasing the viewing angle
Nothing so fancy here - emacs to edit the source code, and a terminal window to type 'make' into to build it. (And another terminal window to type 'grep' into if I forget which file something is in)Day wrote:Is there somebody in the dev team working on linux? What is the config they use? Eclipse like in http://wirecode.blogspot.fr/2007/11/obj ... lipse.html ?
- Diziet Sma
- ---- E L I T E ----
- Posts: 6311
- Joined: Mon Apr 06, 2009 12:20 pm
- Location: Aboard the Pitviper S.E. "Blackwidow"
Re: oolite cockpit/increasing the viewing angle
G'day, Day! Welcome aboard..
Not a member of the dev team, but for my modest needs, I use Smartgit (or sometimes just
Just go with whatever IDE you're comfortable/familiar with, would be my suggestion.
Not a member of the dev team, but for my modest needs, I use Smartgit (or sometimes just
git
in a terminal), Geany as my editor, and a terminal window for make
, etc..Just go with whatever IDE you're comfortable/familiar with, would be my suggestion.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
Re: oolite cockpit/increasing the viewing angle
Hi and thanks, cim and Diziet Sma
Ok, I'll take the easier path for me, it should be Eclipse now.
Ok, I'll take the easier path for me, it should be Eclipse now.