About parallax, off-centre viewpoints and weapons, again!

General discussion for players of Oolite.

Moderators: another_commander, winston

Post Reply
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"

About parallax, off-centre viewpoints and weapons, again!

Post by Diziet Sma »

In the course of replying to a recent question about (yet again) the Falcon and its' peculiarities, I noticed something that has struck me before, but I'd never followed up on, despite intending to do so.

Have a look at this screenshot of a Falcon's underside.


Image


Now, I don't know if you've spent much time in a Falcon, but whenever I've seen that view onscreen,that laser beam has never appeared to me to be quite vertical..

To be absolutely sure of myself, I loaded the picture into GIMP, and proceeded to very carefully draw a pixel-perfect, perfectly vertical line through the ship's centreline. I then drew another pixel-perfect vertical line up from the edge of the beam where it touches the edge of the screen, up to the pilot's cupola. I next measured the distance between the top of both lines, and the bottom of both lines, to confirm the two lines were perfectly parallel, which they were, down to the pixel.

Bingo! Confirmation that the laser is, apparently, "toeing in", towards the centreline!


Image


So how much is the toe-in angle?


Image


According to GIMP's measuring tool, 2.2°... which would mean the beam will cross the ship's centreline some 625 metres in front of the ship! (Well, in front of the laser-barrel actually, but let's not get too picky here)



So.

My question for the devs (and anyone else with an opinion) is, just what the hell is going on here?

Over and over again we've been told that all lasers mounted in an offset position fire parallel to the centreline.. as this screenshot would appear to suggest, given that the red target reticle indicates that the metal fragment is on-target, relative to the ship's centreline..

Image


So something strange is going on here.. either the angled beam is some weird kind of artifact of the game-engine rendering, or the laser actually "toes in" towards the centreline.. Given the final screenshot above, and the distance to target, which is reasonable close to our hypothetical figure of 625m, I'm betting on the former.

Or is there something I'm missing.. another explanation?
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
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: About parallax, off-centre viewpoints and weapons, again

Post by Smivs »

I've never flown a Falcon and don't even have the OXP, but I'm just wondering if this ship uses a gun sub-ent, and if so, is the sub-ent correctly aligned with the body/axis of the ship?
Commander Smivs, the friendliest Gourd this side of Riedquat.

User avatar
Commander McLane
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: About parallax, off-centre viewpoints and weapons, again

Post by Commander McLane »

I think the answer is much more simple: just the normal view distortion that you get in every view. The same one that lets a planet or sun appear to be elongated and stretched when it's close to the screen border.

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: About parallax, off-centre viewpoints and weapons, again

Post by Diziet Sma »

Smivs wrote:I've never flown a Falcon and don't even have the OXP, but I'm just wondering if this ship uses a gun sub-ent, and if so, is the sub-ent correctly aligned with the body/axis of the ship?
:shock:

That never occurred to me.. but you may well be correct.

All the variants are like_shipped to the plain 'Falcon" definition.. which has in it:
<key>subentities</key>
<array>
<string>bweed-falcon-airlock-l 0.0 0.0 0.0 1 0 0 0 </string>
<string>bweed-falcon-airlock-r 0.0 0.0 0.0 1 0 0 0 </string>
<string>bweed-falcon-gun 0.0 0.0 0.0 1 0 0 0 </string>
<string>bweed-falcon-dish 0.0 0.0 0.0 1 0 0 0 </string>
<string>bweed-falcon-vents 0.0 0.0 0.0 1 0 0 0 </string>
<string>bweed-falcon-scoop 0.0 0.0 0.0 1 0 0 0 </string>
<string>bweed-falcon-turret 0.0 6.5 -9.5 0.25 0.75 0.0 0</string>
<string>bweed-falcon-turret 0.0 -6 -9.5 0.25 -0.75 0.0 0</string>
<string>*FLASHER* 24 0.0 18 0 2 0.0 3</string>
<string>*FLASHER* 24 0.0 18 0 1 0.0 2</string>
<string>*FLASHER* 0.0 -4.5 -26 0 2 0.0 3</string>
<string>*FLASHER* 0.0 -4.5 -26 0 1 0.0 2</string>
<string>*FLASHER* -25 0.0 -6.5 0 2 0.0 3</string>
<string>*FLASHER* -25 0.0 -6.5 0 1 0.0 2</string>
<string>*FLASHER* 25 0.0 -6.5 0 2 0.0 3</string>
<string>*FLASHER* 25 0.0 -6.5 0 1 0.0 2</string>
</array>
Since the turrets are also defined, the only "gun" I can think of this referring to is the one mounted under the pilot's cupola.. but how could I check the alignment? I'm guessing I'd need to reload the model into Wings or Blender somehow?


@ Commander McLane, you may well be right.. but I do think this subent thing ought to be checked out, if possible.
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
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: About parallax, off-centre viewpoints and weapons, again

Post by Smivs »

Well, that's weird. It looks to be in the same location as the airlock, vents, dish etc, bang in the centre of the ship! The single '1' in the line is the orientation (along the X axis) which is the only thing that looks right and makes sense.
Unless I'm mis-understanding something of course... :wink:
Commander Smivs, the friendliest Gourd this side of Riedquat.

User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4018
Joined: Fri Nov 11, 2011 6:19 pm

Re: About parallax, off-centre viewpoints and weapons, again

Post by cim »

Player ships don't have the ability to fire lasers from subentities - all shots are from the main entity and on a fixed axis, so it's definitely not that.

The subentity being positioned at 0,0,0 is not necessarily that odd - while it's probably better to have a subentity centred around its own origin, you don't get the strange bounding box effects you'd get if you didn't centre a main entity, so it's quite possible that all of its mass is on one side.

User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: About parallax, off-centre viewpoints and weapons, again

Post by Smivs »

cim wrote:Player ships don't have the ability to fire lasers from subentities - all shots are from the main entity and on a fixed axis, so it's definitely not that.
Doh! I knew that really :roll: :oops:
Commander Smivs, the friendliest Gourd this side of Riedquat.

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: About parallax, off-centre viewpoints and weapons, again

Post by Diziet Sma »

cim wrote:Player ships don't have the ability to fire lasers from subentities - all shots are from the main entity and on a fixed axis, so it's definitely not that.

The subentity being positioned at 0,0,0 is not necessarily that odd - while it's probably better to have a subentity centred around its own origin, you don't get the strange bounding box effects you'd get if you didn't centre a main entity, so it's quite possible that all of its mass is on one side.
So in effect, that's a vote for some kind of 'view lensing' effect, such as Commander McLane suggested?
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

Post Reply