32-bit mode hook

A Forum dedicated to the Suggestion, Creation and Editing of XWA Dynamic Link Library Files

Moderator: JeremyaFr

32-bit mode hook

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

Post by JeremyaFr » Thu Jul 18, 2019 6:20 pm

This hook enables 32-bit mode.
8-bit OPTs are converted to 32 bits and the game can load 32-bit OPTs.
The game can load 32-bit DAT images. Existing DAT images are converted to 32 bits.

Download link
xwa_hook_32bpp.zip

Known issues:
- The models can appear too dark or too bright.

Before installing, I recommend that you check that you have the latest version of the hooks. The easy way is to use XwaHooksSetup.
I also recommend that you use an updated ddraw.dll that include the commit to reduce memory usage (mine has version v1.3.7). Else the game may run out of memory and crashes in kernelbase.dll.

Justagai
Cadet 1st Class
Posts: 218
Joined: Mon Dec 08, 2014 10:59 pm

Post by Justagai » Thu Jul 18, 2019 11:09 pm

Awesome job Jeremy!

Bman
Lieutenant Commander
Posts: 1167
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Fri Jul 19, 2019 1:09 am

Great job. Will test. Maybe the Reshade topic guys can counter this issue. Illumination problem?
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

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

Post by ual002 » Fri Jul 19, 2019 3:33 am

Will test and report. Awesome job!
Image Image Image Image Image

User avatar
Darksaber
Vice Admiral
Posts: 10931
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Fri Jul 19, 2019 6:07 am

With this hook the planet backgrounds look wonderful, but there is a big problem Illuminations seems to have disappeared
Image1.jpg
Image2.jpg
The floor of the Hangar is illuminated within game, but all the other textures in the hangar have had illumination applied to the opt, but are no longer illuminated, the only thing on the shuttle that should be illuminated are the engines.

There are some of use that don't like the Reshade thing, plus no amount of tweaking Reshade isn't going to sort this problem out.
You do not have the required permissions to view the files attached to this post.
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

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

Post by JeremyaFr » Fri Jul 19, 2019 4:14 pm

UPDATE
I've updated the hook.

xwa_hook_32bpp_1.jpg

It seems that the textures that are illuminated and the textures that are not illuminated are inversed.
You do not have the required permissions to view the files attached to this post.

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

Post by ual002 » Fri Jul 19, 2019 5:23 pm

That seems like a definite improvement.
Image Image Image Image Image

User avatar
DarHan
Rebel Alliance
Posts: 325
Joined: Mon Dec 05, 2005 12:01 am
Contact:

Post by DarHan » Fri Jul 19, 2019 5:39 pm

Here’s what it looks like on my setup with the current version. All models are 8bpp.
Image
“Red Four, nothing’s gone wrong yet.”
— Hobbie Klivian

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

Post by JeremyaFr » Fri Jul 19, 2019 8:10 pm

UPDATE
xwa_hook_32bpp_2.jpg
xwa_hook_32bpp_3.jpg
You do not have the required permissions to view the files attached to this post.

User avatar
Darksaber
Vice Admiral
Posts: 10931
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Fri Jul 19, 2019 8:23 pm

Excellent work :) It's perfect :)
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

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

Post by blue_max » Fri Jul 19, 2019 9:29 pm

The second-to-last image looks much better; but why is the last image so red? Is that what you expected?

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

Post by ual002 » Fri Jul 19, 2019 9:39 pm

Its the alarm for when your mothership is taking damage.
Image Image Image Image Image

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

Post by blue_max » Fri Jul 19, 2019 10:45 pm

ual002 wrote:
Fri Jul 19, 2019 9:39 pm
Its the alarm for when your mothership is taking damage.
Oh OK, nevermind then. Carry on! :P

Bman
Lieutenant Commander
Posts: 1167
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Fri Jul 19, 2019 11:07 pm

Well done Jeremy. This is awesome!

Yes, when mothership has it's shields down or it's hull is at certain percentage, don't recall which triggers, the alarm effect goes off. I suppose you could change the hangar's FG texture to red lights for the ceiling and so forth to match when the mission is designed to start out that way. But it probably wouldn't work dynamically during an actual mission. Say when the mothership is normal and then later takes on severe damage later on during the mission and you're back in hangar to reload torpedoes.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

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

