Page 4 of 7

Re: New High-Res Hyperspace Effect

Posted: Tue Dec 17, 2019 9:43 pm
by Vince T
Darksaber wrote:
Tue Dec 17, 2019 8:52 pm
lol :D :D :D

Image
You keep doing this I'll have a custom title "grandmemester" with your name on it right here :D :P

Re: New High-Res Hyperspace Effect

Posted: Wed Dec 18, 2019 1:59 am
by blue_max
Darksaber wrote:
Tue Dec 17, 2019 7:39 pm
I'm going to wait for someone to figure out the HUD and Crosshair for 1920x1080 cheers though
Right now, the settings for the effect only seem to depend on the in-game resolution and FOV. I provided several examples in the ZIP file for all the in-game resolutions, so maybe one of those works for you. Either way, the worst that will happen is that the effect will not be perfectly centered.

@Jeremy: Thanks! RIght now I can use any and all the information I can get regarding the in-game camera.

Re: New High-Res Hyperspace Effect

Posted: Wed Dec 18, 2019 4:35 am
by ual002
I snort laughed soda all over my monitor from your response Darksaber.

Re: New High-Res Hyperspace Effect

Posted: Wed Dec 18, 2019 7:03 am
by keiranhalcyon7
JeremyaFr wrote:
Tue Dec 17, 2019 9:18 pm
For 1920x1080:

HUD scale:
value: 1080 / 600.0f = 1.8

FOV:
value: 1080 * 1.0666f + 0.5f = 1152
angle: atan(1080 / 1152) * 2 / pi * 180 = 86.3°
Alright, let's take something a little more concrete. These images were taken with the following settings (and then downsized by a factor of 2 for sanity):
settings.png
flightscreen3.png
flightscreen4.png

Re: New High-Res Hyperspace Effect

Posted: Wed Dec 18, 2019 7:05 am
by keiranhalcyon7
Almost there...
flightscreen5.png
flightscreen6.png
flightscreen7.png

Re: New High-Res Hyperspace Effect

Posted: Wed Dec 18, 2019 7:06 am
by keiranhalcyon7
AALLLLMMOOSSTT TTHHEERREE....
flightscreen8.png
flightscreen9.png
flightscreen10.png
Alright, eight screenshots traversing 360 degrees of vertical FOV, with the first and the last almost but not fully overlapping. If 86.3 were correct, it should have been only (360/86.3 = 4.2) screenshots to go all the way around. With... let's call it 7.2 screenshots... 360/7.2 = 50 degrees per screen. So what's going on?

Code: Select all

atan(1080 / 1152) * 2 / pi * 180 = 86.3°
atan(1080 / 1152 / 2) * 2 / pi * 180 = 50.2°
Conclusion: XWA Hacker's FOV angles are bugged.

Re: New High-Res Hyperspace Effect

Posted: Sat Dec 21, 2019 2:14 am
by blue_max
OK, so I'm about to take a few days off; but I was able to finish release 1.0.10 with the new hyperspace effect. It now works in VR and I fixed a few bugs; but there may be a few more bugs. I also couldn't figure out what's the deal with the FOV, so I'll have to fix that later. In the meantime, here it is:

https://www.dropbox.com/s/2u3blv8ggf9e5 ... 0.zip?dl=0

I didn't get a chance to fix any of the previous issues with SSDO, so the only new thing here is the hyperspace effect. I'll go back to SSDO later :)

Re: New High-Res Hyperspace Effect

Posted: Sat Dec 21, 2019 6:11 am
by Rookie_One1
Small bug : if MSAA is enabled, then the cockpit disappear during the hyperspace sequence.

Also, have to ask : any way to keep the hud visible during the hyperspace sequence ? :)

Re: New High-Res Hyperspace Effect

Posted: Sat Dec 21, 2019 6:42 am
by blue_max
Thanks for reporting that bug, Rookie_One1, I'll take a look when I come back from vacations. I'm not sure what you mean by keeping the HUD visible, though. It should still be there; but if you've got the Dynamic Cockpit enabled, then the HUD will be displayed inside the cockpit for certain crafts.

Re: New High-Res Hyperspace Effect

