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 GL » Tue Jan 22, 2019 5: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 GL
 
Posts: 541
Joined: Thu Aug 12, 2010 12:17 pm
Location: Spain
Callsign: icecode
Version: GIT
OS: Arch Linux

Re: The Cub on ALS. Or maybe Rembrandt?

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

Oooh - nice! How is performance affected compared to standard ALS?
User avatar
legoboyvdlp
 
Posts: 7090
Joined: Sat Jul 26, 2014 1:28 am
Callsign: YV-LEGO
Version: 2018.3.1
OS: Windows 10 HP

Re: The Cub on ALS. Or maybe Rembrandt?

Postby Icecode GL » Tue Jan 22, 2019 5: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 GL
 
Posts: 541
Joined: Thu Aug 12, 2010 12:17 pm
Location: Spain
Callsign: icecode
Version: GIT
OS: Arch Linux

Re: The Cub on ALS. Or maybe Rembrandt?

Postby lomar » Tue Jan 22, 2019 5: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: 219
Joined: Mon Jun 30, 2014 1:38 am
Location: Rio de Janeiro, Brazil
Callsign: lomar
Version: latest
OS: win 10

Re: The Cub on ALS. Or maybe Rembrandt?

Postby legoboyvdlp » Tue Jan 22, 2019 6: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: 7090
Joined: Sat Jul 26, 2014 1:28 am
Callsign: YV-LEGO
Version: 2018.3.1
OS: Windows 10 HP

Re: The Cub on ALS. Or maybe Rembrandt?

Postby Icecode GL » Tue Jan 22, 2019 7:17 pm

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

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

Absolutely correct!
Icecode GL
 
Posts: 541
Joined: Thu Aug 12, 2010 12:17 pm
Location: Spain
Callsign: icecode
Version: GIT
OS: Arch Linux

Re: The Cub on ALS. Or maybe Rembrandt?

Postby wlbragg » Tue Jan 22, 2019 8: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(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4909
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: The Cub on ALS. Or maybe Rembrandt?

Postby Icecode GL » Tue Jan 22, 2019 8: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 GL
 
Posts: 541
Joined: Thu Aug 12, 2010 12:17 pm
Location: Spain
Callsign: icecode
Version: GIT
OS: Arch Linux

Re: The Cub on ALS. Or maybe Rembrandt?

Postby wlbragg » Tue Jan 22, 2019 8: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(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4909
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: The Cub on ALS. Or maybe Rembrandt?

Postby Icecode GL » Tue Jan 22, 2019 8: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 GL
 
Posts: 541
Joined: Thu Aug 12, 2010 12:17 pm
Location: Spain
Callsign: icecode
Version: GIT
OS: Arch Linux

Re: The Cub on ALS. Or maybe Rembrandt?

Postby wlbragg » Tue Jan 22, 2019 11:48 pm

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(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4909
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: The Cub on ALS. Or maybe Rembrandt?

Postby Thorsten » Wed Jan 23, 2019 7: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: 11086
Joined: Mon Nov 02, 2009 8:33 am


Return to Media

Who is online

Users browsing this forum: No registered users and 0 guests