March 29, 2024, 10:45:01

Author Topic: Nexus and problems with widescreen  (Read 99433 times)

Offline Sargoth

  • Petty Officer
  • **
  • Posts: 153
  • Karma: 4
    • View Profile
Nexus and problems with widescreen
« on: December 20, 2015, 14:03:57 »
So, we all know that Nexus runs pretty good in widescreen, but the mission briefs and mission intros do not.

I image this is something we can can fix up in missions and briefings. So my question is, has anyone had dealings with those two file formats and have any tips on them?

And of course want to help out fixing them up

(I have to add that I am no coder)

Offline GeoModder

  • Chief Petty Officer
  • **
  • Posts: 279
  • Karma: 4
    • View Profile
    • http://
Re: Nexus and problems with widescreen
« Reply #1 on: December 22, 2015, 11:17:08 »
Never did more then browsing through the briefing files. But mission intros not looking good? In what way?

Offline Sargoth

  • Petty Officer
  • **
  • Posts: 153
  • Karma: 4
    • View Profile
Re: Nexus and problems with widescreen
« Reply #2 on: December 24, 2015, 14:36:32 »
they are off center, as in it seems the camera is zoomed into one corner of the frame

Offline GeoModder

  • Chief Petty Officer
  • **
  • Posts: 279
  • Karma: 4
    • View Profile
    • http://
Re: Nexus and problems with widescreen
« Reply #3 on: December 25, 2015, 14:51:40 »
Yes, I see it now. I tried it out with 1920x1080 resolution.

Tinkered a bit, and it seems changing the FOV values in rendering.ini also has an effect on the location display of some of the briefing icons during briefings even when playing with one of the standard Nexus resolutions.
Normal values are 70 45 46.826, but when leaving it 90 45 46.826 after switching from a custom resolution to a standard one made the overlay icons not be centered on their respective briefing object locations anymore.

Overall, I think the game calculates positioning from a 'standard' resolution, and extends things off-screen when the height/width registry values are changed to a non-standard resolution.

Offline Sargoth

  • Petty Officer
  • **
  • Posts: 153
  • Karma: 4
    • View Profile
Re: Nexus and problems with widescreen
« Reply #4 on: December 26, 2015, 00:32:32 »
Well, it changes the background (render of stars, suns and planets), and not the briefing itself. Good news everybody; everyone can have their own custom FOV without ruining the brief. The bad news: The brief will still be out of bound. I tried setting the FOV at the double (180). It was hilarious.  But it does look better for me at least running 90 65 58.726. I wouldn't recommend changing the FOV from its original value. It breaks the illusion of space :p

Not sure what the middle number does, refresh rate maybe? the last one is probably verticleFOV

I did some modifying to the briefing file for mission 2 (_auto_13), You may have a look here: https://dl.dropboxusercontent.com/u/20010147/13_1.brief

Needless to say: back up your original.
POS are (obviously) position in Horizontal and Vertical respectively. It doesn't seem to follow screen resolution, which makes me believe that when you're trying my brief file, it's going to fail miserably.

TO and FROM seems to be Vertical and Horizontal graphic arrows that point

If you wondering what it should look like:
https://youtu.be/K5FzgoxUATk

This was 2 hours work. A lot of guess work on numbers and testing out. Seriously there's gotta be a better way. But I seem to be drawing a blank.

Here's every autosave for the game if you need it: https://dl.dropboxusercontent.com/u/20010147/Savegames.zip
« Last Edit: December 26, 2015, 00:47:40 by Sargoth »

Offline GeoModder

  • Chief Petty Officer
  • **
  • Posts: 279
  • Karma: 4
    • View Profile
    • http://
Re: Nexus and problems with widescreen
« Reply #5 on: December 26, 2015, 01:26:45 »
As far as I could see, changing the values of the files in the gui folder to your custom resolution doesn't change a thing. Standard value there is "0 0 1024 768".
Drawing symbols/arrows from map objects towards another works just fine. The problem there is that objects are often off-screen. 'Hard' positioning (by coordinates) fails miserably.

I wonder if the guy who recently gave us part of the texture converter code on facebook could shed some light?

Offline Sargoth

  • Petty Officer
  • **
  • Posts: 153
  • Karma: 4
    • View Profile
Re: Nexus and problems with widescreen
« Reply #6 on: December 26, 2015, 01:35:36 »
I don't want to pull that card unless I absolutely have to. How was the brief for you?

Offline GeoModder

  • Chief Petty Officer
  • **
  • Posts: 279
  • Karma: 4
    • View Profile
    • http://
Re: Nexus and problems with widescreen
« Reply #7 on: December 26, 2015, 01:52:31 »
The same as in the video you posted.
Clearly things get stretched. Just comparing the width/size of Finn's explaining boxes and picture tells us that.
Its almost likes the briefs and titles get 'doubled up'. Once with a new custom resolution, and then again with things getting stretched beyond monitor size. I wonder if having a second monitor linked, and in extended view mode, would show things better.
But I don't have a second monitor, so can't check on that.

Offline Sargoth

  • Petty Officer
  • **
  • Posts: 153
  • Karma: 4
    • View Profile