Posted: Sat Dec 21, 2019 6:39 pm
by Rookie_One1
while playing with the settings (BTW the issue was present After I deactivated the dynamic cockpit) manage to make it visible.

Got no idea what the hell I did to make it appear

Re: New High-Res Hyperspace Effect

Posted: Sat Dec 21, 2019 11:19 pm
by Darksaber
For 1920x1080:

HUD scale:
value: 1080 / 600.0f = 1.8

FOV:
value: 1080 * 1.0666f + 0.5f = 1152
angle: atan(1080 / 1152) * 2 / pi * 180 = 86.3°
Image

Image

Image

The format I understand looks like this in the cfg file is like this
; This offset moves the center of the hyperspace effect along the y-axis. You should
; use this offset to align the center of the effect with the aiming HUD. Fix this
; number first.
; Larger numbers move the center of projection upwards.
;y_center = 0.32 ; 640x480 HUD scale 1.0
;y_center = 0.25 ; 800x600 HUD scale 1.0
;y_center = 0.2 ; 1024x768 HUD scale 1.28
;y_center = 0.18 ; 1154x864 HUD scale 1.44
y_center = 0.15 ; 1280x1024 HUD scale 1.80
;y_center = 0.13 ; 1600x1200 HUD scale 2.0

; This number is essentially a FOV and scales the effect. After setting the y_center
; properly, I suggest you enable mouse look and look to one edge of the screen. Then
; change this value until the center of the effect matches the crosshairs.
;FOV_scale = 2.125 ; 640x480, HUD scale 1.0
;FOV_scale = 2.125 ; 800x600, HUD scale 1.0
;FOV_scale = 2.125 ; 1280x768, HUD scale 1.28
;FOV_scale = 2.125 ; 1152x864, HUD scale 1.44
FOV_scale = 1.875 ; 1280x1024, HUD scale 1.8
;FOV_scale = 2.125 ; 1600x1200, HUD scale 2.0
Sorry but what is posted in the first quote is still like a foreign language to me :ops:

Another question for Blue Max, Do you add another line or edit one of the other lines if you want a different HUD or FOV in the cfg file

For instance
;y_center = 0.13 ; 1600x1200 HUD scale 2.0
;y_center = ?.?? ; 1920x1080 HUD scale ?.?

;FOV_scale = 2.125 ; 1600x1200, HUD scale 2.0
;FOV_scale = ?.??? ; 1920x1080, HUD scale ?.?

Re: New High-Res Hyperspace Effect

Posted: Sun Dec 22, 2019 2:26 am
by blue_max
I provided those lines as examples. All lines that begin with a semicolon are ignored. You can delete them and just leave one for simplicity

Re: New High-Res Hyperspace Effect

Posted: Sun Dec 22, 2019 12:54 pm
by JeremyaFr
Hello,

@Darksaber
Sorry, what I posted is related to XwaHacker, not DDraw dll.

For DDraw dll:
It seems that y_center is computed as follow:

Code: Select all

y_center = 152 / height
where height is the resolution height.

Code: Select all

width	height	y_center	HUD scale
640	480	0.32		0.80
800	600	0.25		1.00
1024	768	0.20		1.28
1154	864	0.18		1.44
1280	1024	0.15		1.71
1600	1200	0.13		2.00
1920	1080	0.14		1.80

Re: New High-Res Hyperspace Effect

Posted: Sun Dec 22, 2019 7:09 pm
by Darksaber
.
.
.
Image

Ok then, thank you Jeremy, sorry to be so thick lol

Ok I set the
y_center = 0.14 ; 1980x1080 HUD scale 1.80

FOV_scale = 2.125 ; 1920x1080, HUD scale 1.8

The New Huperspace effect looks centred with these figures??

It also looks remarkable, it's SO much better than the lowres dat images we have been so used to, so thanks to Blue_Max and Keiranhalcyon7 :)

Anyhow thank you to everyone, more people should test this and report back, it really does look incredible :)

Happy Winter Solstice and Yule Blessings, may the sun once again shine upon you.
.

Re: New High-Res Hyperspace Effect

