A New Shading Model

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

Re: A New Shading Model

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

Post by Darksaber » Sat Mar 07, 2020 3:58 am

General_Trageton wrote:
Fri Mar 06, 2020 11:59 pm
I actually did use xwa hook setup to update them ....

Edit: Ran XWA Hook Setup again and the result is the same.

I'll take some time tomorrow and see that I get a clean install set up.
GT Are you deleting both the Hooks and Setup Folders before clicking on XwaHooksSetup.exe
“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
Vince T
Fleet Admiral (Administrator)
Posts: 14045
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Sat Mar 07, 2020 12:10 pm

Yes, doesn't help tho either.
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear

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

Post by JeremyaFr » Sat Mar 07, 2020 2:03 pm

I've tried DSUCP in skirmish with an X-Wing (player craft) and 6 B-Wing against a Space Colony 1.
The B-Wings attack the station. The station explodes.
The game doesn't crash.

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

Post by Bman » Sun Mar 08, 2020 10:49 pm

Haven't seen those in-game yet but maybe those models have the 384 vertice/face bug. Perhaps just open them in XwaOptEditor, let it fix, and re-save?
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

User avatar
Vince T
Fleet Admiral (Administrator)
Posts: 14045
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Mon Mar 09, 2020 10:32 pm

I found out what causes the crash.
I set up a clean install put in all the hooks and did some playing around with XWA exe Patcher.
Activating the Triangling-to-infinity fix via XWA EXE Pacher results in the crash upon hitting a HD target(or one that would otherwise cause triangling?). Disabling the feature solves the problem.
CrashCause.jpg
Now with that out of the way, can anyone remind me how I can maintain the aspect ratio in concourse? With 3440x1440 it's pretty streched at the moment.
You do not have the required permissions to view the files attached to this post.
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear

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

Post by keiranhalcyon7 » Mon Mar 09, 2020 10:47 pm

In ddraw.cfg (or whatever the extension is), set preserve_aspect_ratio (or preserveAspectRatio, or however they spelled it) to true.

User avatar
Vince T
Fleet Admiral (Administrator)
Posts: 14045
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Mon Mar 09, 2020 11:04 pm

Another update: Now I installed the VR mod ontop the "stable" core install.
1. Aspect ratio fixed.
2. YAY! The hud issue is gone! I must have screwed up something upon first installing the VR mod. Also, the S_Foils are once again working correctly. I'm a happy geek now! Thank you all for the support! Turns out a clean start works wonders XD
YAY.jpg
You do not have the required permissions to view the files attached to this post.
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear

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

Post by Trevor » Tue Mar 10, 2020 10:28 am

You should also disable craft count per region since its done by a hook (as indicated by the Hook keyword at beginning)

Does anyone use calloc or has that moved from experimental to detrimental? (I currently use it)

Trev

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

Post by Bman » Tue Mar 10, 2020 12:06 pm

The triangling to infinity I unpatched too as it's already in the .dll and it gave me error message that it failed to initialize. I remember DTM had same issue. The others above, it's OK to apply because if routines see the engine has already been patched, it skips along. Shouldn't cause any problems.

Edit: I just discovered that if I use the new xwa_hook_d3d hook and set the .cfg file to "IsHookD3DEnabled = 1", the game will crash to desktop. This patch cannot be used with Blue_Max's lastest ddraw.dll file. v1.1.1. It only works with Jeremy's latest ddraw v1.3.8. I had to go back to Blue_Max's previous ddraw.dll version because my bloom effects went away. It might be my specific GPU, it's an older ATI (AMD) Radeon series card. I also have to use MSAA because SSAO causes edges of models to be too jagged like it's in old software mode without 3D smoothing applied. I haven't spent a lot of time tweaking it yet, so right now I only have bloom effects.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

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

Post by JeremyaFr » Tue Mar 10, 2020 4:55 pm

Hello,
I've succeeded to reproduce the crash at offset 000e8229.

With all the latest hooks, the game doesn't crash.
When disabling the opt limits hook, the game crashes.

So it seems that the crash was already fixed.

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

Post by blue_max » Tue Mar 10, 2020 6:27 pm