Re: Nexus and problems with widescreen
« Reply #8 on: December 26, 2015, 02:00:08 »
The stretching can be fixed. Just got to figure out the aspect ratio of the brief. I'll look at it tomorrow.

Offline GeoModder

  • Chief Petty Officer
  • **
  • Posts: 279
  • Karma: 4
    • View Profile
    • http://
Re: Nexus and problems with widescreen
« Reply #9 on: December 26, 2015, 02:26:32 »
If you use 1920x1080 resolution, I bet ya the stretch is 16x10. ;)
Which translates to 4x2.5 compared to 4x3 ratio on the older resolutions. But that excludes the 1280x1024 resolution (included in the game), which is 5x4 and clearly works as intended.

Offline Sargoth

  • Petty Officer
  • **
  • Posts: 153
  • Karma: 4
    • View Profile
Re: Nexus and problems with widescreen
« Reply #10 on: December 26, 2015, 16:30:14 »
I'm using 2560x1440p, but which in the same category as 1920x1080.

Just need to figure out the extreme on positions. 0x0 is upper most left corner of the screen. and then find the opposite. Then I'll know if I'm dealing in aspects or not :p

Offline Sargoth

  • Petty Officer
  • **
  • Posts: 153
  • Karma: 4
    • View Profile
Re: Nexus and problems with widescreen
« Reply #11 on: December 26, 2015, 16:48:44 »
It seems it's 4:3. The brief resolution seems to be at 800x600. Question is then, where can we adjust the briefing rendering?

Edit: Should be a bit easier to get the correct aspect ratio with 4X2.5, thanks :)
Just gonna type it down here so I have it somewhere; 4x2.5; 1.6:1
« Last Edit: December 26, 2015, 17:14:43 by Sargoth »

Offline GeoModder

  • Chief Petty Officer
  • **
  • Posts: 279
  • Karma: 4
    • View Profile
    • http://
