Anyone interested in having native ReShade support?

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

Re: Anyone interested in having native ReShade support?

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

Post by Trevor » Mon Jul 15, 2019 10:53 pm

Since you say that XWA splits out illumination texture as an "overlay" could this not be used for bloom mask?

As for specular highlight, I don't see it as important as environment mapping (which is vertex based, not pixel based) and opts do have vertex normal since that's how they diffuse shade.

and AmbOcc again, I would suggest vertex based because its faster while providing satisfactory results (especially on hi-poly models)

don't get me wrong, per-pixel specular reflection on "normal diffuse textures" would allow "glossy/semi-glossy" surfaces with detail without being a "reflection" and would be a nice to have, but specular can be emulated by envmappping.

Trev

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

Post by blue_max » Thu Jul 18, 2019 6:26 am

Hey Trevor, I can try and detect when the "overlay" textures are create by XWA and then use that as template to enable bloom. That's a good idea, thanks!

Yes, OPTs must have normals; but the problem is that XWA does not send this information to ddraw, so we don't have the normals when rendering the objects. AFAIK, env mapping needs per-pixel normals, otherwise it just looks blurred if it only uses per-vertex data (unless you have high vertex count, of course). But again, the main problem is that there are no normals to work with.

So, what I think I have to do here, is approximate the normals by computing the derivative of the depth buffer and then use that information for either specular ref, env mapping or AO.

Or, if someone can figure out a hook to send the normal data to ddraw, then all these problems go away ;)

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

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

Side topic, Jeremy just released the (WIP) 32-bit color textures patch for .opt models (besides for static .dat images). The models may appear dark or very bright on occasions. It might have something to due with illumination issue, as it did in the past. Anyway, perhaps this is where Reshade/bloom effects might counter the issue.(?)
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 » Fri Jul 19, 2019 4:44 am

Bman wrote:
Fri Jul 19, 2019 1:06 am
Side topic, Jeremy just released the (WIP) 32-bit color textures patch for .opt models (besides for static .dat images). The models may appear dark or very bright on occasions. It might have something to due with illumination issue, as it did in the past. Anyway, perhaps this is where Reshade/bloom effects might counter the issue.(?)
Only one way to know: try it out with ReShade. My guess is that if the textures already look too bright, they will bloom all over the place with ReShade.

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

Post by DarHan » Fri Jul 19, 2019 3:47 pm

I’ve tried that on my setup. In the Liberty hangar, the result was an extremely dark hangar with normally lit fighters and one blindingly glowing Lambda shuttle.
“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 » Tue Aug 27, 2019 5:45 am

It's been a while since I posted here; but I've got some good news. Using Jeremy's texture tag hook, I can now make selective masks to apply the bloom only on certain textures, or even filter out the illumination textures. So, for instance, the Star Destroyers no longer look blindingly bright, and only the areas marked as "illuminated" in a texture get bloom now (I know, the effect is a bit overdone; but the strength can be configured by the user, and this is just a sample anyway):
bloom-sample-8.jpg
bloom-sample-9.jpg
The lasers and engine glow get full bloom. On the other hand, some OPTs may need a bit of a touch up to fix the illumination textures; but that's easy to do and I believe this is a reasonable solution to this problem. Did I mention there's no need to dim anything? The HUD and the Concourse no longer get any bloom.
You do not have the required permissions to view the files attached to this post.

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

Post by blue_max » Tue Aug 27, 2019 6:00 am

It also works with the 32-bit mode hook (like I said, the effect is a bit exaggerated right now; but this is just a sample):
bloom-sample-10.jpg
bloom-sample-11.jpg
There are a few artifacts that I still need to figure out. For instance: I don't yet know why the lasers seem to remove the bloom effect of whatever is on the background. There are a couple of other minor problems like that too.
You do not have the required permissions to view the files attached to this post.

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

Post by Trevor » Tue Aug 27, 2019 5:52 pm

WOW!!!
This is perfect!

Once 32bit becomes more standard across retextures I can see a huge benefit with this enabled in future.

Since you can now filter by Lights, I would be inclined to reduce the overall brightness so the lights stand out more (more contrast)

I assume the VRParams file brightness setting still works with this?

Trev

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

Post by blue_max » Tue Aug 27, 2019 6:18 pm

Thanks Trevor. Yes, the vrparams brightness still works and can be used -- although I think this setting was specifically for the HUD/Text/Concourse. If I understood your comment properly, I believe you're talking about reducing the overall brightness of the 3D content (maybe through the in-game brightness setting?) I don't know if that will also affect the brightness of the lasers (but I guess I can force the brightness inside ddraw for these elements too).

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

