Page 2 of 3

Re: Approximate Global Illumination Shaders

Posted: Thu Oct 31, 2019 11:31 pm
by Trevor
Holly crap... I cant wait to test, please upload that dll! :P

Trev

Re: Approximate Global Illumination Shaders

Posted: Fri Nov 01, 2019 11:23 am
by Vince T
:shock: .... what he said !

Re: Approximate Global Illumination Shaders

Posted: Wed Nov 06, 2019 6:07 am
by blue_max
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.
ssdo9.jpg
BTW, I'm already thinking about the next effects. How about HDR rendering?

Re: Approximate Global Illumination Shaders

Posted: Wed Nov 06, 2019 8:04 am
by MamiyaOtaru
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

Re: Approximate Global Illumination Shaders

Posted: Wed Nov 06, 2019 10:31 am
by Vince T
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?

Re: Approximate Global Illumination Shaders

Posted: Wed Nov 06, 2019 6:58 pm
by blue_max
@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:
ssdo10.jpg
And here, the secondary light provides enough illumination so that the effect becomes subtle:
ssdo11.jpg
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.

Re: Approximate Global Illumination Shaders

Posted: Wed Nov 06, 2019 7:15 pm
by blue_max
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:
ssdo12.jpg
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:
ssdo13.jpg

Re: Approximate Global Illumination Shaders

Posted: Thu Nov 07, 2019 7:01 am
by blue_max
blue_max wrote:
Wed Nov 06, 2019 6:58 pm
I'll upload a sample config file later today if you want to try it out before I do the official release.
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

Re: Approximate Global Illumination Shaders

Posted: Fri Nov 08, 2019 1:50 am
by Kampher
Thank you blue_max. This is amazing stuff!

Re: Approximate Global Illumination Shaders

Posted: Fri Nov 08, 2019 7:32 am
by MamiyaOtaru
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 :D

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.

Re: Approximate Global Illumination Shaders

Posted: Fri Nov 08, 2019 4:13 pm
by DarHan
Yeah, I noticed those halos too on my end.

Re: Approximate Global Illumination Shaders

Posted: Fri Nov 08, 2019 7:03 pm
by blue_max
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.

Re: Approximate Global Illumination Shaders

Posted: Mon Nov 11, 2019 6:51 am
by blue_max
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...

Re: Approximate Global Illumination Shaders

Posted: Thu Nov 14, 2019 9:39 pm
by DTM
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:

Image

I hope you are able to fix it, because SSDO is really a revolutionary upgrade!

Re: Approximate Global Illumination Shaders

Posted: Fri Nov 15, 2019 8:17 am
by blue_max
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!

Re: Approximate Global Illumination Shaders

Posted: Fri Nov 15, 2019 4:29 pm
by DTM
Confirmed: 26,x km in radius (you may use Yavin mission for testing)

Re: Approximate Global Illumination Shaders

Posted: Sat Nov 16, 2019 1:52 pm
by AngeI
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 :)

Re: Approximate Global Illumination Shaders

Posted: Sat Nov 16, 2019 6:23 pm
by blue_max
Thanks Angel. You can configure the intensity of the bloom effect in Bloom.cfg and tone down the lasers specifically if you want

Re: Approximate Global Illumination Shaders

Posted: Sun Nov 17, 2019 8:15 pm
by AngeI
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.

Re: Approximate Global Illumination Shaders

Posted: Sun Nov 17, 2019 11:08 pm
by Jaeven
AngeI wrote:
Sun Nov 17, 2019 8:15 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.
Bit off topic, but is there any way you could upload that TIE Fighter soundtrack for XWA? It's magnificent.

Re: Approximate Global Illumination Shaders

Posted: Sun Nov 17, 2019 11:37 pm
by DTM
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.

Re: Approximate Global Illumination Shaders

Posted: Sun Nov 17, 2019 11:57 pm
by Phoenix Leader
"Why do you spend all this time working on a game that is years old?"
To commemorate all those victories in battles we fought against overwhelming forces.

Great work everyone!

Re: Approximate Global Illumination Shaders

Posted: Tue Nov 19, 2019 1:18 am
by blue_max
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.

Re: Approximate Global Illumination Shaders

Posted: Wed Nov 20, 2019 9:15 pm
by AngeI
blue_max wrote:
Tue Nov 19, 2019 1:18 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.
No worries, thanks for the clarification. Superb work otherwise. :)

Jaeven wrote:
Sun Nov 17, 2019 11:08 pm
Bit off topic, but is there any way you could upload that TIE Fighter soundtrack for XWA? It's magnificent.
I'll ask if its ok, its being used for TFTC which I'm helping BMan with by redoing all the missions :)

DTM wrote:
Sun Nov 17, 2019 11:37 pm
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.
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 :D

Re: Approximate Global Illumination Shaders

Posted: Fri Dec 06, 2019 3:05 pm
by Wotan Weave
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?