Post by JeremyaFr » Sat Jul 20, 2019 8:23 am

You can see the red effect in Battle 2, Mission 5: Defend CRS Liberty (1B2M5G.tie).

User avatar
Darksaber
Vice Admiral
Posts: 10931
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Sat Jul 20, 2019 8:59 am

If the hargars aren't illuminated they look far too dark, but the drawback to this is when the Red alarm is in effect the rest of the hangar doesn't red I can't understand why TG made it so the floor of the hangar is permanently illuminated but they didn't do so for the rest of the hangar, but saying that the floor does have to be at a specific level for it to be highlighted, if the floor is above or below this level, it will not highlight and the shadows of the craft and object do not appear.

You can see the highlighted floor here is this image, it's not illuminated.
Image2.jpg
But this is how the hangar would look like if the walls and other textures where not illuminated, to be it look awful and would sooner see it lit up, but like I said the drawback is the Red Alarm :(
You do not have the required permissions to view the files attached to this post.
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

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

Post by JeremyaFr » Sat Jul 20, 2019 1:22 pm

UPDATE

The hook now reads the brightness setting.

Level 0:
xwa_hook_32bpp_4_level0.jpg

Level 4:
xwa_hook_32bpp_5_level4.jpg
You do not have the required permissions to view the files attached to this post.

User avatar
Darksaber
Vice Admiral
Posts: 10931
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Sat Jul 20, 2019 2:09 pm

Just tested it, Wow that look much better :D
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

Bman
Lieutenant Commander
Posts: 1167
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Sat Jul 20, 2019 2:24 pm

Very nice, thanks. Yep DS, that's what I meant to say. Didn't understand why they didn't light up ceiling either. Maybe it's the normals of the ceiling mesh and probably the red light source is shining from above the hangar mesh. Maybe if the engine could be patched so the source of light can also shine from below the floor up . . . ?
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

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

Post by JeremyaFr » Sat Jul 20, 2019 3:23 pm

Yes, the lights are based on the normals.

I succeeded to apply the red light to the white parts of the textures.
xwa_hook_32bpp_6_diffuse.jpg
You do not have the required permissions to view the files attached to this post.

User avatar
Darksaber
Vice Admiral
Posts: 10931
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Sat Jul 20, 2019 3:29 pm

This just get better and better :)
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

User avatar
DarHan
Rebel Alliance
Posts: 325
Joined: Mon Dec 05, 2005 12:01 am
Contact:

Post by DarHan » Sat Jul 20, 2019 4:11 pm

I just wanted to report, the departure hangar looks great with that latest version, but the “mission failed” hangar seems to still have the problem where texture illumination is inverted.
“Red Four, nothing’s gone wrong yet.”
— Hobbie Klivian

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

Post by ual002 » Sat Jul 20, 2019 5:53 pm

So far all the ships I've been testing seem to have better color resolution as expected. Very well done sir.
Image Image Image Image Image

User avatar
Darksaber
Vice Admiral
Posts: 10931
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Sat Jul 20, 2019 7:02 pm

The lighting in the hangar looks great, but looking at other craft or in this case stations in game, just looking through the missions this is the first prologue mission with the Azzameen Base

This is how it look like before and after the 32 bbp hook is installed
flightscreen6.jpg
flightscreen7.jpg
flightscreen8.jpg
flightscreen9.jpg
Without the hook the lighting was never great, but you can see the structural layers of the station but after the hook has been applied the station looks flat, there is no definition to the structure anymore there is no longer any, I suppose you call it ambient lighting

Don't get me wrong the Hangar now looks fabulous, the lighting on the shuttle looks great, it pissed me off for years that the shuttle wings where always darker than they should be, but the station now look wrong :(
You do not have the required permissions to view the files attached to this post.
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

Bman
Lieutenant Commander
Posts: 1167
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Sat Jul 20, 2019 7:41 pm

DS, does any adjustments via the game's video menu settings help with shadowing? I'm going to test with ReShade to see if there is any improvement with the models.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

Post Reply