View Issue Details

IDProjectCategoryView StatusLast Update
0000067FSSCPgraphicspublic2004-12-26 04:23
Reporterkasperl Assigned Tophreak  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Summary0000067: offset eyepoint causes offset HUD
DescriptionI think this is a bug indigenous to even the commercial FS2. When a fighter or
bomber has its eyepoint set to coordinates other than x=0, y=0, z=(whatever),
almost all the HUD gauges are offset by a proportional amount from the centre
of the screen. For example, http://www.3dap.com/hlp/hosted/scroll/misc/maahesoffsethud.gif was taken from a ship whose eyepoint is located at x=-12, y=0.5,
z=6. X=-12 means that the eyepoint is located 12 metres to port (left) of
centre, and as you can see the HUD gauges are being drawn offset to the right.
This effect appears to be proportional to the distance by which the x or y
values differ from 0 (i.e. it is more pronounced with x=-12 than x=-6).
Different z values have no effect, of course.

I have identified two possible places where the source of the problem might
lie, but do not have the coding knowledge to fix it:
1) the first parts of game_render_frame() in freespace.cpp
2) HUD_set_offsets() in hud.cpp
The second seems most likely to me.

Basically, it would be good if no matter where the eyepoint is located, the HUD
was always centred on the player's screen.

------- Additional Comment 0000001 From Ian Warfield 2003-05-20 13:10 -------
I'll take this bug; seems easy to fix.

------- Additional Comment 0000002 From phreak 2003-05-21 14:07 -------
did you try setting the eye to 0,0,0?

------- Additional Comment 0000003 From Jon Stovell 2003-05-21 15:06 -------
Yes, when the eye is at 0,0,0 the hud appears properly centred. But then the
eye is not positioned where the cockpit is.

------- Additional Comment 0000004 From Jon Stovell 2003-06-24 00:45 -------
Any word on this?

------- Additional Comment 0000005 From Ian Warfield 2003-08-10 01:04 -------
Sorry, no. I won't be able to do any coding until I get back to college - two
or three weeks from now.

------- Additional Comment 0000006 From Ian Warfield 2003-09-02 23:06 -------
Bah. I've looked at this, and haven't found anything obvious. It'll take a
more thorough code trace to nail down the problem, which will be time-consuming.
Additional InformationReporter: sesquipedalian_@hotmail.com (Jon Stovell)
Assigned To: fs2source@warpcore.org (Edward Gardner)
http://fs2source.warpcore.org/bugzilla/show_bug.cgi?id=90
TagsNo tags attached.

Activities

kasperl

2004-01-16 11:15

developer   ~0000039

http://dynamic4.gamespy.com/~freespace/forums/showthread.php?s=&postid=330067#post330067

http://fs2source.warpcore.org/bugzilla/show_bug.cgi?id=109

Sesquipedalian

2004-03-09 08:59

reporter   ~0000406

So, any work done here?

Sesquipedalian

2004-03-09 09:24

reporter   ~0000408

Reminder sent to Goober5000

0000067 - offset eyepoint causes offset HUD

:)

Lightspeed

2004-03-13 12:57

reporter   ~0000432

It still happens.

Goober5000

2004-03-13 20:36

administrator   ~0000434

Yeah, unfortunately. I spotted the module responsible for the offset, but I can't fathom how to fix it, as it's intertwined with a bunch of other stuff. But I haven't forgotten. :)

Bobboau

2004-03-15 06:48

developer   ~0000444

well what's the function, I could take a stab at it

RandomTiger

2004-03-21 22:44

developer   ~0000528

Goob, please update this bug with the info you have on it

Goober5000

2004-03-21 23:11

administrator   ~0000530

Sigh... sorry, I forget which function I spotted. All I remember is that it had something to do with the HUD offset, perhaps shaking it during the EMP effect. I'd have to trace through it again. If anyone else wants to help, feel free.

RandomTiger

2004-03-22 07:39

developer   ~0000540

Last edited: 2004-03-22 07:40

Does this happen in OGL as well as D3D?

edited on: 03-22-04 02:40

Goober5000

2004-03-22 11:27

administrator   ~0000541

It's the whole HUD - every gauge. Haven't checked OGL.

Sesquipedalian

2004-04-13 10:41

reporter   ~0000760

*poke*

Sesquipedalian

2004-05-09 08:59

reporter   ~0000913

*poke poke*

Goober5000

2004-05-09 10:43

administrator   ~0000914

*pokes back*

Sesquipedalian

2004-11-23 03:07

reporter   ~0001372

*vigourous poke*

Goober5000

2004-11-23 05:58

administrator   ~0001373

OW!

*falls out of bed*

*realizes he's worn out the snooze button*

Bah. Okay, I'll take another look at this. ;)

phreak

2004-12-23 16:35

developer   ~0001447

ok i think i fixed this, explanation follows:

according to the comments in the code, the HUD offset code is used to shake the hud. i doubt this is the case, but i didn't comment it out just in case it was. either way the HUD offset was calculated by using the center point of the model and adding 100 times its forward vector in order to add some jitter.

vm_vec_scale_add( &tmp, &Viewer_obj->pos, &Viewer_obj->orient.vec.fvec, 100.0f );

This code didn't take into account the real position of the eye point of the model. all that needed to be changed was changing &Viewer_obj->pos to &Eye_position (which is calculated to be "model position + eye point") and it looks like it fixed the issues. this may need some futher testing to see if the code is even needed or if my chnages break something. otherwise its working perfectly now

Goober5000

2004-12-25 17:22

administrator   ~0001454

Is this fixed then, phreak?

phreak

2004-12-26 04:23

developer   ~0001456

from what it looks like, yes. i haven't seen any problems playing through the normal FS2 campaign with this fix.

Issue History

Date Modified Username Field Change
2004-01-16 11:07 kasperl New Issue
2004-01-16 11:15 kasperl Note Added: 0000039
2004-03-09 08:59 Sesquipedalian Note Added: 0000406
2004-03-09 09:24 Sesquipedalian Note Added: 0000408
2004-03-13 12:57 Lightspeed Note Added: 0000432
2004-03-13 20:36 Goober5000 Note Added: 0000434
2004-03-15 06:48 Bobboau Note Added: 0000444
2004-03-21 22:44 RandomTiger Note Added: 0000528
2004-03-21 22:49 RandomTiger Assigned To => Sticks
2004-03-21 22:49 RandomTiger Status new => assigned
2004-03-21 23:05 Sticks Assigned To Sticks => Bobboau
2004-03-21 23:11 Goober5000 Note Added: 0000530
2004-03-22 07:39 RandomTiger Note Added: 0000540
2004-03-22 07:40 RandomTiger Note Edited: 0000540
2004-03-22 11:27 Goober5000 Note Added: 0000541
2004-04-13 10:41 Sesquipedalian Note Added: 0000760
2004-05-09 08:59 Sesquipedalian Note Added: 0000913
2004-05-09 10:43 Goober5000 Note Added: 0000914
2004-09-01 00:41 Goober5000 Assigned To Bobboau => Goober5000
2004-11-23 03:07 Sesquipedalian Note Added: 0001372
2004-11-23 05:58 Goober5000 Note Added: 0001373
2004-12-23 16:35 phreak Note Added: 0001447
2004-12-25 17:22 Goober5000 Note Added: 0001454
2004-12-25 17:22 Goober5000 Assigned To Goober5000 => phreak
2004-12-26 04:23 phreak Note Added: 0001456
2004-12-26 04:23 phreak Status assigned => resolved
2004-12-26 04:23 phreak Resolution open => fixed