A New Shading Model

Want to edit the game, build your own craft and missions? Here you'll find help, tools, guides and people to discuss with.

Re: A New Shading Model

Kampher
Cadet 2nd Class
Posts: 79
Joined: Tue May 09, 2006 11:01 pm

Post by Kampher » Sun Feb 09, 2020 10:21 pm

Very impressive.

User avatar
rogue518
XWAU Member
Posts: 2856
Joined: Wed Jul 12, 2000 11:01 pm
Contact:

Post by rogue518 » Mon Feb 10, 2020 1:38 am

This is awesome blue_max…….

Sincerely, Rogue518
'Stay in Attack formation!' Darth Vader aka: Anakin Skywalker During the 'Battle Of Yavin'

User avatar
Trevor
Lieutenant JG
Posts: 541
Joined: Thu Dec 04, 2014 7:11 pm

Post by Trevor » Mon Feb 10, 2020 10:12 am

Very nice.

Good to know there is scope to do these effects in ddraw. Its amazing what the rendering engine is able to do with the old game base :)

Trev

User avatar
AngeI
Lieutenant JG
Posts: 525
Joined: Sun Jan 24, 2016 5:27 pm

Post by AngeI » Tue Feb 11, 2020 3:56 pm

This is gorgeous, great work! Is this replacing the previous SSDO/SSAO work you did? If so does it resolve the issue where when you look straight up or down on a ship, the textures go very dark?

User avatar
blue_max
XWAU Member
Posts: 2295
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Tue Feb 11, 2020 6:51 pm

Thanks for your comments guys.

I've partially (mostly) fixed the problem you reported in SSDO when looking vertically, AngeI. The surfaces still become a little dark; but not as much. But yes, the intention is that this new Shading Model will eventually replace/complement the existing SSDO/SSAO. For the first release of these shaders, I'm going to add a new mode that is just a regular deferred renderer without SSAO/SSDO. All the screenshots I've posted here were taken with SSAO/SSDO disabled and I think it looks good enough to be its own setting.

I believe I can combine SSAO with this shaders in a very straightforward way (SSAO will be come the ambient component in Phong's shading equation).

For SSDO, however, I've got two options: combine it with this model as if it were SSAO, or rewrite it altogether to make it technically correct. When I wrote SSDO I had to take a few shortcuts because I didn't have access to the smooth normals. But now that we have overcome this problem, I can go back and revisit all the equations and fix it properly. This step will take a while, though. So that's why I plan to release the deferred shader mode first.

User avatar
AngeI
Lieutenant JG
Posts: 525
Joined: Sun Jan 24, 2016 5:27 pm

Post by AngeI » Fri Feb 14, 2020 10:02 pm

Sounds great, keep up the awesome work and can't wait to try it all out! :D

User avatar
blue_max
XWAU Member
Posts: 2295
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Thu Feb 27, 2020 6:02 am

The New Shading Model was included in the latest release (1.1.1) which can be downloaded here:

EDIT: Fixed the POV hat/keypad issue reported below
https://www.dropbox.com/s/3dz5egxfboeg4 ... 1.zip?dl=0

A few more screenshots:
new-shading-model-1.jpg
new-shading-model-4.jpg
new-shading-model-6.jpg
In this release, material files can be used to specify materials per texture per OPT. Future releases will include support to sideload additional textures to define material properties through textures.

SSAO and SSDO work in this release. I've fixed a few bugs in SSDO; but it's still not 100% correct. I'm working on fixing it right now.
You do not have the required permissions to view the files attached to this post.
Last edited by blue_max on Tue Mar 03, 2020 6:45 pm, edited 1 time in total.

MamiyaOtaru
Cadet 4th Class
Posts: 18
Joined: Mon Nov 04, 2019 4:17 am

Post by MamiyaOtaru » Thu Feb 27, 2020 8:05 am

what if anything are you doing for antialiasing? I'm not seeing much aliasing in your shots, but IIRC MSAA is disabled when using SSAO/SSDO. Are you using something like FXAA or super sampling AA? The jaggies I am getting are a bummer

User avatar
rogue518
XWAU Member
Posts: 2856
Joined: Wed Jul 12, 2000 11:01 pm
Contact:

Post by rogue518 » Thu Feb 27, 2020 1:41 pm

blue_max.... thanks for the latest files saw them this morning about 05:30 EST downloaded it will install it when I get home from work.... :D

Edit: This is AWESOME!!!! I was really impressed with the Imperial Hangers and Imperial star fighters, the metallic look it has, Xwing Alliance has a whole new environmental feel to it now, in my opinion... ;)

Sincerely, Rogue518
Last edited by rogue518 on Sat Feb 29, 2020 4:24 pm, edited 6 times in total.
'Stay in Attack formation!' Darth Vader aka: Anakin Skywalker During the 'Battle Of Yavin'

User avatar
blue_max
XWAU Member
Posts: 2295
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Thu Feb 27, 2020 6:29 pm

MamiyaOtaru wrote:
Thu Feb 27, 2020 8:05 am
what if anything are you doing for antialiasing?
I'm not using any form of antialiasing. The original screenshots are in 4k; but I downsize them to 2k before posting because the original files are too large. I think the process of downsizing also smooths out some of the jaggies -- so I'm sorry if that gave the wrong impression.

I have received several comments about MSAA, so I'm going to try and fix that in the next release.

User avatar
blue_max
XWAU Member
Posts: 2295
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Thu Feb 27, 2020 7:36 pm

blue_max wrote:
Thu Feb 27, 2020 6:29 pm
I have received several comments about MSAA, so I'm going to try and fix that in the next release.
... or I could just add an FXAA shader since it's apparently faster than MSAA.

