View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000067 | FSSCP | graphics | public | 2004-01-16 11:07 | 2004-12-26 04:23 |
| Reporter | kasperl | Assigned To | phreak | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Summary | 0000067: offset eyepoint causes offset HUD | ||||
| Description | I 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 Information | Reporter: sesquipedalian_@hotmail.com (Jon Stovell) Assigned To: fs2source@warpcore.org (Edward Gardner) http://fs2source.warpcore.org/bugzilla/show_bug.cgi?id=90 | ||||
| Tags | No tags attached. | ||||
|
|
http://dynamic4.gamespy.com/~freespace/forums/showthread.php?s=&postid=330067#post330067 http://fs2source.warpcore.org/bugzilla/show_bug.cgi?id=109 |
|
|
So, any work done here? |
|
|
Reminder sent to Goober5000 0000067 - offset eyepoint causes offset HUD :) |
|
|
It still happens. |
|
|
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. :) |
|
|
well what's the function, I could take a stab at it |
|
|
Goob, please update this bug with the info you have on it |
|
|
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. |
|
|
Does this happen in OGL as well as D3D? edited on: 03-22-04 02:40 |
|
|
It's the whole HUD - every gauge. Haven't checked OGL. |
|
|
*poke* |
|
|
*poke poke* |
|
|
*pokes back* |
|
|
*vigourous poke* |
|
|
OW! *falls out of bed* *realizes he's worn out the snooze button* Bah. Okay, I'll take another look at this. ;) |
|
|
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 |
|
|
Is this fixed then, phreak? |
|
|
from what it looks like, yes. i haven't seen any problems playing through the normal FS2 campaign with this fix. |
| 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 |