XWA, Raytraced
Re: XWA, Raytraced
It's better to burn out than to fade away .
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.
-
- Posts: 293
- Joined: Fri Nov 17, 2000 12:01 am
Very cool, can't wait to see how the optimization turns out.
S. Schauer<BR>Flight Test Engineer<BR>C-17 DOOE, 418th FLTS<BR>AFFTC, Edwards AFB
- blue_max
- Posts: 2285
- Joined: Wed Mar 20, 2019 5:12 am
-
- Posts: 31
- Joined: Mon Dec 17, 2018 10:11 am
I just noticed the speed readout gets cut off when it becomes three figures. A quibble for the next patch, no doubt.
-
- Posts: 42
- Joined: Mon Feb 01, 2021 1:03 pm
Superb work so far! Grafic cards of the RTX 2000 generation shouldn´t have problems with this, right? Like framedrops below 60 FPS or so.
I hope for a migration to Direct X 12 though.
I hope for a migration to Direct X 12 though.
- Vince T
- Posts: 14029
- Joined: Fri Apr 27, 2001 11:01 pm
- Contact:
I got to test it on a RTX 3070 and while there definitely is a bit performance loss compared to playing without RT I hardly experienced any dips below 100 FPS, even with HD models like the new ISD, running at 3440x1440. Still, depending on what‘s on screen I‘m still getting peaks of 200 FPS and more
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
Vince T's X-Wing HQ - where the bad guys get their gear
-
- Posts: 79
- Joined: Tue May 09, 2006 11:01 pm
That looks incredible. I can't wait to jump in and play with all the new bells and whistles (especially the new ISD's).
- keiranhalcyon7
- Posts: 599
- Joined: Tue Jan 02, 2018 6:41 am
Hmm, note for blue_max - in Vince's image above, given the sun angle, the entire engine bay should be in shadow, should it not? Forgive me if my terms are inaccurate, but it looks like the albedo is obeying the shadows, but the specular is not. (See also the gradient on the portion of the uppermost deck in the shadow of the "neck".)
- blue_max
- Posts: 2285
- Joined: Wed Mar 20, 2019 5:12 am
It also depends on how many light sources there were in this map. Planets and nebulae also emit light, but only the suns will cast shadows (I can have multiple shadow casters, but not only does it look very weird, it also incurs an additional performance penalty). So yes, the engine area should be in shadow, as you pointed out, but I'm guessing there's another light source off-screen here.keiranhalcyon7 wrote: ↑Thu Jan 19, 2023 2:14 amHmm, note for blue_max - in Vince's image above, given the sun angle, the entire engine bay should be in shadow, should it not? Forgive me if my terms are inaccurate, but it looks like the albedo is obeying the shadows, but the specular is not. (See also the gradient on the portion of the uppermost deck in the shadow of the "neck".)
- blue_max
- Posts: 2285
- Joined: Wed Mar 20, 2019 5:12 am
Alright, enough waiting! Here's a preview of this effect:
EDIT: Link removed, see the last post for the latest update.
Real-time Screen-Space Raytracing is finally here for XWA!
RT is disabled by default. To enable it, you can press Ctrl+R while flying. After that, you can enable Raytraced Cockpit Shadows by pressing Ctrl+Shift+R, in that order.
Raytracing can also be enabled by adding the following to SSAO.cfg:
Please note that enabling Raytraced Cockpit Shadows incurs a noticeable impact in performance.
RT uses a new shader that also implements HDR. To control the brightness when RT is on, you can use the HDR_lights_intensity setting. Higher values make brighter scenes and viceversa. RT also responds to the "ambient" setting in SSAO.cfg: I suggest you use a value between 0.03 and 0.05.
Known Issues:
* The Raytracer uses more GPU memory. So I'm pretty sure it will crash on larger battles.
* This feature is meant for higher-end systems, but I can run it on my old nVidia 1070 (laptop version) at a playable framerate (my average is about 40fps). Still, expect a noticeable impact (without RT my average is around 80fps). This is the first version of this feature, so expect better performance in future updates.
* This is Screen-Space RT. Which means that whenever a new mesh enters the screen, there will be a brief pause while the engine builds the new acceleration structure needed for it. This also means that meshes that exit the screen will no longer cast shadows. This may cause some flicker. This is most noticeable in the cockpit, when looking around: you'll see new shadows pop in an out as their corresponding mesh gets rendered (or not).
* Materials may look a bit different with RT. I've noticed that the biggest change comes from the glossiness setting. Feel free to experiment!
EDIT: Link removed, see the last post for the latest update.
Real-time Screen-Space Raytracing is finally here for XWA!
RT is disabled by default. To enable it, you can press Ctrl+R while flying. After that, you can enable Raytraced Cockpit Shadows by pressing Ctrl+Shift+R, in that order.
Raytracing can also be enabled by adding the following to SSAO.cfg:
Code: Select all
raytracing_enabled = 1
raytracing_enabled_in_tech_room = 1
raytracing_enabled_in_cockpit = 1
HDR_lights_intensity = 2.0
RT uses a new shader that also implements HDR. To control the brightness when RT is on, you can use the HDR_lights_intensity setting. Higher values make brighter scenes and viceversa. RT also responds to the "ambient" setting in SSAO.cfg: I suggest you use a value between 0.03 and 0.05.
Known Issues:
* The Raytracer uses more GPU memory. So I'm pretty sure it will crash on larger battles.
* This feature is meant for higher-end systems, but I can run it on my old nVidia 1070 (laptop version) at a playable framerate (my average is about 40fps). Still, expect a noticeable impact (without RT my average is around 80fps). This is the first version of this feature, so expect better performance in future updates.
* This is Screen-Space RT. Which means that whenever a new mesh enters the screen, there will be a brief pause while the engine builds the new acceleration structure needed for it. This also means that meshes that exit the screen will no longer cast shadows. This may cause some flicker. This is most noticeable in the cockpit, when looking around: you'll see new shadows pop in an out as their corresponding mesh gets rendered (or not).
* Materials may look a bit different with RT. I've noticed that the biggest change comes from the glossiness setting. Feel free to experiment!
Last edited by blue_max on Tue Jan 24, 2023 10:11 am, edited 1 time in total.
-
- Posts: 154
- Joined: Wed Mar 20, 2019 7:04 pm
Time for testing
.
After short tests I can say that it is brilliant
. As I can see, almost all textures need some tweaking in the material library, I think I'm going to have a lot of optimizations to do with that. If ddraw improves its performance in computing polygons, textures may be less detailed. I see we're getting closer to XWVM, however XWA has hyperspace jumps 
Thank you.

