Comments on: Screen Space Ambient Occlusion Only Affects Exterior Stuff https:/2017/02/screen-space-ambient-occlusion-only-affects-exterior-stuff/ Developer resources for the X-Plane flight simulator Wed, 22 Feb 2017 17:27:32 +0000 hourly 1 https://wordpress.org/?v=6.6.1 By: Ben Supnik https:/2017/02/screen-space-ambient-occlusion-only-affects-exterior-stuff/#comment-17613 Wed, 22 Feb 2017 17:27:32 +0000 http://xplanedev.wpengine.com/?p=7427#comment-17613 In reply to John.

The shadows occlude direct sunlight but not ambient light. So the ‘color’ of the shadows is “Everything but the sun.”

For the GL nerds: the sun is an analytic light in X-Plane, as are all HDR “spill” light sources and any pre-defined lights on the plane from plane-maker (e.g. 3 inside spots, or a landing light).

Everything else is image-based.

]]>
By: Ben Supnik https:/2017/02/screen-space-ambient-occlusion-only-affects-exterior-stuff/#comment-17612 Wed, 22 Feb 2017 17:26:15 +0000 http://xplanedev.wpengine.com/?p=7427#comment-17612 In reply to jörn-jören jörensön.

There are easy ways to get them, but getting them 1. fast and 2. without latency is tricky.

You can read them back later, or do an on-GPU resample and use them as guesses. Some engines do a very crude low-res rasterization to get culling and Z information up front.

]]>
By: jörn-jören jörensön https:/2017/02/screen-space-ambient-occlusion-only-affects-exterior-stuff/#comment-17609 Wed, 22 Feb 2017 15:04:21 +0000 http://xplanedev.wpengine.com/?p=7427#comment-17609 In reply to Ben Supnik.

– Hope this is not totally stupid, as my last time programming realtime 3d was over 10 years ago. –
I guess, there is no easy way to get min/max values from Z-buffer to get the Z range?
(At least as an approximation for the next frame.)

]]>
By: John https:/2017/02/screen-space-ambient-occlusion-only-affects-exterior-stuff/#comment-17598 Tue, 21 Feb 2017 22:32:03 +0000 http://xplanedev.wpengine.com/?p=7427#comment-17598 Ben,

This is related to shadow comments above, but not a response to any of them in particular:

How are the shadows “lit”? Ie, are they just kinda black, or do they get lighting from the sky color (like happens in real life?) some of the day time darkness of shadows would be mitigated by that huge blue area lamp hanging in the air 🙂

Secondly, and I don’t have the hardware for it and won’t for years, so don’t think this is a “me now, feature request now now!” sort of thing – but are there thoughts about not fading shadows out near sunset? Thats kinda when they should be most prominent, but I can also imagine it not being fun to try to render shadows across miles of scenery or calculate the proper blurring you’d get in those situations.

]]>
By: Ben Supnik https:/2017/02/screen-space-ambient-occlusion-only-affects-exterior-stuff/#comment-17596 Tue, 21 Feb 2017 20:14:31 +0000 http://xplanedev.wpengine.com/?p=7427#comment-17596 In reply to Bob Marsh.

“the quite extensive explanation that you gave regarding 2d lighting changes in this forum in late November” – do you have a link to that?

I can tell you that this change (dropping support for 2-d pre-baked spills in 3-d cockpits is not new – it’s been planned for a very long time.

A v10 airplane that uses this technique will need _some_ kind of change, e.g. adding 3-d spill lights, adding a _LIT texture to the 3-d cockpit, adding lit generics to the 2-d panel – it’s up to the author.

]]>
By: Ben Supnik https:/2017/02/screen-space-ambient-occlusion-only-affects-exterior-stuff/#comment-17594 Tue, 21 Feb 2017 20:11:58 +0000 http://xplanedev.wpengine.com/?p=7427#comment-17594 In reply to Mike.

Right – the original CSM paper by NV showed a “huge” scene…5 km! I thought that was sort of adorable. 🙂

The big problem they have right now is that it’s hard to know the interesting content range – if you are looking down at the plane from 100m up in a free camera, if we could know that the entire scene is within the first N meters of Z (in camera space) we could tighten up our cascade in a big way and get a big res win back. Since we don’t know the Z range, often shadow res is wasted “underground”.

]]>
By: Mike https:/2017/02/screen-space-ambient-occlusion-only-affects-exterior-stuff/#comment-17590 Tue, 21 Feb 2017 12:14:01 +0000 http://xplanedev.wpengine.com/?p=7427#comment-17590 In reply to Ben Supnik.

No, it was in another project. My shadow maps probably weren’t as huge as the ones in X-Plane. True, cascading SM adds complexity as well, but you could definitely combine it with PCF.

Glad to head it’s on your todo list 🙂

]]>
By: Bob Marsh https:/2017/02/screen-space-ambient-occlusion-only-affects-exterior-stuff/#comment-17582 Tue, 21 Feb 2017 02:30:50 +0000 http://xplanedev.wpengine.com/?p=7427#comment-17582 In reply to Ben Supnik.

I think that you are telling me that the quite extensive explanation that you gave regarding 2d lighting changes in this forum in late November is now not being supported as a method to upgrade legacy aircraft.
Could you comment on whether this then requires a redesign of the aircraft to operate them in XP11.
I own the aircraft (many) but I do not understand their internal design, nor can I legally make changes to them.

]]>
By: Ben Supnik https:/2017/02/screen-space-ambient-occlusion-only-affects-exterior-stuff/#comment-17573 Mon, 20 Feb 2017 16:31:26 +0000 http://xplanedev.wpengine.com/?p=7427#comment-17573 In reply to Mike.

Did you achieve this by modifying X-Plane’s shaders or in another project?

The problem with X-Plane isn’t the filtering, it’s the resolution and distribution of cascades. This is on my list of things to tune, but it’s a hard problem in x-plane becase the world is very open and unstructured.

]]>
By: Ben Supnik https:/2017/02/screen-space-ambient-occlusion-only-affects-exterior-stuff/#comment-17572 Mon, 20 Feb 2017 16:30:04 +0000 http://xplanedev.wpengine.com/?p=7427#comment-17572 In reply to Bob Marsh.

What you consider to be a 2-d panel lighting “bug” is _not_ being fixed. Using the 2-d baked lighting directly mapped to the 3-d panel is gone forever in X-Plane 11. The X-Plane 11 lighting engine requires _source materials_, not _finished products_ to do its lighting. You can continue to use these techniques on your 2-d panel.

]]>