Field of view and the scanner "V"

An area for discussing new ideas and additions to Oolite.

Moderators: winston, another_commander

User avatar
phkb
Commodore
Commodore
Posts: 2284
Joined: Tue Jan 21, 2014 10:37 pm
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...

Field of view and the scanner "V"

Post by phkb » Sat Jul 25, 2015 3:28 pm

Would it be possible to have the "V" lines on the scanner reflect the field of view setting?

User avatar
Disembodied
Jedi Spam Assassin
Jedi Spam Assassin
Posts: 6202
Joined: Thu Jul 12, 2007 10:54 pm
Location: Carter's Snort

Re: Field of view and the scanner "V"

Post by Disembodied » Sat Jul 25, 2015 3:40 pm

phkb wrote:Would it be possible to have the "V" lines on the scanner reflect the field of view setting?
They do - on the standard HUD, at least. Are you using a different HUD?

User avatar
phkb
Commodore
Commodore
Posts: 2284
Joined: Tue Jan 21, 2014 10:37 pm
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...

Re: Field of view and the scanner "V"

Post by phkb » Sat Jul 25, 2015 11:46 pm

Maybe then its a problem with the PC version because this is what I see with the scanner on the default HUD:

Image

Image

Image

Unless there's some other setting somewhere I've missed.

User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Disunited Kingdom
Contact:

Re: Field of view and the scanner "V"

Post by Smivs » Sun Jul 26, 2015 7:08 am

Like Disembodied, I thought you meant the direction of the 'V' pointing forward, aft, port, starboard as you select that view, which it does. You are obviuously refering to something else. Where do you get that FOV from? BTW That is not the default HUD - it looks like my SmartHUD.
Commander Smivs, the friendliest Gourd this side of Riedquat.

User avatar
phkb
Commodore
Commodore
Posts: 2284
Joined: Tue Jan 21, 2014 10:37 pm
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...

Re: Field of view and the scanner "V"

Post by phkb » Sun Jul 26, 2015 7:56 am

Sorry, I wasn't clear. I meant the new "Field of view" option available in Game Settings. From the Oolite.org "What's new" page:
What's new wrote:We've also made improvements to multi-monitor support, explosion graphics, and planet textures, and introduced a "field of view" setting to Game Options.
Smivs wrote:it looks like my SmartHUD.
Oh, I thought I'd disabled all the HUD's - I must have missed one. In any case, all the scanners are the same. Regardless of the FOV setting (the range is 30 degrees to 80), the "V" lines on the scanner are always the same.

Edit: Yes, it was your Combat HUD. I'd missed it in the managed addons folder.

another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 5389
Joined: Wed Feb 28, 2007 7:54 am

Re: Field of view and the scanner "V"

Post by another_commander » Sun Jul 26, 2015 8:22 am

The lines remain the same on different FOVs, but the HUD still works correctly. Items stil start appearing in your view the moment they cross any of the two lines of the V regardless of the FOV.

User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Disunited Kingdom
Contact:

Re: Field of view and the scanner "V"

Post by Smivs » Sun Jul 26, 2015 8:52 am

Ah, that FOV. Yes I'd forgotten about that. It's a full time job keeping up with this game!
Commander Smivs, the friendliest Gourd this side of Riedquat.

User avatar
Day
---- E L I T E ----
---- E L I T E ----
Posts: 518
Joined: Tue Mar 03, 2015 11:35 am
Location: Paris

Re: Field of view and the scanner "V"

Post by Day » Sun Jul 26, 2015 10:38 am

phkb wrote:Would it be possible to have the "V" lines on the scanner reflect the field of view setting?
Hmm, I guess that you mean that the V lines would be more or less "open" depending on the field of view settings?

Seems to me that for Huds to show that, they would need to access in javascript the angle value.
If, as I understand it, it's the only way, I've got code on a github branch that is not yet merged allowing to do that.
I don't have a lot of time on my hands currently for that, but I can spare some if it is a wanted feature, or to help somebody to take it.
I mean, the code is working, yet some more tests are needed to be sure there is no hidden problem.
I've got a oxp done allowing to change the fov value using this code, too.

Digression: I've been playing for the last months with the build FOV option enabled, which means I'm able to increase/decrease fov while in-flight, from a joystick axis. Once the best joystick axis has been selected, it's great! I'm playing a well-armed but not quick courrier/trader with cannon lasers (10 km range). I'm mostly in 80° fov mode, which feels large and slow as should be such a ship, and when a pirate decides to attack me, I switch to min° fov mode. The zoom is quick enough for this to be practical, slow enough to make it challenging enough.