After short tests I can say that it is brilliant


Thank you.
- blue_max
- Posts: 2285
- Joined: Wed Mar 20, 2019 5:12 am
I wouldn't do that just yet as I'm still trying to match the current look as much as possible to avoid precisely this sort of thing. But if you want to make some light adjustments, then sure, go ahead.korekwerner wrote: ↑Thu Jan 19, 2023 8:52 pmAs I can see, almost all textures need some tweaking in the material library, I think I'm going to have a lot of optimizations to do with that.
- MechDonald
- Posts: 567
- Joined: Mon Jul 26, 2021 1:21 pm
Oh WOW! This is something i always wanted for XWA!!! I never thought that this will ever be reality. I played some Missions and it's sooo amazing now!! How ships fly into shadows of other ships - it looks so cool now!
Thank you very, very much for the awesome work @blue_max!! I'm so happy now!
Thank you very, very much for the awesome work @blue_max!! I'm so happy now!

-
- Posts: 154
- Joined: Tue Oct 13, 2020 1:34 pm
Thank you very much blue max, your work is incredible.
-
- Posts: 212
- Joined: Fri Dec 27, 2019 7:08 pm
Do you have the plan to add ray tracing to all ships ? if is yes I suppose will be a very long and hard work ....
To prevent accessive FPS drop have thinked about ray tracing custom level ? (Low, mid , high, ultra)
So instead of disable it for default you can enable on "low" and allow how have cheap video card (ex. GTX 1060) to use it without too performace hit.
To prevent accessive FPS drop have thinked about ray tracing custom level ? (Low, mid , high, ultra)
So instead of disable it for default you can enable on "low" and allow how have cheap video card (ex. GTX 1060) to use it without too performace hit.
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
-
- Posts: 96
- Joined: Thu Jul 20, 2006 11:01 pm
hey so this is incredible!!! I can't wait to try it out! Thanks Blue for all your incredible work!!!!!
Ackbar: "IT'S A TRAP!!"
Kids: "ADMIRAL ACKBAR CEREAL!!"
Ackbar: "YOUR TASTE BUDS CAN'T REPEL FLAVOR OF THAT MAGNITUDE!"
Kids: "ADMIRAL ACKBAR CEREAL!!"
Ackbar: "YOUR TASTE BUDS CAN'T REPEL FLAVOR OF THAT MAGNITUDE!"
-
- Posts: 27
- Joined: Thu May 13, 2021 4:45 am
Tested and run a couple of missions, seems pretty smooth and getting responsive fps. The ingame scenes are so pretty.
- blue_max
- Posts: 2285
- Joined: Wed Mar 20, 2019 5:12 am
Thanks for your comments guys. Everything casts Raytraced shadows at this moment, but I'm considering adding a new material setting to de-activate Raytracing for specific areas of an OPT. For instance, in the Training Missions or the DS2 level you actually go inside a big structure where everything is in complete shadow all the time, so it makes no sense to do Raytracing in these areas. This setting can also be used to implement "low/high" Raytracing settings.
Regarding the performance issues, we have a plan to use Embree in the near future. That should improve the framerate
Regarding the performance issues, we have a plan to use Embree in the near future. That should improve the framerate