Post by DTM » Tue Aug 27, 2019 6:56 pm

:applaus:

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

Post by ual002 » Tue Aug 27, 2019 10:55 pm

Good job sir. Looking forward to it.
Image Image Image Image Image

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

Post by keiranhalcyon7 » Wed Aug 28, 2019 7:21 am

The forcefield emitters look marvelous.

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

Post by blue_max » Thu Aug 29, 2019 6:15 am

I think I fixed the problem with the lasers:
bloom-sample-17.jpg
You do not have the required permissions to view the files attached to this post.

User avatar
Driftwood
Admiral (Moderator)
Posts: 2174
Joined: Wed Oct 22, 2003 11:01 pm
Contact:

Post by Driftwood » Sun Sep 01, 2019 4:45 pm

Are you going to be releasing a version of this soonish? I kinda would like to ditch my reshade install due to it slowing down the concourse.

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

Post by blue_max » Mon Sep 02, 2019 6:30 pm

Yup, I can release a preview this week while I continue to fine-tune the algorithm. It'll also include support for the Dynamic Cockpit and the 32-bit mode hook.

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

Post by blue_max » Tue Sep 03, 2019 5:32 am

Eh, here's version 1.0.4:

https://www.dropbox.com/s/bceeg2z4a18il ... 4.zip?dl=0

This version includes a preview of the bloom shader. I'll keep working on it; but you guys can try it out. Just be aware that I might change how it's configured later.

This version also fixes the brightness of the lasers in 32-bit mode; but this has to be enabled in ddraw.cfg (I've provided an example).
Hyperspace-bloom.jpg
You do not have the required permissions to view the files attached to this post.

User avatar
Driftwood
Admiral (Moderator)
Posts: 2174
Joined: Wed Oct 22, 2003 11:01 pm
Contact:

Post by Driftwood » Tue Sep 03, 2019 11:18 pm

So I can uninstall reshade?

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

Post by Bman » Tue Sep 03, 2019 11:21 pm

Great! This is the same file in other D.C. post, correct? Got it. Thanks
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 » Tue Sep 03, 2019 11:33 pm

@Bman: Yup, this is the same release I posted in the DC thread.

@Driftwood: If you're only using ReShade for the bloom effect then yes. However, you may still use ReShade for other effects if you wish.

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

Post by Trevor » Thu Sep 12, 2019 8:16 pm

Unfortunately I am not getting bloom.
I even set really high values and still nothing...

also, the brightness value in vrparams only affects 2d elements (I was looking to reduce the overall brightness except for light emission sources)

trev

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

Post by blue_max » Thu Sep 12, 2019 9:33 pm

Yeah, the brightness value only affects the Concourse and other 2D (HUD) elements. Making it work like you describe is going to take a bit of an effort. May I ask what are you trying to do with it?

I'm going to release a new version of the bloom effect soon, since I found a number of bugs in that release. So you might want to wait a few more days.

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

Post by blue_max » Mon Sep 16, 2019 4:56 am

Here's a new version of ddraw with an improved version of the bloom shader:

https://www.dropbox.com/s/2kl6ydc6omjh6 ... 5.zip?dl=0
bloom-sample-18.jpg
bloom-sample-19.jpg
bloom-sample-20.jpg
You do not have the required permissions to view the files attached to this post.

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

Post by blue_max » Mon Sep 16, 2019 5:00 am

bloom-sample-22.jpg
bloom-sample-21.jpg
You do not have the required permissions to view the files attached to this post.

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

Post by Bman » Mon Sep 16, 2019 6:27 am

Very nice! Although the windows on SSD are a bit too bright, is it running on plutonium ? :-) Well done. Sorry haven't had a time to test your ddraw yet. Downloaded at least.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

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

Post by DarHan » Tue Sep 17, 2019 7:15 pm

Al right, quick test on my setup (Win7, DSUCP 2.6, 32-bit hook, ReShade 4.3):
  • Absolutely refuses to work with ReShade. Trying to start XWA with both this mod and ReShade active leads to an instant crash. I had to choose one or the other.
  • Bloom works perfectly in-game EXCEPT if the target box is active, at which point everything becomes pitch black except for the HUD and the bloom. Disabling the target box using the relevant hook makes everything visible again.
  • It seems that closing XWA doesn’t end the XwingAlliance.exe process?
“Red Four, nothing’s gone wrong yet.”
— Hobbie Klivian

Post Reply