User avatar
phkb
Commodore
Commodore
Posts: 2284
Joined: Tue Jan 21, 2014 10:37 pm
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...

Re: Field of view and the scanner "V"

Post by phkb » Sun Jul 26, 2015 10:12 pm

While the FOV value might be useful to display, that wasn't really what I meant. I can see that I have miscommunicated this request from start to finish! OK, let's start again....

The "V" lines on the scanner are designed to indicate to the player what is visible in that direction. The "V" lines define on the scanner what the player is seeing on the screen. Both things should line up - anything that appears inside the "V" should be visible in that view.

For example, when the FOV value is set to the default 57º and I launch from Lave and head out away from the station, then turn around, this is what I see.

Image

Notice that the station is just on the edge of my screen, PLUS it is just on the edge of the left-hand "V" line. Based on what I read on the scanner, the station should just be visible, which it is. The scanner is accurately reflecting what I can see through the viewport.

Now, when I set the FOV value to 30º, I see this:

Image

What happened to the station? I haven't moved my ship in any way. The scanner is saying it should just be visible on the screen, but it's not. The angle of view has changed and now the scanner is giving a false reading.

If I change the FOV value to 80º, I see this:

Image

Now the station is visible, but is not on the edge of my view, it's well inside.

So, the request I am making is for the lines of the "V" on the scanner to be drawn in a way that reflects the FOV angle. That's it. Really. That's all it is. Really. No, I mean it. See?

(pants) Phew. And what about this weather we're having, eh?

User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6310
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Field of view and the scanner "V"

Post by Diziet Sma » Mon Jul 27, 2015 4:49 am

For what it's worth, phkb, I understood what you were getting at right from the start..
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

User avatar
phkb
Commodore
Commodore
Posts: 2284
Joined: Tue Jan 21, 2014 10:37 pm
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...

Re: Field of view and the scanner "V"

Post by phkb » Mon Jul 27, 2015 5:56 am

I'm sure it's purely a part of international English nuances and understanding. What sounds perfectly logical to my mind might not convey the same message to other brands of English, and particularly to those for whom English is a second language. My apologies to anyone whom read my first post and was mislead.

another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 5389
Joined: Wed Feb 28, 2007 7:54 am

Re: Field of view and the scanner "V"

Post by another_commander » Mon Jul 27, 2015 6:30 am

I had understood you right as well phkb, but I tested too close to the station and the difference at short distance was not really noticeable. Your screens make it clear that we need to account for FOV on the scanner blips. I don't think that this will require any JS access to the FOV angle; this is something that should be taken care of inside the core code.

another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 5389
Joined: Wed Feb 28, 2007 7:54 am

Re: Field of view and the scanner "V"

Post by another_commander » Mon Jul 27, 2015 7:29 am

@phkb: I am at work and can't test, but I am almost convinced that the solution here is to adjust the drawing of the V so that its x-axis coordinates (or y-axis if viewing port/starboard) get multiplied by the FOV fraction representation.

Can you please try this? Inside HeadUpDisplay.m, find the drawScannerGrid function. At the top there are these two lines:

Code: Select all

GLfloat w2 = 0.250 * siz.width;
GLfloat h2 = 0.250 * siz.height;
Change them to

Code: Select all

GLfloat w2 = [[UNIVERSE gameView] fov:YES] * siz.width / 2.0;
GLfloat h2 = [[UNIVERSE gameView] fov:YES] * siz.height / 2.0;
Does this fix it for you? If yes, we can push it to trunk.

User avatar
Day
---- E L I T E ----
---- E L I T E ----
Posts: 518
Joined: Tue Mar 03, 2015 11:35 am
Location: Paris

Re: Field of view and the scanner "V"

Post by Day » Mon Jul 27, 2015 8:37 am

another_commander wrote:I had understood you right as well phkb, but I tested too close to the station and the difference at short distance was not really noticeable. Your screens make it clear that we need to account for FOV on the scanner blips. I don't think that this will require any JS access to the FOV angle; this is something that should be taken care of inside the core code.
Nice :-)

User avatar
Day
---- E L I T E ----
---- E L I T E ----
Posts: 518
Joined: Tue Mar 03, 2015 11:35 am
Location: Paris

Re: Field of view and the scanner "V"

Post by Day » Mon Jul 27, 2015 8:39 am

another_commander wrote:@phkb: I am at work and can't test, but I am almost convinced that the solution here is to adjust the drawing of the V so that its x-axis coordinates (or y-axis if viewing port/starboard) get multiplied by the FOV fraction representation.
It's what I understand too.

Post Reply