A New Shading Model
A New Shading Model
- blue_max
- Posts: 2296
- Joined: Wed Mar 20, 2019 5:12 am
Because Jeremy is a genius, he figured out a way to send the smooth normals from XWA down to ddraw and wrote a hook for this. I've been tinkering with this hook to add specular shading to SSDO, along with some bloom to get a look that resembles HDR. This is still a preview; but this is what it looks like:
And yes, I know the bloom is a bit exaggerated, I just wanted to make sure it was working -- it can be adjusted. In fact, I think it will now be possible to specify per-texture materials so that we can vary the specular intensity, glossiness, metallicity, etc to fine tune the effect for each craft. The idea is to end up with a set of parameters close to what is currently being used in the industry for PBR shading (or what Blender calls "Principled/Ultimate Shader"). It might even be possible to side-load textures that specify glossiness/metallicity, normal mapping and stuff like that.
In other words, there's going to be even more eye candy for this game in the near future.
And yes, I know the bloom is a bit exaggerated, I just wanted to make sure it was working -- it can be adjusted. In fact, I think it will now be possible to specify per-texture materials so that we can vary the specular intensity, glossiness, metallicity, etc to fine tune the effect for each craft. The idea is to end up with a set of parameters close to what is currently being used in the industry for PBR shading (or what Blender calls "Principled/Ultimate Shader"). It might even be possible to side-load textures that specify glossiness/metallicity, normal mapping and stuff like that.
In other words, there's going to be even more eye candy for this game in the near future.
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
A few more samples:
You do not have the required permissions to view the files attached to this post.
“Red Four, nothing’s gone wrong yet.”
— Hobbie Klivian
— Hobbie Klivian
- keiranhalcyon7
- Posts: 599
- Joined: Tue Jan 02, 2018 6:41 am
Sweeeeet!
That's what it looks like on a cockpit. What's it look like on an ISD's hull panels?
That's what it looks like on a cockpit. What's it look like on an ISD's hull panels?
- rogue518
- Posts: 2867
- Joined: Wed Jul 12, 2000 11:01 pm
- Contact:
blue_max this is astounding!!!.
Sincerely, Rogue518
Sincerely, Rogue518
'Stay in Attack formation!' Darth Vader aka: Anakin Skywalker During the 'Battle Of Yavin'
-
- Posts: 52
- Joined: Sun Aug 25, 2019 10:02 pm
WOW!
Maybe I really wasn't joking when I wrote that XWA will soon get state-of-the-art graphics.
What's missing would be multithreaded renderer and real shadows (maybe these can't be fixed ever).
Maybe I really wasn't joking when I wrote that XWA will soon get state-of-the-art graphics.
What's missing would be multithreaded renderer and real shadows (maybe these can't be fixed ever).
- blue_max
- Posts: 2296
- Joined: Wed Mar 20, 2019 5:12 am
Thanks for your comments guys! There's still a lot of details I need to fix; but I'll get there. For instance, it's becoming increasingly obvious that I'm going to need to specify glossiness parameters for each texture independently. There isn't a single setting that works well for everything -- and there's some surfaces that need to stay matte, like the asteroids. So there's still a lot to do.
Does anyone know of a reasonably good software that upscales textures? I've heard that there are some AI algorithms that to these things. I might need to upscale a few textures, like the ISD above, to get better results.
It looks shiny.. and a bit pixelated tookeiranhalcyon7 wrote: ↑Fri Jan 31, 2020 9:33 pmThat's what it looks like on a cockpit. What's it look like on an ISD's hull panels?
Does anyone know of a reasonably good software that upscales textures? I've heard that there are some AI algorithms that to these things. I might need to upscale a few textures, like the ISD above, to get better results.
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
A few more samples, with regular diffuse shading and diffuse + specular:
There are a few areas in this cockpit that need less glossiness (and also maybe less normal mapping too). As I said, these are previews and there's still lots of things to fix!
There are a few areas in this cockpit that need less glossiness (and also maybe less normal mapping too). As I said, these are previews and there's still lots of things to fix!
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
The following picture highlights another problem I've got to deal with: the normals in some of the OPTs are probably wrong (?) Notice how the illumination is inconsistent between the ISD in the foreground and the Imperial Research Station on the background. I don't know if the normals are OK on both models.
Does anyone know of a tool to "fix" the normals on the OPTs automatically?
Does anyone know of a tool to "fix" the normals on the OPTs automatically?
You do not have the required permissions to view the files attached to this post.
- Vince T
- Posts: 14056
- Joined: Fri Apr 27, 2001 11:01 pm
- Contact:
sort of, there's a program called XWA OPTer or OPT fix which automatically recalculates all the normals. It's available from DS' site. Also, Jeremy made his own version of it.
Looks incredible by the way. Must test with VSD....
Looks incredible by the way. Must test with VSD....
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
- Trevor
- Posts: 541
- Joined: Thu Dec 04, 2014 7:11 pm
Well, yes, textures will need to specify their own properties. (Glass = specularity of 1, matte paint = specularity of 0)
You mentioned earlier about maybe using specular maps - that might be the better way to go since each texture has many regions (patches of glass for example)
Given that we may now have Specular ant Normal maps, it might be a good idea to start organising textures into folders of craft name. (I'm thinking Flight Simulator Style i.e.
Code: Select all
Aircraft
|-Spitfire_MkI
| |-texture
| | |-spit-l-side.bmp
| | |-spit-r-side.bmp
| |-aircraft.cfg
| |-Spitfire_MkI.air
|-Spitfire_MkIX
| |-texture
| | |-spit-l-side.bmp
| | |-spit-r-side.bmp
| |-aircraft.cfg
| |-Spitfire_MkIX.air
- blue_max
- Posts: 2296
- Joined: Wed Mar 20, 2019 5:12 am
That's right, Trevor. I'm going to have to do something like the directory tree you described. However, since I doubt that we'll have material definitions for all the ships, I still need to have a generic specular shader that will provide reasonably good results everywhere -- and then a few ships can be fine-tuned later. Right now, I'm using the original texture itself to create a "specular map" by looking at the lightness value. If it's a dark area, there specularity will be low and viceversa. Something like that. I'm getting reasonably good results right now with this approach:
No specular shading:
With spec shading + fake normal mapping:
Here's one more, with a material that looks a bit metallic:
No specular shading:
With spec shading + fake normal mapping:
Here's one more, with a material that looks a bit metallic:
You do not have the required permissions to view the files attached to this post.
- keiranhalcyon7
- Posts: 599
- Joined: Tue Jan 02, 2018 6:41 am
While that looks pretty amazing in a general sense, most Star Wars OT ship hulls are not actually metallic.
- blue_max
- Posts: 2296
- Joined: Wed Mar 20, 2019 5:12 am
Yeah, I know. Most of them are matte or have a very small specular shine to them. But I wanted to leave that material option anyway in case it's needed somewhere.keiranhalcyon7 wrote: ↑Mon Feb 03, 2020 6:40 pmWhile that looks pretty amazing in a general sense, most Star Wars OT ship hulls are not actually metallic.
- rogue518
- Posts: 2867
- Joined: Wed Jul 12, 2000 11:01 pm
- Contact:
To be honest... to me, the metallic looks kind of cool....
Edit: I agree with keiranhalcyon7 especially regarding the Naboo Fighter...
Sincerely, Rogue518
Edit: I agree with keiranhalcyon7 especially regarding the Naboo Fighter...
Sincerely, Rogue518
'Stay in Attack formation!' Darth Vader aka: Anakin Skywalker During the 'Battle Of Yavin'
- blue_max
- Posts: 2296
- Joined: Wed Mar 20, 2019 5:12 am
Still working on getting generic settings that would work even if the models are not configured for this system. I think I've got something that's a reasonable compromise. In this screen, the outside of the cockpit looks metallic:
But the inside looks matte with only a slight shine:
By default, bright/white areas will look shiny/metallic and dark/grey areas will look matte. It's not perfect; but I think it looks reasonably well, and I need to move on. I'm going to provide a set of material config files for specific cases so that. These config files will be OPT and texture-driven. For version 2, I'll try to add support to side-load metallicity/roughness textures and stuff like that.
But the inside looks matte with only a slight shine:
By default, bright/white areas will look shiny/metallic and dark/grey areas will look matte. It's not perfect; but I think it looks reasonably well, and I need to move on. I'm going to provide a set of material config files for specific cases so that. These config files will be OPT and texture-driven. For version 2, I'll try to add support to side-load metallicity/roughness textures and stuff like that.
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 also just added support for glass:
You do not have the required permissions to view the files attached to this post.
-
- Posts: 79
- Joined: Tue May 09, 2006 11:01 pm
This is amazing! What a huge difference this is all starting to make.
-
- Posts: 1170
- Joined: Mon Apr 05, 2004 11:01 pm
Very cool Blue Max. I guess this could apply to a water surface too to reflect sunlight if there ever was such an .opt made. i.e. oceans of Camino in an atmospheric mission, with buildings etc.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.
- Trevor
- Posts: 541
- Joined: Thu Dec 04, 2014 7:11 pm
Oh... with new pixelshaders you could probably actually make animated water surface... *droolllll*
Actually... getting ahead of myself here, but maybe pixelshaders are the better way to implement atmospheric missions?
Theoretically you could also have a transition from ground to space within one region using distance from ground mesh to determine atmospheric density.
Trev
Actually... getting ahead of myself here, but maybe pixelshaders are the better way to implement atmospheric missions?
Theoretically you could also have a transition from ground to space within one region using distance from ground mesh to determine atmospheric density.
Trev
- blue_max
- Posts: 2296
- Joined: Wed Mar 20, 2019 5:12 am
Yeah, this could apply to water too. Making animations would be a different project; but I think it would be doable in a PixelShader (just like the hyperspace effect). Transitions from atmosphere to space may also be possible with pixel shaders.
Also, the Dynamic Cockpit elements have proper shading now too, thanks to DTM and Jeremy:
Also, the Dynamic Cockpit elements have proper shading now too, thanks to DTM and Jeremy:
You do not have the required permissions to view the files attached to this post.