Hook_D3d.dll Bug Report

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

Moderator: JeremyaFr

Re: Hook_D3d.dll Bug Report

Ronin65
Cadet 3rd Class
Posts: 48
Joined: Thu Jul 02, 2020 1:00 pm

Post by Ronin65 » Mon Sep 21, 2020 6:18 pm

Your lucky then!

This happen with both the Default Rebel Hangar (Pilot proving ground Hangar) and the Liberty Hangar, the double side version

The Default Hangar has a few changes to it from the vanilla hangar with the XWAUCPv1.6 and Calamari Hangar Installer they have a few added workstands a added Bwing and YT1300, so I set the Default hangar up as the vanilla hangar using Jeremy's HangarMap.txt

Code: Select all

;ModelIndex_314_HangarMonitor
314, -1059, 1313, 0x7FFFFFFF, 38600, 0

;ModelIndex_309_HangarCrane
309, 725, -416, 0x7FFFFFFF, 23500, 0

;ModelIndex_313_HangarGenerator
313, -1352, 1440, 0x7FFFFFFF, 536, 0

;ModelIndex_315_HangarWorkStand
315, -1065, -56, 0x7FFFFFFF, 47736, 0

;ModelIndex_315_HangarWorkStand
315, 2079, 733, 0x7FFFFFFF, 6400, 0

;ModelIndex_315_HangarWorkStand
315, -2488, 1215, 0x7FFFFFFF, 11864, 0

;ModelIndex_310_HangarCrate
310, 794, -750, -848, 6800, 12500

;ModelIndex_310_HangarCrate
310, -803, -1464, 0x7FFFFFFF, 49200, 0

;ModelIndex_310_HangarCrate
310, -1563, 944, 0x7FFFFFFF, 51436, 0

;ModelIndex_083_ContainerBox
83, -506, -2136, -722, 32836, 16480

;ModelIndex_083_ContainerBox
83, -841, -1628, 0x7FFFFFFF, 53100, 0

;ModelIndex_083_ContainerBox
83, 1240, -2098, -722, 272, 16480

;ModelIndex_084_ContainerSphere
84, -834, -2034, 0x7FFFFFFF, 32336, 0

;ModelIndex_080_CargoCanister
80, -3474, -275, 0x7FFFFFFF, 29436, 0

;ModelIndex_002_Ywing
2, -1038, -798, 0x7FFFFFFF, 7700, 0

;ModelIndex_050_Shuttle
50, 1146, -1288, -741, 50536, 0

;ModelIndex_315_HangarWorkStand
315, 820, -665, 0x7FFFFFFF, 49136, 0

;ModelIndex_310_HangarCrate
310, -873, -1456, -849, 60472, 20400

;ModelIndex_310_HangarCrate
310, -3095, -592, 0x7FFFFFFF, 51436, 0

;ModelIndex_083_ContainerBox
83, -1751, -1996, 0x7FFFFFFF, 31172, 0

;ModelIndex_083_ContainerBox
83, 979, -2103, 0x7FFFFFFF, 37036, 0

;ModelIndex_084_ContainerSphere
84, -1374, -2068, 0x7FFFFFFF, 40536, 0

;ModelIndex_080_CargoCanister
80, 2806, 1357, 0x7FFFFFFF, 20536, 0

;ModelIndex_080_CargoCanister
80, -195, -1910, 0x7FFFFFFF, 54372, 0

;ModelIndex_003_Awing
3, 2178, 506, -830, 40036, 1500

;ModelIndex_002_Ywing
2, 1100, -503, 0x7FFFFFFF, 49036, 0

;ModelIndex_001_Xwing
1, -1003, 280, -825, 16600, 0
Still no difference using the the WIP D3D hook or the code, still loosing shadows and transparent meshes!

Could you actually explain what the D3D hook actually does, Let me just say I don't use the effects so I don't see what the benefit of this Hook does, only that with it installed and enabled it makes shadows and transparent meshes disappear and the lighting looses it's illumination.

If this hook enables something within the effects shouldn't it just be included with the effect and NOT the standard Hook setup?

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

Post by blue_max » Mon Sep 21, 2020 6:39 pm

hook_d3d.dll is not related to the effects. Jeremy wrote that hook and you need a relatively recent ddraw from Jeremy to be able use it.

Before this hook, XWA would send several Vertex and Index buffers down to ddraw in a single frame. With this hook, all the Vertex and Index buffers are coalesced into a single large buffer that is sent once to ddraw and then it's all rendered in one go.

In other words, this hook improves the performance of the game, but it changes how the 3D data is processed, so it needs some updates to ddraw.

Ronin65: I wasn't aware that this hook had changed recently, so I probably need to update my ddraw. I already posted a fix for the shadows, but if you don't like the effects, then just use Jeremy's ddraw in the meantime.

Ronin65
Cadet 3rd Class
Posts: 48
Joined: Thu Jul 02, 2020 1:00 pm

Post by Ronin65 » Mon Sep 21, 2020 7:07 pm

I should have said I'm using all the latest hooks and Jeremy's latest DDraw 1.3.11.0

I have nothing against your effects, I just don't wish to use them or the dynamic cockpits, I prefer my game and cockpits to look as the original authors made them. Some not all of your effect I wish you could use without having all the shadow stuff being enabled sorry but with all the lighting and shadow stuff it looks like an overly saturated ‎J. J. Abrams‎ Star trek Film

It would be ideal it you could just have the hyperpace effect and sun effects separate from any of the other bits, bobs and gizmos

I digress

The D3D hook might improve performance, but with the disappearing shadows and other stuff I'd sooner have it fixed or just disable and delete the hook