@Bman: the VR mod v1.1.1 is not compatible with MSAA -- I just enabled MSAA this previous weekend and I'm currently in the process of merging Jeremy's latest with mine to support hook_d3d.dll.

I'm glad things are working for you again, GT!

User avatar
Vince T
Fleet Admiral (Administrator)
Posts: 14045
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Tue Mar 10, 2020 11:01 pm

OK finally spent a bit more time testing out the new shader model and I'm utterly blown away! Been taking a few screencaps of my ships to use with my new website, the raw, unedited images turned out better than a lot of the stuff I've been rendering outside the game. Some of my EU ships like the Predator, Warhammer or Dominance were utterly terrifying XD

Very well done! :gott:
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear

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

Post by blue_max » Tue Mar 10, 2020 11:25 pm

Thanks for your comments, GT! I'm preparing an update that uses SSDO with the new shading model, so it should look a bit better soon ;)

Feel free to share those screenshots! I'm curious!

User avatar
Vince T
Fleet Admiral (Administrator)
Posts: 14045
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Tue Mar 10, 2020 11:47 pm

Will do, once I've got them down to a manageable number. Took about a hundred shots XD

Edit: Let's start with something Executolicious
ExecutorScreen1.jpg
ExecutorScreen2.jpg
ExecutorScreen3.jpg
ExecutorScreen4.jpg
ExecutorScreen5.jpg
I'll post some others tomorrow evening.
You do not have the required permissions to view the files attached to this post.
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear

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

Post by Bman » Wed Mar 11, 2020 12:25 am

Thanks BlueMax. Yeah, I turn off the MSAA in ddraw.cfg when I activate the SSAO.cfg file and turn off the in-game menu items Local Light Source and the other one below it. Shading looks great, it's just the edges on models are jagged like others have mentioned. And game gets a little more choppy for me and my bloom effects stop working. I haven't had time to experiment with tweaking the default settings. If I turn off SSAO.cfg and just use bloom effects with MSAA = 1, then all works fine for now as you've seen in my videos. The new hook_d3d.dll is great. It really speeds up frame rate, especially as newer models are going high-def and so forth. But I'll wait for your v1.3.8 implementation and smoothing effect or whatever method you decide. Appreciate all the work you're doing. Thanks.

Nice shots GT.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

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

Post by blue_max » Wed Mar 11, 2020 12:38 am

@GT Hey, those screenshots look nice! Keep them coming!

@Bman: You can also try setting the shader to "Deferred" or "SSAO" instead of "SSDO" to get more performance back. Another thing is that SSDO is a bit noisy unless you increase the number of samples; but that also costs a lot of performance. What I'm saying is that maybe the jaggies you're seeing isn't because of MSAA; but because of the noise introduced by SSDO. If you enable the Deferred shader and the jaggies disappear, then you know what's the real problem. If that's the case, then MSAA won't help. I don't know why Bloom is deactivated, though.

User avatar
DTM
Fleet Admiral (Administrator)
Posts: 2119
Joined: Tue Apr 22, 2003 11:01 pm
Contact:

Post by DTM » Fri Mar 20, 2020 1:06 pm

I have a bug to report:
Shields of the target (ISD2) are down. I hit the hull and the texture of the damaged surface becomes illuminated.

Image

I tried the same situation with different OPT versions (new and old ISD2). Same problem.

Image

The bug is present with both ddraw version 1.1.1 and the preview of 1.1.2 version

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

Post by DarHan » Fri Mar 20, 2020 2:56 pm

Oh yeah, I can confirm having the same bug with version 1.1.1.
“Red Four, nothing’s gone wrong yet.”
— Hobbie Klivian

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

Post by blue_max » Fri Mar 20, 2020 5:27 pm

DTM wrote:
Fri Mar 20, 2020 1:06 pm
Shields of the target (ISD2) are down. I hit the hull and the texture of the damaged surface becomes illuminated.
Thanks for reporting the bug. I wonder if the damage texture itself is illuminated in the OPT. If it is, then ddraw is working as expected and we would need to fix the OPT itself and remove the illumination there.

Where can I find the damage textures to check this?

EDIT: I took a quick look at the ISD2 and I didn't notice anything wrong in the illuminated textures; but I couldn't find the damage textures. I'll take a deeper look tonight.

