Hard Light Productions Forums

Hosted Projects - FS2 Required => Blue Planet => Topic started by: leoben on March 31, 2015, 10:14:28 pm

Title: no targeting brackets
Post by: leoben on March 31, 2015, 10:14:28 pm
Hey gang - just installed FSO and BP2 fresh using the FSO installer, have a bit of a problem. If I use the BP2 mod, there are no targeting brackets around any of the ships I target. There's a lead indicator if it's not completely centered, but no brackets. also no targeting indicator where to shoot, no distance counter. This happens no matter which mission, but only using BP2 mod. BP and MVP2014 work fine. Any ideas?
Title: Re: no targeting brackets
Post by: leoben on March 31, 2015, 10:32:52 pm
Captured it on video. At the start of the mission, though i get flak, you can see the targeting bracket in the lower right jumping all over at first, then disappearing. Later I target the aeolus, but there are no lead indicators nor brackets, no nothin'.

https://amd.box.com/s/rlr32at6quu7a8xmb3hq5luv8d63q5r2
Title: Re: no targeting brackets
Post by: AdmiralRalwood on March 31, 2015, 10:56:16 pm
Please post your fs2_open.log file.  Instructions on how to do this can be found in this post.
Title: Re: no targeting brackets
Post by: leoben on April 01, 2015, 10:34:20 am
Hm, game crashed before the problem surfaced, but here you go

[attachment deleted by nobody]
Title: Re: no targeting brackets
Post by: leoben on April 01, 2015, 10:39:11 am
one culprit i found - using the SSE build of 3.7.2 gets rid of the issue.
Title: Re: no targeting brackets
Post by: leoben on April 01, 2015, 10:53:51 am
scratch that, it didn't solve anything :(
Title: Re: no targeting brackets
Post by: Yarn on April 01, 2015, 12:06:11 pm
What happens if you use a lower resolution like 1920x1080?
Title: Re: no targeting brackets
Post by: AdmiralRalwood on April 01, 2015, 12:07:08 pm
Hm, game crashed before the problem surfaced, but here you go
No, it crashed exactly as the problem surfaced.