- MechDonald
- Posts: 567
- Joined: Mon Jul 26, 2021 1:21 pm
For me it seems, that not all missions have shadow-casting. Although there is a light source in the scene, there are no shadows. I experienced this in the mission where i have to rescue Emon with the Otana.
The area where i have to pick up the bomb-container is just flat dark. And the next area is missing all the beautiful shadows. Is there something wrong with my installation? (I reinstalled XWA + Upgrade just yesterday).
The area where i have to pick up the bomb-container is just flat dark. And the next area is missing all the beautiful shadows. Is there something wrong with my installation? (I reinstalled XWA + Upgrade just yesterday).
- blue_max
- Posts: 2285
- Joined: Wed Mar 20, 2019 5:12 am
I don't think there's anything wrong with your installation. Some areas have low lighting conditions, so the shadows are barely visible. For instance, in B1M3, region 4, there's almost no shadows. I checked B1M3 and the sun in this region was configured to have low illumination. In other words, that's a decision made by the mission designers. I can override that and force brighter suns, but I know there's some missions that are intentionally dark. I doubt the developers from 20 years ago noticed this, though.MechDonald wrote: ↑Fri Jan 20, 2023 6:08 pmFor me it seems, that not all missions have shadow-casting. Although there is a light source in the scene, there are no shadows. I experienced this in the mission where i have to rescue Emon with the Otana.
The area where i have to pick up the bomb-container is just flat dark. And the next area is missing all the beautiful shadows. Is there something wrong with my installation? (I reinstalled XWA + Upgrade just yesterday).
Can you send me a film of this region, please? I can take a look to see if maybe there's a bug that needs to be fixed.
-
- Posts: 18
- Joined: Mon Nov 04, 2019 4:17 am
expected that my own ship doesn't really cast a shadow unless I am in external view?
With ray traced cockpit shadows on I do cast a bit of a shadow but I suspect it is of the cockpit model itself and not my ship! Nothing when I am using shadowmapping in the cockpit but raytracing otherwise.
Beyond that, works great! I'd dreamed about this becoming possible
With ray traced cockpit shadows on I do cast a bit of a shadow but I suspect it is of the cockpit model itself and not my ship! Nothing when I am using shadowmapping in the cockpit but raytracing otherwise.
Beyond that, works great! I'd dreamed about this becoming possible