Integrating XWA's Lights into the New Shaders
Integrating XWA's Lights into the New Shaders
- blue_max
- Posts: 2295
- Joined: Wed Mar 20, 2019 5:12 am
Up until this point the shaders I've written rely on specifying external lights on the SSAO.cfg file, which isn't ideal and they ignore the lights in each mission completely. However, I think I finally got XWA's lights working with the new shaders:
The lights now match the position of the suns, nebulae and planets on the background. The lights are a bit saturated, and maybe in some cases not strong enough; but I've added settings to de-saturate them and to modulate their intensity. So people should be able to configure the experience to their liking. I'll post a micro-update soon.
The lights now match the position of the suns, nebulae and planets on the background. The lights are a bit saturated, and maybe in some cases not strong enough; but I've added settings to de-saturate them and to modulate their intensity. So people should be able to configure the experience to their liking. I'll post a micro-update soon.
You do not have the required permissions to view the files attached to this post.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.
- keiranhalcyon7
- Posts: 599
- Joined: Tue Jan 02, 2018 6:41 am
More sweetness!
Question - I know multiple light sources can be specified in the mission files. That's not a problem, is it? Do you see any slowdown in missions with multiple lights?
Question - I know multiple light sources can be specified in the mission files. That's not a problem, is it? Do you see any slowdown in missions with multiple lights?
- blue_max
- Posts: 2295
- Joined: Wed Mar 20, 2019 5:12 am
That's not a problem at all. I don't see any slowness at this point, and I don't expect anything noticeable eitherkeiranhalcyon7 wrote: ↑Fri Apr 10, 2020 4:51 amQuestion - I know multiple light sources can be specified in the mission files. That's not a problem, is it? Do you see any slowdown in missions with multiple lights?
-
- Posts: 79
- Joined: Tue May 09, 2006 11:01 pm
Checking the progress updates every day is like opening another christmas present.
- Trevor
- Posts: 541
- Joined: Thu Dec 04, 2014 7:11 pm
Holy ****!!!
WOW, cant wait to test.
Now, Im seeing that in your screenshots that parts of the cockpit that should be occluded from the light source are still being shaded by it... is that just a temporary bug or a setting for "simplified shader"?
Trev
WOW, cant wait to test.
Now, Im seeing that in your screenshots that parts of the cockpit that should be occluded from the light source are still being shaded by it... is that just a temporary bug or a setting for "simplified shader"?
Trev
- Ace Antilles
- Posts: 7829
- Joined: Sat Jan 22, 2000 12:01 am
- Contact:
I really can't believe I am still looking at this very old, but excellent game.
The stuff done with the engine now is outstanding and unbelievable.
In a world where most games are now made for mobile phones I am loving to see this stuff.
The stuff done with the engine now is outstanding and unbelievable.
In a world where most games are now made for mobile phones I am loving to see this stuff.
- blue_max
- Posts: 2295
- Joined: Wed Mar 20, 2019 5:12 am
You're probably referring to the purple light on the X-Wing cockpit. The light source is on the left; but some thin areas in the left dashboard still get this light. Not a bug, that's just the way the fake normal mapping works. If normal mapping is disabled, those artifacts are removed. Those problems might go away once I enable true normal mapping; but I doubt it (I believe these artifacts would be properly resolved by computing shadow maps).
- blue_max
- Posts: 2295
- Joined: Wed Mar 20, 2019 5:12 am
You do not have the required permissions to view the files attached to this post.
- Vince T
- Posts: 14045
- Joined: Fri Apr 27, 2001 11:01 pm
- Contact:
This is looking so amazing blue_max!
That second picture made me think of something (sorry if I jump from one idea to the next) See how that backdrop of the planet is kinda bright BUT the lines between it and the station in the foreground are still rather sharp and clearly defined? I don't know how tis effect is called in modern games but would it be possible to modify the bloom hook so the backdrop's brightness outshines those sharp edges?
That second picture made me think of something (sorry if I jump from one idea to the next) See how that backdrop of the planet is kinda bright BUT the lines between it and the station in the foreground are still rather sharp and clearly defined? I don't know how tis effect is called in modern games but would it be possible to modify the bloom hook so the backdrop's brightness outshines those sharp edges?
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear
Vince T's X-Wing HQ - where the bad guys get their gear
- blue_max
- Posts: 2295
- Joined: Wed Mar 20, 2019 5:12 am
@GT: I think it should be possible to add bloom to the planet; but the DAT containing the planet (or wherever it is) would need to have illumination. Is it possible to define illuminated areas in a DAT file? The illuminated areas would get converted into bloom. If this is not possible, then I would need to add a threshold to compute the bloom directly from the texture data, so I probably would need to enable this feature. Shouldn't be too hard, though.
OK, here's the ddraw preview with support for the XWA light system (I guess I should probably post this in the "installer thread" too):
https://www.dropbox.com/s/79dpfkteokaxh ... 0.dll?dl=0
I've added the following parameters to SSAO.cfg:
; XWA lights saturation.
; 1: Original saturation
; 0: All lights become grayscale
xwa_lights_saturation = 0.8
; Intensity multiplier: if the lights seem to dark, you can increase their power
; by setting the following above 1. Setting it to 0 will shut down the lights.
; Do not set it too far above 1 or you'll overexpose the render
xwa_lights_global_intensity = 1.0
OK, here's the ddraw preview with support for the XWA light system (I guess I should probably post this in the "installer thread" too):
https://www.dropbox.com/s/79dpfkteokaxh ... 0.dll?dl=0
I've added the following parameters to SSAO.cfg:
; XWA lights saturation.
; 1: Original saturation
; 0: All lights become grayscale
xwa_lights_saturation = 0.8
; Intensity multiplier: if the lights seem to dark, you can increase their power
; by setting the following above 1. Setting it to 0 will shut down the lights.
; Do not set it too far above 1 or you'll overexpose the render
xwa_lights_global_intensity = 1.0
- Vince T
- Posts: 14045
- Joined: Fri Apr 27, 2001 11:01 pm
- Contact:
Well the planet dats are fully illuminated by default I'd say. They do have sort of a transparency channel that much I know but that may rather be a question for DTM as he's the master of backdrops
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear
Vince T's X-Wing HQ - where the bad guys get their gear
- Darksaber
- Posts: 10931
- Joined: Mon Jan 10, 2000 12:01 am
- Contact:
Actually it was me that removed all the black from around the planets, nebulas, galaxies and so on, making them transparent and blend in better
Your welcome
Your welcome
“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
- John Lydgate
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear
Vince T's X-Wing HQ - where the bad guys get their gear
- keiranhalcyon7
- Posts: 599
- Joined: Tue Jan 02, 2018 6:41 am
I think this would be a little tough to get right. You'd need to make sure that the added bloom doesn't wash out the planet image; you just want it to bleed a little over the foreground objects.
Related observation: many of the star backdrop objects have baked-in bloom effects. Would it be better to look at redoing them entirely to make use of a calculated bloom effect instead (perhaps based in part on the objects' strength as a light source)?
Now that you have the game engine's light source, another effect you could think about adding is... What's that effect called where when you look into a light source, everything dims (except the hdr bloom of the light source) to simulate the response of the human eye/iris?
Related observation: many of the star backdrop objects have baked-in bloom effects. Would it be better to look at redoing them entirely to make use of a calculated bloom effect instead (perhaps based in part on the objects' strength as a light source)?
Now that you have the game engine's light source, another effect you could think about adding is... What's that effect called where when you look into a light source, everything dims (except the hdr bloom of the light source) to simulate the response of the human eye/iris?
- blue_max
- Posts: 2295
- Joined: Wed Mar 20, 2019 5:12 am
Automatic eye adaptation or exposure. I would need to switch everything to HDR, though; and probably tweak the lights somehow too. Not terribly complicated; but the last time I tried I didn't get particularly interesting results either.keiranhalcyon7 wrote: ↑Sat Apr 11, 2020 2:45 amWhat's that effect called where when you look into a light source, everything dims (except the hdr bloom of the light source) to simulate the response of the human eye/iris?
- Trevor
- Posts: 541
- Joined: Thu Dec 04, 2014 7:11 pm
I was trying to get suns to wash out the screen, but it didn't work because by the time I got enough bloom to wash the image, the star was invisible and bloom was still a circle (not whole screen):PWhat's that effect called where when you look into a light source,
however, yeah, this seems the better option.everything dims (except the hdr bloom of the light source) to simulate the response of the human eye/iris?
I beleve we can still use reshade with blues ddraw.dll however as with all things reshade, its not customisable to xwa (so specular component will darken screen too)
I was playing with the settings for ssdo and it seems rays only travel so far despite any values I use.
eg, turning up inter-reflection I notice rays don't extend beyond 0.5m no matter how bright they are or any other value used.
What I was going for was to use the interreflection to properly illuminate the hangar (instead of using either "ambient" light or "black level" clamping)
Can we get a variable for the IR bounce count and distance please.
Trev
- blue_max
- Posts: 2295
- Joined: Wed Mar 20, 2019 5:12 am
Yep, can't have rays travelling unbounded: that would kill performance as it would trash the image cache.
The rays stop at screen-space radius specified by two settings: near_sample_radius, and far_sample_radius. These radii are in screen space, so a value of 1 means "travel the whole screen". But if you do that, you'll kill the performance (see above) and it won't work anyway because it's not a ray-marching algorithm: it just samples the screen at the place where the ray lands, disregarding whatever geometry is in the middle. The algorithm assumes that rays will be short, so intervening geometry that gets skipped is usually not a big deal. If you break the assumption, you'll just get a messy result.eg, turning up inter-reflection I notice rays don't extend beyond 0.5m no matter how bright they are or any other value used.
You can get some inter-reflection in the hangar, mostly near the corners; but it's a subtle effect.What I was going for was to use the interreflection to properly illuminate the hangar (instead of using either "ambient" light or "black level" clamping)
SSDO is an approximation to GI at one bounce. Enabling more bounces will not work very well. What you're essentially asking for here is ray-tracing. While this is technically possible, it would be a big project. My guess is that the "easiest" way to do this would involve moving us first to DirectX 12 to use nVidia's ray-tracing API, and then figure out how to use that. However, even if we did that, I'm not sure it would work. The biggest problem I see is that we get clipped and culled geometry in ddraw. So, while things seem solid from the camera's point of view, it's in fact a series of thin sheets when you look at them from the side. Not a big deal when rasterizing; but if you start shooting rays, there's tons of geometry you'll miss, so the result won't make sense. I've already tried to do ray-marching in screen space to add shadows; but it only works in a few places and for a very short distance. In the end, all I get is a horrible mess of inconsistent shadows. If we can't get nice shadows, then ray-tracing won't work either.Can we get a variable for the IR bounce count and distance please.
- Trevor
- Posts: 541
- Joined: Thu Dec 04, 2014 7:11 pm
Ah right, got you.
yeah, many problems hark back to not having either the full model or the requirement to do full raytracing (which would be overly computationally expensive or a different technology such as DX12 raytracing)
Trev
yeah, many problems hark back to not having either the full model or the requirement to do full raytracing (which would be overly computationally expensive or a different technology such as DX12 raytracing)
Trev