Page 5 of 7

Re: New High-Res Hyperspace Effect

Posted: Mon Jan 06, 2020 10:19 pm
by ual002
I was just wondering this about the hyperspace tunnel while in the hangar, but beyond getting it to work it would mean probably some more work to make sure that each specific model hangar was oriented correctly. I seem to remember it working with the vanilla game waaaaay back but since then I have never seen it work in the custom missions I make with DSUCP. As far at the orientation of the tunnel vs the hangar, that could either be a positional thing with the opt or a flat out brand new coding element Jeremy would need to invent/discover.

Re: New High-Res Hyperspace Effect

Posted: Mon Jan 06, 2020 10:32 pm
by blue_max
I *suspect* that all hangars were modeled along the major X-Y-Z axes and that the game probably won't bother changing this orientation once the ship has landed. Every time I've looked at the starfield while parked in the hangar, I see the "horizon" in the same place. This means that I can just orient the hyperspace tunnel along one of the major axes and be done with it.

However, if no animation plays back while parked in the hangar, then maybe the new effect won't show up either. If that's the case, I'm not sure there's much that can be done about that at the moment... (This is usually the cue for Jeremy to chime in saying he's discovered a way to fix that :D )

Re: New High-Res Hyperspace Effect

Posted: Mon Jan 06, 2020 10:48 pm
by ual002
blue_max wrote:
Mon Jan 06, 2020 10:32 pm
(This is usually the cue for Jeremy to chime in saying he's discovered a way to fix that :D )
This is where we hold our breath for like 10 minutes and he shows up with "Try this offset. xxx"

Re: New High-Res Hyperspace Effect

Posted: Mon Jan 06, 2020 11:59 pm
by Rookie_One1
He'll probably show up tomorrow, he is living in france AFAIK

Re: New High-Res Hyperspace Effect

Posted: Tue Jan 07, 2020 12:08 am
by keiranhalcyon7
blue_max wrote:
Mon Jan 06, 2020 10:32 pm
I *suspect* that all hangars were modeled along the major X-Y-Z axes and that the game probably won't bother changing this orientation once the ship has landed. Every time I've looked at the starfield while parked in the hangar, I see the "horizon" in the same place. This means that I can just orient the hyperspace tunnel along one of the major axes and be done with it.
I think, for it to be totally correct, there would need to be a "forward vector" field added to the hangar.ini. Besides the port and starboard sides, I can name ships with both forward (gozanti, ISD) and backward (hammerhead cruiser, featured in the RebCP campaign) oriented hangars.

Re: New High-Res Hyperspace Effect

Posted: Tue Jan 07, 2020 1:08 am
by Trevor
If the animation doesn't play, but instead you get a message in the message window, perhaps this message could be trapped and used as a prompt to play the animation following the suggestion above of a forward vector.

It would be pretty darn awsome to be in the hangar when the ship jumps and see the outside turn hyper. The next bug that will happen eventually with that scenario is the shuttle launching during hyper or the player launching during hyper...
player input of space or enter could be blocked during animation, but how do you prevemt the shuttle launch?

Trev

Re: New High-Res Hyperspace Effect

Posted: Tue Jan 07, 2020 2:16 am
by ual002
There is a message, however its consistency is subject to more scrutiny.

Re: New High-Res Hyperspace Effect

Posted: Tue Jan 07, 2020 2:43 am
by ual002
I finally just tested this, and got a second fresh laugh at Darksaber's responses because I too was trying to find the settings for 1920 x 1080 and could not speak your coder maths language.

I am assuming Track IR headlook is not yet implemented? I also need to figure out how to turn the tunnel bloom down. (Found that)

Just now realizing that dropping the contents of the folder in didn't actually work. I'm seeing default tunnel. (Starting wrong install, NM)

FINAL EDIT: OK Hyper effect looks astonishing however the overwrite somehow borked my track IR from functioning. I set the tracker_type = TrackIR, and I can see right as the game boots I get the blue light on the camera indicating compatibility for a fraction of a second then goes out.

Re: New High-Res Hyperspace Effect

Posted: Tue Jan 07, 2020 5:17 am
by blue_max
Sorry for the trouble, ual002 -- I still have to go back to this effect and make it easier to configure. I didn't touch the TrackIR code in ddraw VR version 1.0.10, so if you're having trouble in that area I suggest you check TrackIR separately. The last stable release of the cockpit look hook is this:

https://www.dropbox.com/s/od8djqq04x8ms ... 7.zip?dl=0

I can also send you standalone binaries to test TrackIR separately. Feel free to reach out through Discord.

Re: New High-Res Hyperspace Effect

Posted: Tue Jan 07, 2020 2:17 pm
by JeremyaFr
Hello,

You can get the hangar object index via this variable:

Code: Select all

// V0x009C6E38
dword& s_V0x09C6E38 = *(dword*)0x009C6E38;
When the value is different of 0xFFFF, the player craft is in a hangar.
With that index, you can get the object, mobile object and craft structs. From that, you can get the orientation of the mothership.
You can get the hyperspace phase with the craft state offset (00B).

Code: Select all

                    Ptr<XwaCraft> ebp = s_XwaObjects[s_V0x09C6E38].pMobileObject->pCraft;

                    XwaGetCraftIndex( s_XwaObjects[s_V0x09C6E38].ModelIndex );

                    strcpy_s( esp18, "" );

                    if( ebp->XwaCraft_m00B == 0x05 )
                    {
                        // "%s %s"
                        sprintf( esp18, "%s %s", s_XwaTieFlightGroups[s_XwaObjects[s_V0x09C6E38].TieFlightGroupIndex].FlightGroup.Name, s_StringsHangarAdditional[StringsHangarAdditional_ENTERING_HYPERSPACE] );
                    }
                    else if( ebp->XwaCraft_m00B == 0x06 )
                    {
                        // "%s %s"
                        sprintf( esp18, "%s %s", s_XwaTieFlightGroups[s_XwaObjects[s_V0x09C6E38].TieFlightGroupIndex].FlightGroup.Name, s_StringsHangarAdditional[StringsHangarAdditional_LEAVING_HYPERSPACE] );
                    }
                    else if( ebp->XwaCraft_m00B == 0x07 )
                    {
                        // "%s %s"
                        sprintf( esp18, "%s %s", s_XwaTieFlightGroups[s_XwaObjects[s_V0x09C6E38].TieFlightGroupIndex].FlightGroup.Name, s_StringsHangarAdditional[StringsHangarAdditional_IN_HYPERSPACE] );
                    }

I think that you can then draw a custom hyperspace background while the mothership is in hyperspace with the player craft in the hangar.

Re: New High-Res Hyperspace Effect

Posted: Tue Jan 07, 2020 2:22 pm
by Rookie_One1
And we can customize it according to the hangar ? (the front of the hangar model on a ISD point toward the front of the ship, while on a MC80 is point toward the side of the ship)

Now, if we can pull this off, it will be epic

Re: New High-Res Hyperspace Effect

Posted: Tue Jan 07, 2020 3:01 pm
by JeremyaFr
It will be needed to add a setting in the ini file to orient the animation based on the model index.

Re: New High-Res Hyperspace Effect

Posted: Tue Jan 07, 2020 6:38 pm
by blue_max
Thank you Jeremy! So, what mission was this again? Can someone upload a recording so I can play it back inside XWA and take a look?

Re: New High-Res Hyperspace Effect

Posted: Tue Jan 07, 2020 6:48 pm
by ual002
I can make a mission for you later today if someone doesn't beat me to it, but it will be a while.

Re: New High-Res Hyperspace Effect

Posted: Tue Jan 07, 2020 6:58 pm
by JeremyaFr
I test that with the first mission of the Battle of Endor. Immediately going in the hangar at the start of the mission.

Re: New High-Res Hyperspace Effect

Posted: Tue Jan 07, 2020 7:09 pm
by Rookie_One1
Easiest one is the one where Zaletta Defect, just get in the Liberty hangar before it jump out after destroying the interdictor

Re: New High-Res Hyperspace Effect

Posted: Tue Jan 07, 2020 7:17 pm
by blue_max
Rookie_One1 wrote:
Tue Jan 07, 2020 7:09 pm
Easiest one is the one where Zaletta Defect, just get in the Liberty hangar before it jump out after destroying the interdictor
Do you remember what battle and mission this would be?

Re: New High-Res Hyperspace Effect

Posted: Tue Jan 07, 2020 7:20 pm
by Rookie_One1
Battle 3 Mission 6

Re: New High-Res Hyperspace Effect

Posted: Sat Jan 11, 2020 12:54 pm
by Rookie_One1
Small bug I have to report : you can see glimpse of the space you hypered in from at the end of the animation, before it switch to the zone where you are hypering out to.

Easiest way to see it is to hyper out with a background object such as a planet in view. during the animation where you get out of hyperspace, you'll catch glimpse of the object for half a second it switch to the new region (which means that the region change is not done during the animation, but at the end of it)

Re: New High-Res Hyperspace Effect

Posted: Sun Jan 12, 2020 4:28 am
by blue_max
Rookie_One1 wrote:
Sat Jan 11, 2020 12:54 pm
Small bug I have to report : you can see glimpse of the space you hypered in from at the end of the animation, before it switch to the zone where you are hypering out to.
Huh, I thought I had fixed that. Yes, I know what you're talking about. Thanks for reporting this, I'll fix it.

Re: New High-Res Hyperspace Effect

Posted: Sun Jan 12, 2020 10:00 pm
by Rookie_One1
Noprob and thanks :)

Re: New High-Res Hyperspace Effect

Posted: Mon Jan 13, 2020 11:40 pm
by Rookie_One1
double post for the good cause :

Did some testing, it seems that the 1.0.10 version of your ddraw is in fault, when I switched back to the one in the hyperspace preview zip, it was working correctly

Re: New High-Res Hyperspace Effect

Posted: Wed Jan 29, 2020 3:13 am
by boner
Hi, can it Works on 3440x1440 21:9 aspect ratio? because with default hyper space i can see a flashing square on the center, you know what i mean? i can make a video.

kind regards?

Re: New High-Res Hyperspace Effect

Posted: Wed Jan 29, 2020 3:45 am
by boner
here is the video https://youtu.be/gLTVmlG1V0Y

kind regards

Re: New High-Res Hyperspace Effect

Posted: Wed Jan 29, 2020 5:38 am
by blue_max
boner wrote:
Wed Jan 29, 2020 3:45 am
here is the video https://youtu.be/gLTVmlG1V0Y
Yeah, that's happening because the default hyperspace effect is actually a movie so it's probably fixed at 4:3 aspect ratio.

The new hyperspace effect from this thread should work at your resolution -- it should even allow you to look around the cockpit.