Posted: Mon Dec 23, 2019 12:32 am
by Trevor
Jeremy, can you confirm that XWA holds FOV for res 1 at 0x0010 F432

Also, can you confirm that there is any fancy equation the game uses for FOV?

The reason I ask is that I seem to have found that it only reads the 1st byte and the biggest FOV is 90 when set to 0001.
if set to 0002 the FOV goes to 45 and if set to FFFF it goes to <1 (a star on the backdrop fills the screen)

Trev

Re: New High-Res Hyperspace Effect

Posted: Mon Dec 23, 2019 5:22 am
by keiranhalcyon7
Trevor wrote:
Mon Dec 23, 2019 12:32 am
Jeremy, can you confirm that XWA holds FOV for res 1 at 0x0010 F432
While I'm not Jeremy, I can confirm that yes, that's the correct address for the first slot.
Also, can you confirm that there is any fancy equation the game uses for FOV?
Yes, as I stated before,

Code: Select all

resolution_height/2/fov_var = tan(real_vertical_fov_radians/2)
The reason I ask is that I seem to have found that it only reads the 1st byte and the biggest FOV is 90 when set to 0001.
if set to 0002 the FOV goes to 45 and if set to FFFF it goes to <1 (a star on the backdrop fills the screen)

Trev
I assume those numbers are based on in-game experience (as opposed to "as reported by xwahacker"), and with the other default settings for the first resolution slot (640x480).

I think you haven't accounted for the little-endian byte order used in the x86 architecture (in short, the byte order you see in a hex editor must be reversed when interpreting the value):

0001 (0x0100) is 256d. 2*atan(480/2/256)*180/pi = 86.3°, close to 90.
0002 (0x0200) is 512d. 2*atan(480/2/512)*180/pi = 50.3°, close to 45. This is the value in the DSUCP2.6 exe, which I believe is the same as the TG value.
FFFF is 65535d. 2*atan(480/2/65535)*180/pi = 0.42°, in line with your result