Also your fix for the shadows wasn't if for the lightness and/or transparency of the shadows with your effects installed, the fix doesn't fix the sporadic disappearing shadows, lighting and transparent meshes, which at least 3 of us, Ace, DTM and myself are experiencing.

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

Post by DarHan » Mon Sep 21, 2020 8:39 pm

Ronin65 wrote:
Mon Sep 21, 2020 7:07 pm
It would be ideal it you could just have the hyperpace effect and sun effects separate from any of the other bits, bobs and gizmos
That is already possible and has always been. They’re all separate settings in the config files.
“Red Four, nothing’s gone wrong yet.”
— Hobbie Klivian

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

Post by JeremyaFr » Mon Sep 21, 2020 8:43 pm

OK, I'm able to reproduce the issue.

It seems to be related to the count of different crafts in the HangarMap section.

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

Post by blue_max » Mon Sep 21, 2020 9:04 pm

Ronin65 wrote:
Mon Sep 21, 2020 7:07 pm
Also your fix for the shadows wasn't if for the lightness and/or transparency of the shadows with your effects installed, the fix doesn't fix the sporadic disappearing shadows, lighting and transparent meshes, which at least 3 of us, Ace, DTM and myself are experiencing.
Yes, I'm aware of that, but I need to reproduce the problem first before I can attempt a fix ;)

I understand and respect your point of view. I think what you're asking is achievable (just have the Suns and Hyperspace effect). Like DarHan said, it's a matter of tinkering with the config files. If you're interested, I can prepare a set of config files just for that.
JeremyaFr wrote:
Mon Sep 21, 2020 8:43 pm
It seems to be related to the count of different crafts in the HangarMap section.
If you can, Jeremy, could you post more details on how to reproduce the issue?

Ronin65
Cadet 3rd Class
Posts: 48
Joined: Thu Jul 02, 2020 1:00 pm

Post by Ronin65 » Mon Sep 21, 2020 9:37 pm

JeremyaFr wrote:
Mon Sep 21, 2020 8:43 pm
OK, I'm able to reproduce the issue.

It seems to be related to the count of different crafts in the HangarMap section.
Even with the default craft count, that is in your HangarMap.txt?
blue_max wrote:
Mon Sep 21, 2020 9:04 pm

I understand and respect your point of view. I think what you're asking is achievable (just have the Suns and Hyperspace effect). Like DarHan said, it's a matter of tinkering with the config files. If you're interested, I can prepare a set of config files just for that.
Yes that would be great, just looking at the installer options

Bloom Effect = Don't want it (which already looks like you don't have to install)
Shading Type = Don't want (again which already looks like you don't have to install)
Cockpit Shadows = Don't need
Dynamic Laser lights = Yes I'll use that
Procedural Suns with flares = Yes I want that
Dynamic Cockpit = NO thanks
Active Cockpit = No point
Wireframe on MFD = Not needed
Cockpit interia = No thanks

I don't want that craft looking like polystyrene so disable the *.mat file stuff as it's not required, like I said just the Hyperspace, the Suns with flares and the laser lights please

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

Post by blue_max » Mon Sep 21, 2020 10:14 pm

Ronin65 wrote:
Mon Sep 21, 2020 9:37 pm
Yes that would be great, just looking at the installer options... I don't want that craft looking like polystyrene so disable the *.mat file stuff as it's not required, like I said just the Hyperspace, the Suns with flares and the laser lights please
What you're requesting sounds doable, and don't worry, no styrofoam looks, LOL (this point keeps popping up for some reason!)

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

Post by JeremyaFr » Tue Sep 22, 2020 7:29 pm

Hello,
The issue seems to happen with the shadows when there are more than 65535 triangles.
I will fix it.

Ronin65
Cadet 3rd Class
Posts: 48
Joined: Thu Jul 02, 2020 1:00 pm

Post by Ronin65 » Tue Sep 22, 2020 7:40 pm

Thank you JeremyaFr, I look forward to testing it :)

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

Post by JeremyaFr » Tue Sep 22, 2020 7:48 pm

WIP

Here is a fix:

EDIT: link removed

Ronin65
Cadet 3rd Class
Posts: 48
Joined: Thu Jul 02, 2020 1:00 pm

Post by Ronin65 » Tue Sep 22, 2020 8:03 pm

Ok it looks like that has fixed the problem, nothing disappeared, thanks for fixing it, really well done.

Took a little while for you to believe us, but I'll forgive you lol :D finally I don't have to delete or disable it anymore :D

Just need a few more confirmations from the others :D

I should say I tested with the default configuration and the CalamariHangar configuration with added Bwing, YT1300 and added workstands both looked fine now :)

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

Post by Trevor » Tue Sep 22, 2020 8:23 pm

Thanks Jeremy it works

User avatar
Ace Antilles
Admiral (Moderator)
Posts: 7829
Joined: Sat Jan 22, 2000 12:01 am
Contact:

Post by Ace Antilles » Wed Sep 23, 2020 12:02 am

JeremyaFr wrote:
Tue Sep 22, 2020 7:48 pm
WIP
Here is a fix:
Thanks Jeremy. This fixes the issue with Effects enabled too.
Was getting annoying. Thanks for tracking it down.
Chief XWAU Team annoying nitpicker.
Ace Antilles - The X-Wing Outpost
Image

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

Post by JeremyaFr » Wed Sep 23, 2020 1:23 pm

UPDATE
Hello,
I've merged the WIP version into the stable version.

You can see the changes in this commit:
hook_d3d: fix count in triangle operation

Post Reply