Re: Nexus and problems with widescreen
« Reply #12 on: December 26, 2015, 17:51:23 »
Frankly, I'm out of ideas of where to look for briefing renderings (and titles as well).
It could as well be hardcoded in the engine. :(

In other news, I *think* I finally found which parameters to adjust to get the planets of Sol rotate in the right direction. Luckily I had two old inverted test textures of Earth and Mars lying around on my backup drive. Antarctica is now clearly visible in daylight at CE 01/01/2112 (local summer), with the sun setting in the west instead of east.

So if by good fortune somebody manages a working texture converter for the game, I could offer a rectified Solar System once my number tinkering is triple checked and adjusted.

Offline Sargoth

  • Petty Officer
  • **
  • Posts: 153
  • Karma: 4
    • View Profile
Re: Nexus and problems with widescreen
« Reply #13 on: December 26, 2015, 18:27:51 »
So lets sum this up then:

- We can move the objects around in the briefings.
- but we can't change the resolution of the briefings.

Well, changing the position of the briefings is an ugly fix. But it gets us closer to a 16:9 brief. It's going to take many hours and work to get all the briefs close to correctly. Something I don't want to commit to until there is no other option.

I've been looking through the different files and haven't seen anything that would change the resolution of the briefs themselves. I wish the briefing.gui did what it looks like its supposed to do, but sadly that isn't the case. I think I gotta pull that card for more information here.  ;)

Offline GeoModder

  • Chief Petty Officer
  • **
  • Posts: 279
  • Karma: 4
    • View Profile
    • http://
Re: Nexus and problems with widescreen
« Reply #14 on: December 26, 2015, 19:33:36 »
Well, changing the position of the briefings is an ugly fix. But it gets us closer to a 16:9 brief. It's going to take many hours and work to get all the briefs close to correctly. Something I don't want to commit to until there is no other option.

I've been looking through the different files and haven't seen anything that would change the resolution of the briefs themselves. I wish the briefing.gui did what it looks like its supposed to do, but sadly that isn't the case. I think I gotta pull that card for more information here.  ;)

Yeah, bummer on all of that. :(
And repositioning all kind of things in briefing files won't fix it all if the 'sector/planet' in question isn't completely visible. All in all, it would only work perfectly for one particular resolution, and that's it.

Offline CmdrKoenig

  • Recruit
  • *
  • Posts: 8
  • Karma: 4
    • View Profile
Re: Nexus and problems with widescreen
« Reply #15 on: December 27, 2015, 23:16:29 »
Hi all,

I'm the pulled card ;)

I've looked into the remains of the code. Unfortunately it seems that it's not possible to correct the briefs via ini settings because of some hardcoded factors.
We were not too far-sighted at the time, and expected 4:3 screens only.
So the bad news is that you have to modify all briefing scripts one by one. You can, however, write some relatively simple parser app that converts all the necessary coordinates.

The
Pos, To, From, ArcPoint
parameters are X Y screen coordinates expressed in a 1024 x 768 reference coordinate system.
When you set a resolution different from 1024 x 768 the system scales coordinates to the new width - but always keeps the 4:3 ratio.
For e.g. setting 1920 x 1080 will result rendering the brief into a 1920 x 1440 area with the lower area cut off.

Also if you keep the original FOV (which is a veritcal fov), the original solar system cut will be concentrated into the center 4:3 area within the 16:9 screen.

Therefore to correct the brief coordinates you have to transform them
into the center 4:3 area
of the upper 16:9 part
of the 1024 x 768 reference screen.

That is
- scale both X and Y by 0.75
- shift X by 128


Note that I couldn't actually test any of the above so it's theoretical until you try it out....


The briefing.gui only contains the "normal" GUI elements (the toolbar buttons) and has nothing to do with the briefing graphics itself, that is the reason it can't be helpful.

About the three FOV parameters: to be short, just ignore the last two, they're inactive in your version.
But I repeat that the above calculation is only valid if you keep the original fov.

Offline Sargoth

  • Petty Officer
  • **
  • Posts: 153
  • Karma: 4
    • View Profile
Re: Nexus and problems with widescreen
« Reply #16 on: December 28, 2015, 15:23:10 »
Thank you very much.

I was afraid that it was hardcoded. Well nothing to do about it now than get to work on the briefs.
But hopefully your theory stands up, and the whole process should be a bit more straight forward.

I'll be posting result here soon. watch this space!

Offline GeoModder

  • Chief Petty Officer
  • **
  • Posts: 279
  • Karma: 4
    • View Profile
    • http://
Re: Nexus and problems with widescreen
« Reply #17 on: December 28, 2015, 15:29:03 »
 ;D

Offline Sargoth

  • Petty Officer
  • **
  • Posts: 153
  • Karma: 4
    • View Profile
Re: Nexus and problems with widescreen
« Reply #18 on: December 28, 2015, 17:30:31 »
I tried shifting the x value along with the scaling for a couple of hours until I realized I should just do scaling on the first pass  ::)

https://youtu.be/LxZqUEuEpF0

It's not perfect. Moving needs to happen on Y axis. And some of the number needs far less than 128. But man does this cut the 'trial and error' work out of it. My motivation just went up by a factor of 10 ;D

Any way we can change the font size?

Offline GeoModder

  • Chief Petty Officer
  • **
  • Posts: 279
  • Karma: 4
    • View Profile
    • http://
Re: Nexus and problems with widescreen
« Reply #19 on: December 28, 2015, 18:30:51 »
Any way we can change the font size?

Just tried the following: in Nexus - The Jupiter Incident\gui\title, change the parameter fontsize.
It is 3 by default. Changing it to 1 showed me a significantly smaller title size at the onset of mission 11.

Looks like, if we want, we could even change the color.

Offline Sargoth

  • Petty Officer
  • **
  • Posts: 153
  • Karma: 4
    • View Profile
Re: Nexus and problems with widescreen
« Reply #20 on: December 28, 2015, 19:05:25 »

Just tried the following: in Nexus - The Jupiter Incident\gui\title, change the parameter fontsize.
It is 3 by default. Changing it to 1 showed me a significantly smaller title size at the onset of mission 11.

Looks like, if we want, we could even change the color.

Was that for mission start title? Because I changed that, and it did nothing to the brief.

Did some tweaking
https://youtu.be/st6siF8FpUQ

What you think?

Offline Sargoth

  • Petty Officer
  • **
  • Posts: 153
  • Karma: 4
    • View Profile
Re: Nexus and problems with widescreen
« Reply #21 on: December 28, 2015, 19:23:23 »
Made some adjustments - try it out. I think we're golden on mission "13" brief - https://dl.dropboxusercontent.com/u/20010147/13_1.brief

Edit:

And with one key stroke I've fixed the off center title for all missions

Code: [Select]
0 0 1024 768

TEXTBOX "text"    -150  150 1024 618
Efx 1
CellDx 0
CellDy 1
CellHeight 27
Rows 8
Uppercase
Column
CellWidth 1024
FontSize 2
TextColor #81
charspacing 2
End
END
« Last Edit: December 28, 2015, 19:45:23 by Sargoth »

Offline GeoModder

  • Chief Petty Officer
  • **
  • Posts: 279
  • Karma: 4
    • View Profile
    • http://
Re: Nexus and problems with widescreen
« Reply #22 on: December 28, 2015, 19:40:47 »
Was that for mission start title? Because I changed that, and it did nothing to the brief.

Eh, yes. Must have misunderstood you.

Offline Sargoth

  • Petty Officer
  • **
  • Posts: 153
  • Karma: 4
    • View Profile
Re: Nexus and problems with widescreen
« Reply #23 on: December 28, 2015, 19:47:19 »
No worries. Was going to look at the mission intro title for mission "13", but now I don't have to look at any of them  8)

I did set the font to 2. looked better than 1 and 3

Offline GeoModder

  • Chief Petty Officer
  • **
  • Posts: 279
  • Karma: 4
    • View Profile
    • http://
Re: Nexus and problems with widescreen
« Reply #24 on: December 28, 2015, 19:52:39 »
Just played it out (and the best news is that it even works with existing save files).

Looks spot on, except for one thing. the last "Sunflower Base" box looks slightly too small (text touching bottom of the box), or the font is too big for the text. But that should be easily corrected by increasing the length of the box.