Larger FOVs may be achieved with values like 8000 (0x0080, 128d), but these quickly start becoming nonsensical due to increasing distortion. Further, the next two bytes (0x0000) are also part of this variable (as I noted before, it's a 4-byte integer), and may be used to achieve even smaller FOVs.

Re: New High-Res Hyperspace Effect

Posted: Mon Dec 23, 2019 11:48 am
by Trevor
Thank you very much for that info and yes, I was forgetting byte order since I'm used to big-endian.

That all makes perfect sence now and yes those values match my ingame experience (I was trying to bypass XWAHacker because it wont allow higher FOV's than 120 and as discussed before its value is wrong and only half that of the real value and I wanted true 110 FOV for my HMD.

On the bright side, we have now confirmed your equation and XWAH is buggered as you say.

Trev

Re: New High-Res Hyperspace Effect

Posted: Mon Dec 23, 2019 4:37 pm
by JeremyaFr
Hello,

The FOV value for res 1 is situated at offset 0x10F432. Note that the value at offset 0x10F43C is related to the FOV value.

Code: Select all

value at offset 0x10F43C = value at offset 0x10F432 / 2

Code: Select all

:0x10F42C C7056CAB910000020000    mov dword ptr [0091AB6C], 00000200
:0x10F436 C705CC337B0000010000    mov dword ptr [007B33CC], 00000100

Re: New High-Res Hyperspace Effect

Posted: Tue Dec 24, 2019 7:55 pm
by Hullbreacher
this is going to sound...very dumb, I'm sure...

but I'm playing around with these files and doing another run-through of XWA and even with my rudimentary XWA hacking experience (it's like my 15th time playing this game with DSUCP, first time with ReShade), I don't understand how to actually implement this hyperspace effect into the game. Do I need to set up a particular hook to recognize the .cfg files? noob question.

Re: New High-Res Hyperspace Effect

Posted: Wed Dec 25, 2019 12:09 am
by blue_max
Hullbreacher: you just need to download & install the ddraw ZIP file I posted above. No need to fiddle with any settings (they just fine-tune and center the effect)

Re: New High-Res Hyperspace Effect

Posted: Thu Dec 26, 2019 7:30 pm
by Trevor
I would like to share the, as of 1.0.10, most correct settings for Oculus Rift

VRParams

Code: Select all

VR_Mode = SteamVR

;fill the whole view in 3d and 2d (where 2d is like looking at a cinema screen and 3d envelops you
3d_window_size = 3
3d_window_zoom_out_size = 2
; Set the following to 1 to start the HUD in zoomed-out mode:
zoomed_out_on_startup = 1

concourse_window_scale = 20.000

3d_aspect_ratio = 0.800
concourse_aspect_ratio = 1.334

;scale position to match screen scale (if doesn't match your movements are either too slow or too fast)
roll_multiplier = -1.000 ; oculus seems to be inverted
positional_x_multiplier = 3.000
positional_y_multiplier = 3.000
positional_z_multiplier = 3.000
steamvr.vrsettings (program files\steam\config\)

Code: Select all

   "steamvr" : {
      "ipdOffset" : 0.12,
this is the offset in meters from 0.063 default.
we multiply this by 3 to match the screen and position scales

xwingalliance.exe
using xwahacker set res1 to 640x720, Hud Scale 1.0 (don't worry, ddraw renders at desktop resolution, this only sets the "Aspect" ratio to match the oculus (960x1080))
then using a hex editor
at offset 10f432 set the first and second bytes to B4 00 (read as 0x00B4 (180) in little endian) This sets the FOV to 110. (its actually 122 which is derived from (3/2.7)*110 since fullscreen immersion requires a little extra room)


Start and enjoy full vr immersion with correct FOV and 3D feel

Trev

Re: New High-Res Hyperspace Effect

Posted: Mon Jan 06, 2020 3:47 pm
by Rookie_One1
@blue_max only thing I would change about the current effect is the shaking, AFAIK both in legends and canon, ships don't shake while in hyperspace.

Also, I wonder if it would be possible to also make it work when you are in the hangar of a capital ship that jump in hyperspace (yes, you can actually do that in a few battles in XWA, the most easiest one where you can do that is during the defection of Zaletta, as you can land on the liberty before it jump back and stay there until the jump to hyperspace is completed)

Re: New High-Res Hyperspace Effect

Posted: Mon Jan 06, 2020 8:21 pm
by Driftwood
Is there a way to define regions as space and atmospheric and call a different animation if one is transitioning between a space region and an atmospheric region, and atmospheric and atmospheric?

Re: New High-Res Hyperspace Effect

Posted: Mon Jan 06, 2020 9:32 pm
by blue_max
Rookie_One1 wrote:
Mon Jan 06, 2020 3:47 pm
@blue_max only thing I would change about the current effect is the shaking, AFAIK both in legends and canon, ships don't shake while in hyperspace.
I think I saw the ships shake in Solo and Rogue 1; but you can disable cockpit shake in hyperspace.cfg, just set "shake_speed = 0". That should stop all the shaking.
Also, I wonder if it would be possible to also make it work when you are in the hangar of a capital ship that jump in hyperspace
I didn't know this was possible; but I think it should work right now? I'm looking at XWA's heap in the PlayerData table and there's one flag in there that says what hyperspace phase the game is currently displaying. In other words, if the game is already displaying the hyperspace animation inside a hangar, then the new effect should also show.

@Driftwood: Yes, this is possible. I can catch the name of the Skydome from the OPT name and present a different animation (if there is no "Skydome" OPT, then I can default to the regular hyperspace animation); but is there a way to tell when the game is transitioning from the atmosphere into space (or viceversa?)

Re: New High-Res Hyperspace Effect

Posted: Mon Jan 06, 2020 9:37 pm
by Rookie_One1
it's not showing the hyperspace animation, you just get a small prompt over the CMD saying that the ship where you are landed is in hyperspace, hence why i'm wondering because it means that your patch will probably not apply as it is

For the shake, I already did that :p and i'm mostly sure that hyperspace don'T make the ship shake from nearly all source....until maybe the ship have a problem with it's compensators or it's hyperdrive ? (at least most sources that I managed to find, the ship don't shake during transit and in the original trilogy, only time passengers actually felt something, was the acceleration after R2 reactivated the hyperdrive at the end of ESB)