354
edits
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
{{Main article|Compositor}} | {{Main article|Compositor}} | ||
{{forum|47|Effects & Shaders}} | {{forum|47|Effects & Shaders}} | ||
| Line 8: | Line 6: | ||
<!--[[File:HDR-pipeline-preview-04-2021.png|thumb|HDR Pipeline preview screen shot]] | <!--[[File:HDR-pipeline-preview-04-2021.png|thumb|HDR Pipeline preview screen shot]] | ||
--> | --> | ||
|name = HDR Pipeline | |name = HDR Pipeline | ||
|started = 04/2021 | |started = 04/2021 | ||
|description = A modern rendering pipeline that targets relatively powerful systems | |description = A modern rendering pipeline that targets relatively powerful systems | ||
|status = | |status = In-development | ||
|developers = Fernando García Liñán <ref>https://sourceforge.net/u/fgarlin/profile/</ref> | |developers = Fernando García Liñán <ref>https://sourceforge.net/u/fgarlin/profile/</ref> | ||
|changelog = https://sourceforge.net/u/fgarlin/profile/feed.rss | |changelog = https://sourceforge.net/u/fgarlin/profile/feed.rss | ||
| Line 21: | Line 18: | ||
}} | }} | ||
The '''HDR | The '''HDR Pipeline''' is a [[Compositor]]-based rendering pipeline that attempts to bring modern rendering techniques to FlightGear, namely [https://en.wikipedia.org/wiki/High_dynamic_range high dynamic range (HDR)] and [https://en.wikipedia.org/wiki/Physically_based_rendering physically based rendering (PBR)]. It is implemented entirely in [[$FG_ROOT]] using XML for the Compositor pipeline definition and [[Effects]], and GLSL for shaders. The pipeline can be enabled with the command line argument <code>--compositor=Compositor/HDR/hdr</code>. | ||
== Background == | == Background == | ||
The [[Classic pipeline]] | The [[Classic pipeline]] relies on legacy OpenGL features, so rather than improving or reworking it, the idea of creating an entirely separate rendering pipeline from scratch started taking shape. The [[Compositor]] played the biggest role in enabling this effort as it allows the creation of new rendering pipelines entirely in FGData space without any C++ changes whatsoever, greatly reducing the amount of work that had to be done and making the iterative process of testing and debugging much faster. | ||
== Status == | == Status == | ||
'''Last updated: | '''Last updated: 04/2023''' | ||
The HDR pipeline is more or less stable, and is currently available on <tt>next</tt> for anyone adventurous enough to try it. The main issue is that [[PUI]] is not compatible, so there is no in-sim GUI. You will need to configure everything beforehand using the [[FlightGear Qt launcher|launcher]], [[command line options]], or with external tools like [[Phi]]. | |||
== Notes for aircraft developers == | |||
The pipeline | The HDR pipeline handles lighting in a completely different manner compared to [[Atmospheric light scattering|ALS]]. The pipeline will attempt to "translate" classic Effects so they display correctly by making some assumptions. These assumptions are not always correct, so your aircraft might not display correctly under the HDR pipeline. In this section we describe some steps you can follow to leverage all the power of the HDR pipeline. | ||
=== PBR and glTF === | |||
Physically-based rendering (PBR) refers to the concept of using realistic shading/lighting models along with measured surface values to accurately represent real-world materials. See this [https://marmoset.co/posts/physically-based-rendering-and-you-can-too/ webpage] for an extensive introduction to PBR and how you can create physically-based assets for your aircraft. | |||
This pipeline introduces a PBR Effect ({{fgdata file|Effects/model-pbr.eff}}). However, you don't need to assign this Effect manually. You can export your model from Blender to the [[glTF]] format and use it directly. The Blender exporter will take care of exporting the necessary textures and the FlightGear parser will automatically assign the PBR Effect to your model. Your model XML file would contain something like this: | |||
== | <syntaxhighlight lang="xml"> | ||
<?xml version="1.0" encoding="utf-8"?> | |||
<PropertyList> | |||
<path>my-aircraft.gltf</path> | |||
[...] | |||
</PropertyList> | |||
</syntaxhighlight> | |||
< | Although '''not recommended''', the PBR effect can be assigned as usual by adding an <tt><effect></tt> tag in the model XML and configuring it like you would configure [[Model-combined effect|model-combined]]. | ||
== References == | == References == | ||
edits