User avatar
keiranhalcyon7
Lieutenant JG
Posts: 599
Joined: Tue Jan 02, 2018 6:41 am

Post by keiranhalcyon7 » Thu Feb 27, 2020 9:36 pm

blue_max wrote:
Thu Feb 27, 2020 6:29 pm
MamiyaOtaru wrote:
Thu Feb 27, 2020 8:05 am
what if anything are you doing for antialiasing?
I'm not using any form of antialiasing. The original screenshots are in 4k; but I downsize them to 2k before posting because the original files are too large. I think the process of downsizing also smooths out some of the jaggies -- so I'm sorry if that gave the wrong impression.
That's basically how SSAA/FSAA works. Oversample and downscale.
blue_max wrote:
Thu Feb 27, 2020 7:36 pm
... or I could just add an FXAA shader since it's apparently faster than MSAA.
Fast approXimate AA is faster than multisampling AA? Who'd have guessed?

Snark aside, it would be a cool option to have.

User avatar
blue_max
XWAU Member
Posts: 2295
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Thu Feb 27, 2020 10:58 pm

keiranhalcyon7 wrote:
Thu Feb 27, 2020 9:36 pm
Fast approXimate AA is faster than multisampling AA? Who'd have guessed?
Well, I didn't know what it was just yesterday :D

User avatar
DTM
Fleet Admiral (Administrator)
Posts: 2119
Joined: Tue Apr 22, 2003 11:01 pm
Contact:

Post by DTM » Fri Feb 28, 2020 8:55 am

Wonderful work!!!!! :applaus: :applaus: :applaus:
This patch is significantly improved. A beauty for the eyes!

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Fri Feb 28, 2020 8:19 pm

Nice

Bman
Lieutenant Commander
Posts: 1167
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Sat Feb 29, 2020 5:35 am

Cool!
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

User avatar
rogue518
XWAU Member
Posts: 2856
Joined: Wed Jul 12, 2000 11:01 pm
Contact:

Post by rogue518 » Sun Mar 01, 2020 1:34 pm

Blue_max I did notice one minor little problem with this awesome shader... when using your joystick (hat) you can't scroll down in the cockpit.

Sincerely, Rogue518
'Stay in Attack formation!' Darth Vader aka: Anakin Skywalker During the 'Battle Of Yavin'

User avatar
Vince T
Fleet Admiral (Administrator)
Posts: 14045
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Sun Mar 01, 2020 1:49 pm

Same goes for the keypad. It only lets you look for a tiny bit in each direction before snapping back to center view.
Of course, target-follow view still works.
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear

User avatar
rogue518
XWAU Member
Posts: 2856
Joined: Wed Jul 12, 2000 11:01 pm
Contact:

Post by rogue518 » Sun Mar 01, 2020 4:32 pm

Thanks General Trageton, forgot about that part...

General Trageton said:

It only lets you look for a tiny bit in each direction before snapping back to center view.
you are correct.

Sincerely, Rogue518
'Stay in Attack formation!' Darth Vader aka: Anakin Skywalker During the 'Battle Of Yavin'

User avatar
blue_max
XWAU Member
Posts: 2295
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Mon Mar 02, 2020 7:41 pm

Thanks for reporting the bug, I'll fix it.

EDIT: I've fixed the problem. It was a bug in the cockpit look hook. The new version of the hook can be downloaded here:

https://www.dropbox.com/s/mz979e2q6vdgk ... 2.zip?dl=0

But I've also updated the link to version 1.1.1 above

User avatar
rogue518
XWAU Member
Posts: 2856
Joined: Wed Jul 12, 2000 11:01 pm
Contact:

Post by rogue518 » Wed Mar 04, 2020 2:35 am

Thanks blue_max…. it's working..... ;)

Sincerely, Rogue518
'Stay in Attack formation!' Darth Vader aka: Anakin Skywalker During the 'Battle Of Yavin'

User avatar
Vince T
Fleet Admiral (Administrator)
Posts: 14045
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Wed Mar 04, 2020 8:27 pm

Hmmm I'm having some trouble with the new ddraw package. The models themselves look great, however the UI overlays and other 2D effects are having problems:
- The transparent parts of HUD elements put an addition effect over any 3D objects, brightening it
- Engine glows have a rectangular bounding box
- The inside of lasers is black or transparent

I'm using the files 1:1 as they come out of the zip. Am I doing something wrong?

Here's some images:
bug.jpg
bug2.jpg
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

User avatar
blue_max
XWAU Member
Posts: 2295
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Wed Mar 04, 2020 9:15 pm

You should not be seeing these artifacts, GT. Are you perhaps running on Win7? Did you turn anti-aliasing on?

User avatar
keiranhalcyon7
Lieutenant JG
Posts: 599
Joined: Tue Jan 02, 2018 6:41 am

Post by keiranhalcyon7 » Wed Mar 04, 2020 9:45 pm

Whoa whoa whoa - slightly OT, but you see in GT's image where the radio message is displayed, how the overlay is all saw-toothed? Justagai/Jeremy, any idea what's causing that? Seeing it, I suspect it may be (or share) the root cause of the font corruption when HUD scale is >= 1.5. (GT, what's your HUD scale value?)

User avatar
rogue518
XWAU Member
Posts: 2856
Joined: Wed Jul 12, 2000 11:01 pm
Contact:

Post by rogue518 » Thu Mar 05, 2020 12:19 am

blue_max and General Tregoton, just to be clear.... I just installed the hook ( Cockpitlook) package...

Sincerely, Rogue518
'Stay in Attack formation!' Darth Vader aka: Anakin Skywalker During the 'Battle Of Yavin'

Post Reply