Approximate Global Illumination Shaders
Re: Approximate Global Illumination Shaders
- Trevor
- Posts: 541
- Joined: Thu Dec 04, 2014 7:11 pm
Holly crap... I cant wait to test, please upload that dll!
Trev
Trev
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: 2296
- Joined: Wed Mar 20, 2019 5:12 am
I've had to do a few compromises to remove some artifacts: dual-ssdo, for instance is probably not going to work; and I'm obscuring the edges of the screen because I sometimes see a big halo there... but anyway, if you guys are willing to forgive the occasional artifact, then yes, I think I can release something soon while I keep working on fixing issues. Maybe around this weekend.
BTW, I'm already thinking about the next effects. How about HDR rendering?
BTW, I'm already thinking about the next effects. How about HDR rendering?
You do not have the required permissions to view the files attached to this post.
-
- Posts: 18
- Joined: Mon Nov 04, 2019 4:17 am
just me or is SSDO a fair amount darker looking than SSAO? and is ssao_type = directional the correct config? Would be nice to have an example ssao.cfg in the repo. Easy enough to compile, then I get to hunt through the source for the relevant config entries Or I could just wait for you to release but what fun is a gun without jumping it
- Vince T
- Posts: 14056
- Joined: Fri Apr 27, 2001 11:01 pm
- Contact:
Newbie question: Am I right to assume the shader reads the data from the textures, not the rendered image?
I‘m wondering : Would it be possible to incorporate dedicated textures into the opt format which could act as actual bump maps?
I‘m wondering : Would it be possible to incorporate dedicated textures into the opt format which could act as actual bump maps?
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: 2296
- Joined: Wed Mar 20, 2019 5:12 am
@MamiyaOtaru: From the pictures I've posted so far I can see why you'd believe that SSDO is much darker than SSAO; but in fact it can be configured in a number of ways. Two lights can be specified along with their color, there's another color for all the shadows and an ambient component. For instance, in this example I set the shadow color to red:
And here, the secondary light provides enough illumination so that the effect becomes subtle:
I'll upload a sample config file later today if you want to try it out before I do the official release.
@General Trageton: Normal mapping right now is reading the information from the screen, not the textures; but the effect fades with distance. However, I think it's possible to read a normal map from an external source and load it when necessary -- that would be much better. I would need a bit of help to read it from an OPT; but to do an experiment I was actually thinking of just loading from external files -- similar to what I'm already doing for the Dynamic Cockpit. Maybe both approaches can be combined: load normal maps when present and when not, do "fake" normal mapping from the screen.
And here, the secondary light provides enough illumination so that the effect becomes subtle:
I'll upload a sample config file later today if you want to try it out before I do the official release.
@General Trageton: Normal mapping right now is reading the information from the screen, not the textures; but the effect fades with distance. However, I think it's possible to read a normal map from an external source and load it when necessary -- that would be much better. I would need a bit of help to read it from an OPT; but to do an experiment I was actually thinking of just loading from external files -- similar to what I'm already doing for the Dynamic Cockpit. Maybe both approaches can be combined: load normal maps when present and when not, do "fake" normal mapping from the screen.
You do not have the required permissions to view the files attached to this post.
- blue_max
- Posts: 2296
- Joined: Wed Mar 20, 2019 5:12 am
I probably should've mentioned this earlier; but all the screenshots here were taken with XWA's shading system disabled. All the shading was computed 100% by SSDO. One of the differences with SSAO is that the shader takes the light direction and color into account. Here's an example of an SSDO "mask" with a blue light:
If this were SSAO, we would only get a grayscale image. This mask is blended multiplicatively with the regular color buffer and that's how shading gets applied. However, XWA's shading can be combined with this effect; but I haven't seen much value in doing that and disabling XWA's shading does seem to improve performance a little bit. Here's another sample:
If this were SSAO, we would only get a grayscale image. This mask is blended multiplicatively with the regular color buffer and that's how shading gets applied. However, XWA's shading can be combined with this effect; but I haven't seen much value in doing that and disabling XWA's shading does seem to improve performance a little bit. Here's another sample:
You do not have the required permissions to view the files attached to this post.
- blue_max
- Posts: 2296
- Joined: Wed Mar 20, 2019 5:12 am
To be fair to everyone, I'm publishing a sample config file *and* a working ddraw.dll that can be put on top of release 1.0.8 for people who really can't wait for the official release:
https://www.dropbox.com/s/x07wqeplwj5du ... w.zip?dl=0
-
- Posts: 18
- Joined: Mon Nov 04, 2019 4:17 am
Cool, this looks amazing. Thanks for the config (and the dll. am using the one you provided for this post). SSDO is quite nice having the light source/direction taken into account (if I am understanding right it just assumes it is the same place in every map?). Getting some pretty bad halos when a snub fighter passes over the better illuminated side of a cap ship though, which doesn't happen with SSAO. See http://chattypics.com/files/ssdo_6tutdih5kp.jpg Cockpit causes them too, and it's a bit noticeable for my tastes. The directional shading is too nice to ignore though it's a conundrum hah
For grins I put in enable_dual_ssao = 1 even though it says not to with SSDO, just to see. The (dark) halos on the better illuminated side of the ISD were gone but now there were light halos on the darker side of the ISD
Also I am playing in 1440p. A couple settings were resolution dependent, with examples given on either side of my resolution, so I used values in between for both.
For grins I put in enable_dual_ssao = 1 even though it says not to with SSDO, just to see. The (dark) halos on the better illuminated side of the ISD were gone but now there were light halos on the darker side of the ISD
Also I am playing in 1440p. A couple settings were resolution dependent, with examples given on either side of my resolution, so I used values in between for both.
- DarHan
- Posts: 325
- Joined: Mon Dec 05, 2005 12:01 am
- Contact:
Yeah, I noticed those halos too on my end.
“Red Four, nothing’s gone wrong yet.”
— Hobbie Klivian
— Hobbie Klivian
- blue_max
- Posts: 2296
- Joined: Wed Mar 20, 2019 5:12 am
Thanks for testing this pre-release guys. Yes, I know about the halos. It kind of happens with SSAO; but in SSAO the effect just fades to white and isn't very noticeable. In this case, since it's replacing the shading, it can be clearly seen. That's one of the things I still need to fix.
The position of the lights is determined by the config file, so it assumes it's the same for every map -- which may not be the case. I can read the light positions/directions from XWA, thanks to Jeremy; but when I tried to transform these lights, it just didn't work (the rotation matrix doesn't even look like a proper rotation, etc). I'll come back to that later, though.
The position of the lights is determined by the config file, so it assumes it's the same for every map -- which may not be the case. I can read the light positions/directions from XWA, thanks to Jeremy; but when I tried to transform these lights, it just didn't work (the rotation matrix doesn't even look like a proper rotation, etc). I'll come back to that later, though.
- blue_max
- Posts: 2296
- Joined: Wed Mar 20, 2019 5:12 am
Alright, here's the official release:
https://www.dropbox.com/s/zphae74s8y45c ... 9.zip?dl=0
(EDIT: Updated the link above to include fixes to the SteamVR mode).
Honestly, this is *the same* ddraw.dll I posted earlier. I just added more details in the readme files. So if you've already got that, you won't see anything new in this package. I haven't had much chance to make progress in this area (or to fix the artifacts reported in this thread) and I keep getting side-tracked with other ideas I *just* want to try out right away. Suffice to say that there will be even more effects in the near future...
https://www.dropbox.com/s/zphae74s8y45c ... 9.zip?dl=0
(EDIT: Updated the link above to include fixes to the SteamVR mode).
Honestly, this is *the same* ddraw.dll I posted earlier. I just added more details in the readme files. So if you've already got that, you won't see anything new in this package. I haven't had much chance to make progress in this area (or to fix the artifacts reported in this thread) and I keep getting side-tracked with other ideas I *just* want to try out right away. Suffice to say that there will be even more effects in the near future...
- DTM
- Posts: 2120
- Joined: Tue Apr 22, 2003 11:01 pm
- Contact:
SSDO is great!!!
I have to report a bug, but maybe it is linked with the already known issues…
When I look at something that is self-illuminated, like the Sky, there is a terrible round halo all around the view:
I hope you are able to fix it, because SSDO is really a revolutionary upgrade!
I have to report a bug, but maybe it is linked with the already known issues…
When I look at something that is self-illuminated, like the Sky, there is a terrible round halo all around the view:
I hope you are able to fix it, because SSDO is really a revolutionary upgrade!
- blue_max
- Posts: 2296
- Joined: Wed Mar 20, 2019 5:12 am
Thanks for reporting that DTM. I suspect it's got to do with the size of the sky dome (it's about 26Km in radius?). I'll take a look!
- DTM
- Posts: 2120
- Joined: Tue Apr 22, 2003 11:01 pm
- Contact:
Confirmed: 26,x km in radius (you may use Yavin mission for testing)
- AngeI
- Posts: 528
- Joined: Sun Jan 24, 2016 5:27 pm
Just tried this out myself (non-VR), really looks good! Though I didn't change any of the settings directly, the bloom is a tad excessive on the lasers perhaps, but it really helps give all the ships extra life to them with the engine and window lights glow on them. Fantastic work
- blue_max
- Posts: 2296
- Joined: Wed Mar 20, 2019 5:12 am
Thanks Angel. You can configure the intensity of the bloom effect in Bloom.cfg and tone down the lasers specifically if you want
- AngeI
- Posts: 528
- Joined: Sun Jan 24, 2016 5:27 pm
Ok so I've played around with it quite a bit today and created myself a test mission pushing XWA to its ship limits (the 192 ship limit that is) with a massive scale fleet battle and I've recorded 4 videos with different settings on to show what I'm seeing. I've not adjusted the other settings much beyond the resolution sample radius as suggested for 1920x1080 in the SSAO config file and any other adjustments based on whether the 32bit hook is enabled or not. Overall the SSDO 32bit is definitely the best looking however I have found one issue and I wanted to ask what settings are best to try and resolve it. When you look either straight down or up, the texture colour of all ships goes extremely dark - regardless of distance. I've shown this towards the end in both SSDO videos, just skip to around the 3min mark to see what I mean.
https://youtu.be/nHzn0Z9XVIA - SSDO 32Bit Hook Enabled
https://youtu.be/6ISDx2Ylxpk - SSDO 32Bit Hook Disabled
https://youtu.be/nAdI2NS59_o - SSAO 32Bit Hook Enabled
https://youtu.be/_xuGeNr1ThA - SSAO 32Bit Hook Disabled
All vids have Diffuse and Lighting set to Off from the general settings though I did also record vids with those settings turned on but have not uploaded them.
Also if anyone wants the mission file I created here then I can put it in a dropbox link for download. All the capital ships are invincible and it has many waves of fighters so it will go on for quite some time if needed. The player ship is a neutral faction and won't be targeted.
https://youtu.be/nHzn0Z9XVIA - SSDO 32Bit Hook Enabled
https://youtu.be/6ISDx2Ylxpk - SSDO 32Bit Hook Disabled
https://youtu.be/nAdI2NS59_o - SSAO 32Bit Hook Enabled
https://youtu.be/_xuGeNr1ThA - SSAO 32Bit Hook Disabled
All vids have Diffuse and Lighting set to Off from the general settings though I did also record vids with those settings turned on but have not uploaded them.
Also if anyone wants the mission file I created here then I can put it in a dropbox link for download. All the capital ships are invincible and it has many waves of fighters so it will go on for quite some time if needed. The player ship is a neutral faction and won't be targeted.
- Jaeven
- Posts: 578
- Joined: Mon Mar 30, 2015 3:18 am
Bit off topic, but is there any way you could upload that TIE Fighter soundtrack for XWA? It's magnificent.AngeI wrote: ↑Sun Nov 17, 2019 8:15 pmOk so I've played around with it quite a bit today and created myself a test mission pushing XWA to its ship limits (the 192 ship limit that is) with a massive scale fleet battle and I've recorded 4 videos with different settings on to show what I'm seeing. I've not adjusted the other settings much beyond the resolution sample radius as suggested for 1920x1080 in the SSAO config file and any other adjustments based on whether the 32bit hook is enabled or not. Overall the SSDO 32bit is definitely the best looking however I have found one issue and I wanted to ask what settings are best to try and resolve it. When you look either straight down or up, the texture colour of all ships goes extremely dark - regardless of distance. I've shown this towards the end in both SSDO videos, just skip to around the 3min mark to see what I mean.
https://youtu.be/nHzn0Z9XVIA - SSDO 32Bit Hook Enabled
https://youtu.be/6ISDx2Ylxpk - SSDO 32Bit Hook Disabled
https://youtu.be/nAdI2NS59_o - SSAO 32Bit Hook Enabled
https://youtu.be/_xuGeNr1ThA - SSAO 32Bit Hook Disabled
All vids have Diffuse and Lighting set to Off from the general settings though I did also record vids with those settings turned on but have not uploaded them.
Also if anyone wants the mission file I created here then I can put it in a dropbox link for download. All the capital ships are invincible and it has many waves of fighters so it will go on for quite some time if needed. The player ship is a neutral faction and won't be targeted.
- DTM
- Posts: 2120
- Joined: Tue Apr 22, 2003 11:01 pm
- Contact:
In these years people used to say to me: "Why do you spend all this time working on a game that is years old? Forget it!" I'm glad I didn't listen to them.
- Phoenix Leader
- Posts: 437
- Joined: Wed Aug 08, 2018 2:20 pm
To commemorate all those victories in battles we fought against overwhelming forces."Why do you spend all this time working on a game that is years old?"
Great work everyone!
- blue_max
- Posts: 2296
- Joined: Wed Mar 20, 2019 5:12 am
That's a known problem with the current implementation of SSDO, Angel. Sorry, I probably should've been more explicit. I think I mentioned that the implementation isn't 100% correct (or something to that effect) and this is one of the problems that I'll try to fix in the next release. There isn't much you can do right now -- sorry again.
- AngeI
- Posts: 528
- Joined: Sun Jan 24, 2016 5:27 pm
No worries, thanks for the clarification. Superb work otherwise.blue_max wrote: ↑Tue Nov 19, 2019 1:18 amThat's a known problem with the current implementation of SSDO, Angel. Sorry, I probably should've been more explicit. I think I mentioned that the implementation isn't 100% correct (or something to that effect) and this is one of the problems that I'll try to fix in the next release. There isn't much you can do right now -- sorry again.
I'll ask if its ok, its being used for TFTC which I'm helping BMan with by redoing all the missions
This and also the fact no one ever made a Star Wars flight sim game better than this. The modern Battlefront combat can quite frankly f**k right off
-
- Posts: 29
- Joined: Thu Jun 16, 2011 7:23 pm
This is pretty awesome looking. So, to use it, all I need to do is move the contents of the download into the root XWA folder, right?