Board index FlightGear Media

The Cub on ALS. Or maybe Rembrandt?

Screenshots, videos, sound recording etc. taken in/with FlightGear.

The Cub on ALS. Or maybe Rembrandt?

Postby icecode » Tue Jan 22, 2019 6:15 pm

No fancy story or flying skills, I even left the pilot door open! But hopefully that's ok. :)

Image

Image

Image

Image
icecode
 
Posts: 709
Joined: Thu Aug 12, 2010 1:17 pm
Location: Spain
Version: next
OS: Fedora

Re: The Cub on ALS. Or maybe Rembrandt?

Postby legoboyvdlp » Tue Jan 22, 2019 6:24 pm

Oooh - nice! How is performance affected compared to standard ALS?
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: The Cub on ALS. Or maybe Rembrandt?

Postby icecode » Tue Jan 22, 2019 6:31 pm

It's still experimental, but I measured around 6ms/8ms spent on shadows, which is not bad considering how expensive cascaded shadow mapping is. With multithreading enabled you could maybe squeeze a few ms (2-3ms). It also depends on scene complexity: random buildings are considered for the shadow map and have to be culled, which increases the cull time for each cascade a lot. That could be solved by not rendering them at all. :)
icecode
 
Posts: 709
Joined: Thu Aug 12, 2010 1:17 pm
Location: Spain
Version: next
OS: Fedora

Re: The Cub on ALS. Or maybe Rembrandt?

Postby lomar » Tue Jan 22, 2019 6:46 pm

OH MY GOD!! I CANT BELIEVE YOU COULD MAKE IT!! THAT LOOKS SOO AWESOME!!!!!!!!!!!!!!!!!
justo hope it doesnt eat much of the fps tho
lomar
 
Posts: 479
Joined: Mon Jun 30, 2014 2:38 am
Location: Rio de Janeiro, Brazil
Callsign: lomar
Version: nightly
OS: win 10

Re: The Cub on ALS. Or maybe Rembrandt?

Postby legoboyvdlp » Tue Jan 22, 2019 7:21 pm

Yep - according to the post above it takes about 8ms more per frame. So if you have 30 fps that is 1/30 ms or about 33 ms. Another 8 brings it to 41 ms -- 1 / 0.041 = 24.

So it would lower 30fps to 24fps -- well worth it I think!

(and I hope my maths is right :D )
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: The Cub on ALS. Or maybe Rembrandt?

Postby icecode » Tue Jan 22, 2019 8:17 pm

THAT LOOKS SOO AWESOME!!!!!!!!!!!!!!!!!

Thanks! :D
(and I hope my maths is right :D )

Absolutely correct!
icecode
 
Posts: 709
Joined: Thu Aug 12, 2010 1:17 pm
Location: Spain
Version: next
OS: Fedora

Re: The Cub on ALS. Or maybe Rembrandt?

Postby wlbragg » Tue Jan 22, 2019 9:01 pm

Did you have to do anything special to eliminate the existing ALS shadow cube shader, IE did you simply have to use the "Rembrandt" flag?
I can't remember the last time I even tried using default renderer or Rembrandt.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7587
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: The Cub on ALS. Or maybe Rembrandt?

Postby icecode » Tue Jan 22, 2019 9:05 pm

My bad, this isn't Rembrandt. It was a joke referring to the shadows. This is all based around the compositor using existing ALS shaders.
icecode
 
Posts: 709
Joined: Thu Aug 12, 2010 1:17 pm
Location: Spain
Version: next
OS: Fedora

Re: The Cub on ALS. Or maybe Rembrandt?

Postby wlbragg » Tue Jan 22, 2019 9:31 pm

So you eliminated the existing ALS shadow cube shader, how? I'm just curious how much xml code reconfiguration you had to deal with, if any?

Looks great!

Does this shadow then translate and rotate correctly across all object surfaces in the cockpit, ie: knobs sliders, etc?
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7587
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: The Cub on ALS. Or maybe Rembrandt?

Postby icecode » Tue Jan 22, 2019 9:54 pm

I might be using an old (really old) version of the Cub, it doesn't have a fake shadow. In fact I've always used this version of the Cub for rendering tests because it looks good, uses default materials, has some complex geometry to test edge cases and loads fast.

Does this shadow then translate and rotate correctly across all object surfaces in the cockpit, ie: knobs sliders, etc?


In theory, yes. And also in practice. But the ALS cockpit shadows still look better. Shadow maps inherently suffer from some flickering and aliasing, even if a good filter is applied. They are very stable, but can still be distracting for some people. They are a good fallback though if the aircraft doesn't support ALS cockpit shadows.
icecode
 
Posts: 709
Joined: Thu Aug 12, 2010 1:17 pm
Location: Spain
Version: next
OS: Fedora

Re: The Cub on ALS. Or maybe Rembrandt?

Postby wlbragg » Wed Jan 23, 2019 12:48 am

I might be using an old (really old) version of the Cub

Nope, not as old as you might think. Having the 3d mag switch and carb heat tells me it is relatively current. It's the YASim version which does load fast and doesn't contain any of the slower loading complexity of all the gear and utility change-outs nor does it have any ALS effects.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7587
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: The Cub on ALS. Or maybe Rembrandt?

Postby Thorsten » Wed Jan 23, 2019 8:23 am

Great job! :D

For those who are interested in the different shadow techniques, the pros and cons are:

* the opacity map is based on pre-rendered geometry for a certain situation (all shadowing geometry forms a 'box with holes')
-> if that assumption is true, the opacity map is exact, to the degree that the geometry is open and more spread out (the Cub wings for instance) it will gradually fail, for a situation without inside or outside it won't really work that well

* the shadow map is based on an extra pass rendering the geometry in-sim to a texture based on relative sun position
-> short of any optics effects, that always gives the correct shadows

From that we can note:

Opacity map

Pros

* very fast and framerate friendly
* able to do variable blur shadows, semi-transparent shadows, tinted glass, caustics
* no flickering

Cons

* needs extra developer work
* not applicable to all situations

Shadow map

Pros

* produces always correct shadows
* works 'out of the box'

Cons

* can't handle transparency
* costs more performance
* tends to flicker

But... we can have the best of both worlds, since we'll keep the option to run opacity map on a surface (which disables the shadow map for it) - so in situations where the opacity map is applicable, we can use it, and otherwise use the shadow map.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am


Return to Media

Who is online

Users browsing this forum: No registered users and 6 guests