This is the same Int3() that was behind Mantis 3070 (http://scp.indiegames.us/mantis/view.php?id=3070), but that was fixed in r10868 and you don't seem to need to fly near anything for the problem to occur. About the only other thing I can think of that might be relevant is this:
Code: [Select]
Initializing OpenGL graphics device at 3840x2160 with 32-bit color...
You might be the first person to try running FSO at that resolution. As Yarn suggested, could you try running FSO at 1920x1080 just to see if you get targeting brackets?
Title: Re: no targeting brackets
Post by: leoben on April 01, 2015, 12:49:45 pm
Confirmed, this only happens at 4K. I tried the mission Aristeia, which begins a bit 'calmer'. The problem only starts when I select a target that is very close. Until I target Tevs that are far enough away, all's good. So it seems this is almost the exact same problem you linked earlier. Do you think someone will look into this?
Title: Re: no targeting brackets
Post by: Yarn on April 01, 2015, 01:09:14 pm
Can you try the latest nightly build (http://www.hard-light.net/forums/index.php?board=173.0) (at 4K resolution, of course)?
Title: Re: no targeting brackets
Post by: leoben on April 01, 2015, 02:16:41 pm
Tried build 11296 - same issue.
Title: Re: no targeting brackets
Post by: Yarn on April 01, 2015, 03:37:36 pm
I have attached a file that is identical to BP2's HUD table except for the +Target Brackets entries, which have been modified so that the brackets are loaded the "retail" way. See what happens if you place it in blueplanet2\data\tables (create the folders if they don't exist).

[attachment deleted by nobody]
Title: Re: no targeting brackets
Post by: leoben on April 01, 2015, 04:25:54 pm
nothing. Same.
Title: Re: no targeting brackets
Post by: Yarn on April 01, 2015, 04:42:02 pm
So that didn't help. Now I want you to try the table that's attached to this post. It's just the 2014 MVP table--no changes whatsoever.

You didn't say that you tried playing without any mods, so can you do so if you haven't already? (This means playing without MediaVPs since they count as a mod.)

If the brackets work with the MVP table and don't work without mods, then the problem is most likely related to HUD scaling.

[attachment deleted by nobody]
Title: Re: no targeting brackets
Post by: leoben on April 01, 2015, 04:48:19 pm
Do I put this under BP2/data/tables as well?
Title: Re: no targeting brackets
Post by: Yarn on April 01, 2015, 04:54:49 pm
Yes. If the other table is still there, overwrite it.
Title: Re: no targeting brackets
Post by: leoben on April 01, 2015, 04:58:41 pm
Ha, this did it. Everything on the HUD is really small now, but I have proper targeting now.

BTW the 2014MVP mod worked fine, even BP1 worked fine, only BP2 mod had this issue.
Title: Re: no targeting brackets
Post by: leoben on April 01, 2015, 05:00:53 pm
also just tried selecting no mods at all, targeting looks good.
Title: Re: no targeting brackets
Post by: Yarn on April 01, 2015, 05:15:42 pm
I think I found something that might be contributing to your problem. Try playing BP2 with this build, making sure that you remove all HUD tables from your blueplanet2\data\tables folder:
https://dl.dropboxusercontent.com/u/89353583/FreeSpace/possible_4k_fix.zip (https://dl.dropboxusercontent.com/u/89353583/FreeSpace/possible_4k_fix.zip)

For those wondering what I did, I moved the call to gr_set_screen_scale() in HudGauge::resetClip() so that it occurs before the call to gr_resize_screen_pos(). Here's the patch:
Code: [Select]
Index: code/hud/hud.cpp
===================================================================
--- code/hud/hud.cpp (revision 11296)
+++ code/hud/hud.cpp (working copy)
@@ -1039,11 +1039,12 @@
 
  gr_set_clip(hx, hy, w, h);
  } else {
+ gr_set_screen_scale(base_w, base_h);
+
  hx = fl2i(HUD_offset_x);
  hy = fl2i(HUD_offset_y);
 
  gr_resize_screen_pos(&hx, &hy);
- gr_set_screen_scale(base_w, base_h);
 
  w = gr_screen.max_w;
  h = gr_screen.max_h;
Title: Re: no targeting brackets
Post by: leoben on April 01, 2015, 05:26:50 pm
Screwed it up again, but the behavior is slightly different now. The targeting brackets are now almost always in the upper left corner. Sometimes disappearing, reappearing. But it's definitely not where it's supposed to be.
Title: Re: no targeting brackets
Post by: Yarn on April 01, 2015, 05:55:37 pm
To help me determine whether revision 10844 might be responsible for your problem, try both of these builds:

Revision 10843: https://dl.dropboxusercontent.com/u/89353583/FreeSpace/fs2_open_3_7_1_r10843_SSE2.zip (https://dl.dropboxusercontent.com/u/89353583/FreeSpace/fs2_open_3_7_1_r10843_SSE2.zip)
Revision 10844: https://dl.dropboxusercontent.com/u/89353583/FreeSpace/fs2_open_3_7_1_r10844_SSE2.zip (https://dl.dropboxusercontent.com/u/89353583/FreeSpace/fs2_open_3_7_1_r10844_SSE2.zip)
Title: Re: no targeting brackets
Post by: leoben on April 01, 2015, 06:46:56 pm
43, good. 44, not good.
Title: Re: no targeting brackets
Post by: Yarn on April 01, 2015, 07:19:31 pm
So that is indeed when the problem was introduced. Now try these builds at both 1920x1080 and 3840x2160 resolutions. This should help me determine how and whether revision 10868 did anything to fix bracket rendering in general.

Revision 10867: https://dl.dropboxusercontent.com/u/89353583/FreeSpace/fs2_open_3_7_1_r10867_SSE2.zip (https://dl.dropboxusercontent.com/u/89353583/FreeSpace/fs2_open_3_7_1_r10867_SSE2.zip)
Revision 10868: https://dl.dropboxusercontent.com/u/89353583/FreeSpace/fs2_open_3_7_1_r10868_SSE2.zip (https://dl.dropboxusercontent.com/u/89353583/FreeSpace/fs2_open_3_7_1_r10868_SSE2.zip)
Title: Re: no targeting brackets
Post by: leoben on April 01, 2015, 08:27:01 pm
67, bad at both resolutions.
68, good at both resolutions.
Title: Re: no targeting brackets
Post by: Yarn on April 01, 2015, 09:06:34 pm
Awesome! So your problem was fixed at one point. Now we need to track down the revision that reintroduced the problem. There is one more revision, 10965, that was meant to fix a bug that was introduced in revision 10844, so let's see whether that's the culprit.

Here are two more builds to test. Do the same as before, testing with both resolutions.

Revision 10964: https://dl.dropboxusercontent.com/u/89353583/FreeSpace/fs2_open_3_7_1_r10964_SSE2.zip (https://dl.dropboxusercontent.com/u/89353583/FreeSpace/fs2_open_3_7_1_r10964_SSE2.zip)
Revision 10965: https://dl.dropboxusercontent.com/u/89353583/FreeSpace/fs2_open_3_7_1_r10965_SSE2.zip (https://dl.dropboxusercontent.com/u/89353583/FreeSpace/fs2_open_3_7_1_r10965_SSE2.zip)
Title: Re: no targeting brackets
Post by: AdmiralRalwood on April 01, 2015, 09:21:48 pm
leoben, were you doing all these tests with BP2's hud table?
Title: Re: no targeting brackets
Post by: leoben on April 02, 2015, 01:37:35 am
Both builds work well with both resolutions. Admiral - not sure, I think so? There are no table files in bp2\data\tables.
Title: Re: no targeting brackets
Post by: Yarn on April 02, 2015, 02:21:28 am
So that revision isn't the problem. That must mean that some later revision messed something up.

I now want you to run the test on various nightly builds. Start with the one from July 31, 2014 (it's currently on this page (http://www.hard-light.net/forums/index.php?board=173.225)), and work your way up (forward in time) from there until you find one that has the problem. (You don't have to try all of them, though; you can skip over a whole bunch of them at a time until you find a problematic build. Just make sure that you keep track of which ones you've tried!) Once you do, narrow the problem down to just two adjacent builds (ignoring the non-Windows ones): one with the problem, and one without. After that, if the two nightlies are more than one revision apart, then I will make more builds for you so that you can test all the revisions in between.
Title: Re: no targeting brackets
Post by: leoben on April 02, 2015, 02:55:16 pm
Good thing long weekend's coming up :)

I'll report back once I find something. Thanks for the help!
Title: Re: no targeting brackets
Post by: leoben on April 03, 2015, 05:03:41 pm
Ha! Got lucky - found the culprit build.

10988 from 8/11 is good, build 10990 from 8/13 is bad. So something went tits between the two there.
Title: Re: no targeting brackets
Post by: AdmiralRalwood on April 03, 2015, 05:16:54 pm
Ha! Got lucky - found the culprit build.

10988 from 8/11 is good, build 10990 from 8/13 is bad. So something went tits between the two there.
Well, it's highly unlikely to be r10989 (mission parsing fix), but r10990 was the fix for Mantis 2985 (http://scp.indiegames.us/mantis/view.php?id=2985) and was specifically meant to address scaling, so it not only could, but was intended to have repercussions at high resolutions. A little surprised the offscreen target indicator was affected, though...
Title: Re: no targeting brackets
Post by: Yarn on April 04, 2015, 12:56:37 am
So that we can know for sure which revision is the culprit, here are builds for revisions 10988-10990:

Revision 10988: https://dl.dropboxusercontent.com/u/89353583/FreeSpace/fs2_open_3_7_1_r10988_SSE2.zip (https://dl.dropboxusercontent.com/u/89353583/FreeSpace/fs2_open_3_7_1_r10988_SSE2.zip)
Revision 10989: https://dl.dropboxusercontent.com/u/89353583/FreeSpace/fs2_open_3_7_1_r10989_SSE2.zip (https://dl.dropboxusercontent.com/u/89353583/FreeSpace/fs2_open_3_7_1_r10989_SSE2.zip)
Revision 10990: https://dl.dropboxusercontent.com/u/89353583/FreeSpace/fs2_open_3_7_1_r10990_SSE2.zip (https://dl.dropboxusercontent.com/u/89353583/FreeSpace/fs2_open_3_7_1_r10990_SSE2.zip)
Title: Re: no targeting brackets
Post by: leoben on April 04, 2015, 04:02:59 pm
88 - OK
89 - OK
90 - bad.
Title: Re: no targeting brackets
Post by: Yarn on April 04, 2015, 05:06:15 pm
All right, so revision 10990 is the culprit. I can't quite see how it can be causing problems for you, though, since all that revision does is add proper rounding to the functions that scale coordinates. Still, I will do whatever I can to fix this, hopefully before 3.7.2 Final is released.

I'm almost ready to create a Mantis report. Before I do, though, I need to do a few more things:

[attachment deleted by nobody]
Title: Re: no targeting brackets
Post by: leoben on April 04, 2015, 08:58:14 pm
Tried three scenarios:

1. Build 88 with table attached - works fine.
2. Build 90 without the table attached - works fine.
3. Build 90 with table attached - bad.
Title: Re: no targeting brackets
Post by: Yarn on April 04, 2015, 09:16:45 pm
Just to clarify:
Title: Re: no targeting brackets
Post by: leoben on April 04, 2015, 10:02:16 pm
Correct and correct.
Title: Re: no targeting brackets
Post by: Yarn on April 04, 2015, 10:51:07 pm
Thanks. I should now all information necessary to post a report on Mantis (link here (http://scp.indiegames.us/mantis/my_view_page.php)), which I will do tomorrow. To fix this, I'm going to need your help with testing any changes that I make (since I can't play in 4K), so I suggest making an account there if you haven't already done so.

Once the report has been created, I will link to it in this thread.

Regarding the tiny HUD with the MVP HUD table, you might want to try the build and HUD table in this post (http://www.hard-light.net/forums/index.php?topic=89233.msg1780514#msg1780514). It's a proposal of mine for a middleground between "full" scaling and no scaling at higher resolutions. (I have no idea whether the targeting brackets will work for you there, though.)
Title: Re: no targeting brackets
Post by: leoben on April 05, 2015, 02:17:58 pm
Of course - I'll register.

I tried your build with that table - HUD is now decent size, but targeting brackets are messed up the same way as with anything 990 build and up.
Title: Re: no targeting brackets
Post by: Yarn on April 05, 2015, 07:24:58 pm
The Mantis report has been uploaded here: http://scp.indiegames.us/mantis/view.php?id=3155 (http://scp.indiegames.us/mantis/view.php?id=3155)

Once you post there, I will start off by giving you some more builds to try.
Title: Re: no targeting brackets
Post by: leoben on April 05, 2015, 08:08:18 pm
What should I post?
Title: Re: no targeting brackets
Post by: Yarn on April 05, 2015, 10:22:12 pm
An "I'm ready" or similar message will do.
Title: Re: no targeting brackets
Post by: leoben on April 06, 2015, 12:03:14 am
I posted a note, is that what you meant? I'm sorry, never used Mantis before.
Title: Re: no targeting brackets
Post by: Yarn on April 06, 2015, 12:34:47 am
Yes, that's exactly what I meant.
Title: Re: no targeting brackets
Post by: leoben on April 06, 2015, 06:50:30 pm
Cool - responded. I guess we can continue this over there.