Page 1 of 3

Field of view and the scanner "V"

Posted: Sat Jul 25, 2015 3:28 pm
by phkb
Would it be possible to have the "V" lines on the scanner reflect the field of view setting?

Re: Field of view and the scanner "V"

Posted: Sat Jul 25, 2015 3:40 pm
by Disembodied
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?

Re: Field of view and the scanner "V"

Posted: Sat Jul 25, 2015 11:46 pm
by phkb
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.

Re: Field of view and the scanner "V"

Posted: Sun Jul 26, 2015 7:08 am
by Smivs
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.

Re: Field of view and the scanner "V"

Posted: Sun Jul 26, 2015 7:56 am
by phkb
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.

Re: Field of view and the scanner "V"

Posted: Sun Jul 26, 2015 8:22 am
by another_commander
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.

Re: Field of view and the scanner "V"

Posted: Sun Jul 26, 2015 8:52 am
by Smivs
Ah, that FOV. Yes I'd forgotten about that. It's a full time job keeping up with this game!

Re: Field of view and the scanner "V"

Posted: Sun Jul 26, 2015 10:38 am
by Day
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.

Re: Field of view and the scanner "V"

Posted: Sun Jul 26, 2015 10:12 pm
by phkb
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?

Re: Field of view and the scanner "V"

Posted: Mon Jul 27, 2015 4:49 am
by Diziet Sma
For what it's worth, phkb, I understood what you were getting at right from the start..

Re: Field of view and the scanner "V"

Posted: Mon Jul 27, 2015 5:56 am
by phkb
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.

Re: Field of view and the scanner "V"

Posted: Mon Jul 27, 2015 6:30 am
by another_commander
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.

Re: Field of view and the scanner "V"

Posted: Mon Jul 27, 2015 7:29 am
by another_commander
@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.

Re: Field of view and the scanner "V"

Posted: Mon Jul 27, 2015 8:37 am
by Day
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 :-)

Re: Field of view and the scanner "V"

Posted: Mon Jul 27, 2015 8:39 am
by Day
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.