New High-Res Hyperspace Effect

Want to edit the game, build your own craft and missions? Here you'll find help, tools, guides and people to discuss with.
Post Reply

Re: New High-Res Hyperspace Effect

User avatar
ual002
XWAU Member
Posts: 983
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Mon Jan 06, 2020 10:19 pm

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.
Image Image Image Image Image

User avatar
blue_max
XWAU Member
Posts: 2295
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » 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.

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 )

User avatar
ual002
XWAU Member
Posts: 983
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Mon Jan 06, 2020 10:48 pm

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"
Image Image Image Image Image

User avatar
Rookie_One1
Rebel Alliance
Posts: 1656
Joined: Thu Feb 26, 2004 12:01 am

Post by Rookie_One1 » Mon Jan 06, 2020 11:59 pm

He'll probably show up tomorrow, he is living in france AFAIK
Rookie One, is that you?? - Ru Merleen, Rebel Spy at Imdaar Alpha
Current Holder of the Frying Pan of Death

User avatar
keiranhalcyon7
Lieutenant JG
Posts: 599
Joined: Tue Jan 02, 2018 6:41 am

Post by keiranhalcyon7 » Tue Jan 07, 2020 12:08 am

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.

User avatar
Trevor
Lieutenant JG
Posts: 541
Joined: Thu Dec 04, 2014 7:11 pm

Post by Trevor » Tue Jan 07, 2020 1:08 am

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

User avatar
ual002
XWAU Member
Posts: 983
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Tue Jan 07, 2020 2:16 am

There is a message, however its consistency is subject to more scrutiny.
Image Image Image Image Image

User avatar
ual002
XWAU Member
Posts: 983
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Tue Jan 07, 2020 2:43 am

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.
Image Image Image Image Image

User avatar
blue_max
XWAU Member
Posts: 2295
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Tue Jan 07, 2020 5:17 am

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.

User avatar
JeremyaFr
XWAU Member
Posts: 3921
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Tue Jan 07, 2020 2:17 pm

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.

User avatar
Rookie_One1
Rebel Alliance
Posts: 1656
Joined: Thu Feb 26, 2004 12:01 am

Post by Rookie_One1 » Tue Jan 07, 2020 2:22 pm

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
Rookie One, is that you?? - Ru Merleen, Rebel Spy at Imdaar Alpha
Current Holder of the Frying Pan of Death

User avatar
JeremyaFr
XWAU Member
Posts: 3921
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Tue Jan 07, 2020 3:01 pm

It will be needed to add a setting in the ini file to orient the animation based on the model index.

User avatar
blue_max
XWAU Member
Posts: 2295
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Tue Jan 07, 2020 6:38 pm

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?

User avatar
ual002
XWAU Member
Posts: 983
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Tue Jan 07, 2020 6:48 pm

I can make a mission for you later today if someone doesn't beat me to it, but it will be a while.
Image Image Image Image Image

User avatar
JeremyaFr
XWAU Member
Posts: 3921
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Tue Jan 07, 2020 6:58 pm

I test that with the first mission of the Battle of Endor. Immediately going in the hangar at the start of the mission.

User avatar
Rookie_One1
Rebel Alliance
Posts: 1656
Joined: Thu Feb 26, 2004 12:01 am

Post by Rookie_One1 » 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
Rookie One, is that you?? - Ru Merleen, Rebel Spy at Imdaar Alpha
Current Holder of the Frying Pan of Death

User avatar
blue_max
XWAU Member
Posts: 2295
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Tue Jan 07, 2020 7:17 pm

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?

User avatar
Rookie_One1
Rebel Alliance
Posts: 1656
Joined: Thu Feb 26, 2004 12:01 am

Post by Rookie_One1 » Tue Jan 07, 2020 7:20 pm

Battle 3 Mission 6
Rookie One, is that you?? - Ru Merleen, Rebel Spy at Imdaar Alpha
Current Holder of the Frying Pan of Death

User avatar
Rookie_One1
Rebel Alliance
Posts: 1656
Joined: Thu Feb 26, 2004 12:01 am

Post by Rookie_One1 » 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.

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)
Rookie One, is that you?? - Ru Merleen, Rebel Spy at Imdaar Alpha
Current Holder of the Frying Pan of Death

User avatar
blue_max
XWAU Member
Posts: 2295
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Sun Jan 12, 2020 4:28 am

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.

User avatar
Rookie_One1
Rebel Alliance
Posts: 1656
Joined: Thu Feb 26, 2004 12:01 am

Post by Rookie_One1 » Sun Jan 12, 2020 10:00 pm

Noprob and thanks :)
Rookie One, is that you?? - Ru Merleen, Rebel Spy at Imdaar Alpha
Current Holder of the Frying Pan of Death

User avatar
Rookie_One1
Rebel Alliance
Posts: 1656
Joined: Thu Feb 26, 2004 12:01 am

Post by Rookie_One1 » Mon Jan 13, 2020 11:40 pm

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
Rookie One, is that you?? - Ru Merleen, Rebel Spy at Imdaar Alpha
Current Holder of the Frying Pan of Death

boner
Cadet 4th Class
Posts: 15
Joined: Sat May 14, 2011 8:20 pm

Post by boner » Wed Jan 29, 2020 3:13 am

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?

boner
Cadet 4th Class
Posts: 15
Joined: Sat May 14, 2011 8:20 pm

Post by boner » Wed Jan 29, 2020 3:45 am

here is the video https://youtu.be/gLTVmlG1V0Y

kind regards

User avatar
blue_max
XWAU Member
Posts: 2295
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Wed Jan 29, 2020 5:38 am

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.

Post Reply