User avatar
DTM
Fleet Admiral (Administrator)
Posts: 2119
Joined: Tue Apr 22, 2003 11:01 pm
Contact:

Post by DTM » Fri Mar 20, 2020 6:42 pm

The problem happens also with other opts. The opt files do not have texture for damaged surface. The damage in xwa are standard effects...but now I cannort tell you where to find them...

EDIT
When the surface of a vehicle is damaged by a laser, the game applies the damage image on the texture (As I remember it is contained in a .dat file, but I could be wrong). Apparently, the texture seems to light up. Instead, I believe that the texture in question loses the shading effect.

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

Post by JeremyaFr » Fri Mar 20, 2020 7:03 pm

Hello,
The damage images are in "Blastmarks.dat".

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

Post by blue_max » Fri Mar 20, 2020 9:55 pm

Oh, it's a dat file? Alright, thanks for the clues. I'll fix this.

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

Post by Darksaber » Sat Mar 21, 2020 12:46 am

May have found a bug, not sure, when in the cockpit (I have NO VR enabled) if you press 1 or 3 on the keypad the craft rotates left = 1, right = 3, but if you press keypad 3 the cockpit lunges to the right slightly then starts to rotate as it should, keypad 1 seems fine and rotates the craft left again just fine.

I've never noticed it before, at first I thought it was because I had number lock on, but no.
“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: 2295
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Sat Mar 21, 2020 5:37 am

Darksaber wrote:
Sat Mar 21, 2020 12:46 am
May have found a bug, not sure, when in the cockpit (I have NO VR enabled) if you press 1 or 3 on the keypad the craft rotates left = 1, right = 3, but if you press keypad 3 the cockpit lunges to the right slightly then starts to rotate as it should, keypad 1 seems fine and rotates the craft left again just fine.
A couple of releases ago I added support for Joystick emulation (from Reimar's ddraw). That allows you to move the craft by pressing the arrow keys. Also, cockpit lean has been enabled for a while, which also maps to the same keys. If you have both enabled, you'll rotate and lean at the same time. Funny, I thought I had both features disabled by default. Anyway, here's what you can do:

In ddraw.cfg, set "JoystickEmul = 0"

In CockpitLookHook.cfg, set: "keyboard_lean = 0"

That should disable these features.

Regarding the damage artifact: ddraw thinks it's glass because it's got transparency. I'm fixing this right now...

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

Post by Darksaber » Sat Mar 21, 2020 7:15 am

Ahhhh... just looked in xwa_vr_ddraw_d3d11_v1.1.1 at the CockpitLook.cfg, keyboard_lean is set to 1 not 0

ddraw.cfg, was set to JoystickEmul = 0

just tested again, it's still happening :(

just a few things to note I'm using ddraw_1.1.2_AC_preview ddraw.dll
just tested xwa_vr_ddraw_d3d11_v1.1.1 Ddraw.dll = same thing happening
also tested ddraw-1.0.11-preview Draw.dll = same thing happening

Just discovered another thing, the more times you press the 3 keypad key along with the craft rotating right, each time you press the 3 key the lunge happens, its like it goes say 10 degrees each press of the 3 key, press it enough times it goes full circle.

Just tested Jeremy's xwa_ddraw_d3d11.1.3.8, the same thing is happening

Trying to narrow this down by removing Hooks
Hook_Sfoils.dll removed = still lunges
Hook_Textures_Tag.dll removed = still lunges
Hook_32bpp.dll removed = still lunges

Ding, Ding, Ding, Ding, We have a winner!!!!!!
when Hook_CockpitLook.dll was removed the lunges stopped


That was using xwa_cockpitlook-1.0.2, reinstate 1.0.2 the lunges start again

Tested xwa_cockpitlook-1.0.0 = when pressing the keypad 3 key the result was, the cockpit rotates right, but it also sort of glitches as though is instantaneously lunges to the right, but then re-centres itself

Tested xwa_cockpitlook-0.9.6 = it's fine, it just rotates the cockpit right

it can't have been the OpenVR_API.dll as I using the latest one dated 10/01/2020

Hope this helps at least I hope I've tracked it down :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

Post Reply