A New Shading Model

Need help editing the game? Check for help here!

Moderators: Darksaber, General_Trageton, Forceflow

Re: A New Shading Model

Kampher
Cadet 3rd Class
Posts: 37
Joined: Tue May 09, 2006 11:01 pm

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

Very impressive.

rogue518
Commander
Posts: 2111
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
Cadet 1st Class
Posts: 242
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

AngeI
Cadet 4th Class
Posts: 15
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?

blue_max
Lieutenant JG
XWAU Member
Posts: 696
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.

AngeI
Cadet 4th Class
Posts: 15
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

blue_max
Lieutenant JG
XWAU Member
Posts: 696
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
Recruit
Posts: 5
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

rogue518
Commander
Posts: 2111
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'

blue_max
Lieutenant JG
XWAU Member
Posts: 696
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.

blue_max
Lieutenant JG
XWAU Member
Posts: 696
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
Ensign
Posts: 400
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.

blue_max
Lieutenant JG
XWAU Member
Posts: 696
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
Lieutenant Commander
XWAU Member
Posts: 1445
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!

MTD industries
WIPs: REBCP version 2

JeremyaFr
Lieutenant Commander
XWAU Member
Posts: 1929
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

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

Nice

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

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

Cool!
W-I-P: ISD-II, XQ-1 Platform1, (Imp) Escort Carrier, Misc, & TFTC.

rogue518
Commander
Posts: 2111
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
General_Trageton

Fleet Admiral (Administrator)
Posts: 12361
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by General_Trageton » 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 Modding HQ | Blue Phantom Chronicles WIki | My Steam Workshop

rogue518
Commander
Posts: 2111
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'

blue_max
Lieutenant JG
XWAU Member
Posts: 696
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

rogue518
Commander
Posts: 2111
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
General_Trageton

Fleet Admiral (Administrator)
Posts: 12361
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by General_Trageton » 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 Modding HQ | Blue Phantom Chronicles WIki | My Steam Workshop

blue_max
Lieutenant JG
XWAU Member
Posts: 696
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
Ensign
Posts: 400
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?)

rogue518
Commander
Posts: 2111
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