1
0
Fork 0
Commit graph

445 commits

Author SHA1 Message Date
Fahim Imaduddin Dalvi
c0e1e31674 Implement instancing for scenery objects
This commit implements instancing for scenery objects by introducing a
OBJECT_INSTANCED verb in stg files. Instances can be defined by their
positions, rotations and scales. The framework also supports extending
object instancing with custom effects, including an additional colorization
effect that allows for setting the colors for each instance of the same
model.

Detailed commit history can be found at [1], and mailing list discussions
at [2].

[1] https://sourceforge.net/u/fahimdalvi/fgdata/ci/feat/scenery-object-instancing/~/tree/
[2] https://sourceforge.net/p/flightgear/mailman/flightgear-devel/thread/7381A03F-BF5B-45E7-AAF3-5288B7DEDFFA%40gmail.com/#msg37617087

Squashed commit of the following:

commit 2af16b3dfa859eff8b9d96e1b9256e8d872d28c5
Author: Fahim Imaduddin Dalvi <dalvifahim@gmail.com>
Date:   Sat Feb 24 10:24:12 2024 +0300

    Update documentation for instancing

    Add details on optional parameters and the order of transformations.

commit f0fda25c196fbb46063abdd30be63ebbc4285841
Author: Fahim Imaduddin Dalvi <dalvifahim@gmail.com>
Date:   Sat Feb 24 10:15:17 2024 +0300

    Add low-spec shaders for object instancing.

commit bcf6e15523750ea9d1578a48de736073a37ea2bd
Author: Fahim Imaduddin Dalvi <dalvifahim@gmail.com>
Date:   Fri Feb 16 14:54:26 2024 +0300

    Add documentation

commit a4b889b40543f70c4e9c9d6002f853547c6fb373
Author: Fahim Imaduddin Dalvi <dalvifahim@gmail.com>
Date:   Tue Feb 13 17:32:11 2024 +0300

    Use header file defined indices for vertex attributes

    Vertex attributes were hardcoded across the code, this commit changes
    the implementation to use constants defined in the header file. Also
    change the indices used to be compatible with the future HDR pipeline.

commit 8120544e276161f57dd1aeda645ef52684eab7a7
Author: Fahim Imaduddin Dalvi <dalvifahim@gmail.com>
Date:   Sat Feb 10 22:26:55 2024 +0300

    Clean up shader code

    Use *.glsl library code to minimize duplication across object-instancing*
    shaders. Rename variables to follow Shader Style Guide:
    https://wiki.flightgear.org/Shader_Style_Guide

commit ed864379621c060860c68d46cab054f8f1161f25
Author: Fahim Imaduddin Dalvi <dalvifahim@gmail.com>
Date:   Sat Feb 3 22:23:11 2024 +0300

    Remove unused fragment shader.

commit be80516fff660764dad245cd6389e7616d8d807c
Author: Fahim Imaduddin Dalvi <dalvifahim@gmail.com>
Date:   Sat Feb 3 22:21:15 2024 +0300

    Add support for multiple effects and add a colored instancing effect.

    This commit adds shaders and a corresponding effect for colored
    instanced objects using the new custom attributes provided by the
    corresponding SimGear commit.

commit f758ad00b08578052b815bdf138dae5b3a0e026c
Author: Fahim Imaduddin Dalvi <dalvifahim@gmail.com>
Date:   Sat Feb 3 16:31:15 2024 +0300

    Remove unnecessary inclusion of vertex shader in inherited effect

commit 26fa5ecc8d825ed6902c6a6934a82749839cc9cc
Author: Fahim Imaduddin Dalvi <dalvifahim@gmail.com>
Date:   Wed Oct 18 21:14:18 2023 +0300

    Fix rotation to match normal scenery objects

commit 2a47c3164085d5821944f53a02a55c3bea9ca4ac
Author: Fahim Imaduddin Dalvi <dalvifahim@gmail.com>
Date:   Wed Oct 18 21:13:41 2023 +0300

    Reduce instancing effect to bare minimum

commit c24d4fdbfc295872ec6f47a8f8e002dfa301fd83
Author: Fahim Imaduddin Dalvi <dalvifahim@gmail.com>
Date:   Sat Oct 14 11:30:34 2023 +0300

    Properly handle model/texture/effects

    Simgear:
    Previously, the model was being loaded without any options, this is
    now fixed. *ac models have their effect instantiated manually, while
    *xml models require an explicit <effect> tags. Also, the already
    loaded model node is edited (for adding vertex attributes, statesets
    etc) instead of creating a new node (for deferred texture loading and
    other stuff to work).

    FGData:
    Reverted object-instancing effect to match model-default more closely
    to make texturing work.

commit 17e74fc4cc421c3aa9f08e5bbcd08d8a5b450655
Author: Fahim Imaduddin Dalvi <dalvifahim@gmail.com>
Date:   Sat Sep 9 14:07:35 2023 +0300

    Implement model-default effects for instanced objects.

    Not perfect yet, normal models are quite a bit darker, and we are loading
    the model using OSG directly, instead of SGModelLib.

commit d4734690745bde0652e578174e18ddf4fe799000
Author: Fahim Imaduddin Dalvi <dalvifahim@gmail.com>
Date:   Sat Apr 23 14:52:36 2022 +0300

    Implemented instance rotation and scaling

    This commit adds support for optional per-instance rotation and
    scaling, defaulting to no scaling and rotation if none is specified.

commit dd7256818becb21695487385fe5d4b7fcd33a61e
Author: Fahim Imaduddin Dalvi <dalvifahim@gmail.com>
Date:   Fri Mar 18 09:19:24 2022 +0300

    Implemented texture handling

    The code assumes there is a single texture, and this is applied
    to the single drawable geometry created for instancing. This commit
    breaks texture-less object support for instancing.

commit 547e051459c91ef0abe1b9fe583f0aed59720135
Author: Fahim Imaduddin Dalvi <dalvifahim@gmail.com>
Date:   Sat Feb 26 14:25:57 2022 +0300

    Moved random color generation to shader

commit ab927a8555ca615d2fe51c9fc87b9fb5f6198c3f
Author: Fahim Imaduddin Dalvi <dalvifahim@gmail.com>
Date:   Tue Feb 22 18:32:10 2022 +0300

    Proof of Concept instancing support for scenery objects.
2024-02-24 11:11:12 +03:00
Gijs de Rooy
f57e3b5ea9 Add link to more user-oriented wiki article in local weather readme
Address issue #2754
2024-01-19 09:24:55 +01:00
Stuart Buchanan
4238bec6fd Update documentation of LINEAR_FEATURE_LIST 2023-12-29 13:09:22 +00:00
Colin Geniet
44e6ea8f16 README.xmlsound: update doc for samples with mode 'once'
This is related to the changes done in
https://sourceforge.net/p/flightgear/simgear/merge-requests/120/
2023-01-10 09:27:36 +01:00
James Turner
8cbbbcdc8a Add docs on MetaData for aircraft 2022-10-18 10:08:59 +01:00
James Turner
1e1f974b76 Clean up autopush attribution 2022-10-18 10:08:41 +01:00
Richard Harrison
0dcbfdbf53 docs: XML sound changes 2021-10-18 15:31:20 +02:00
Stuart Buchanan
428cbb0abc WS30 - Line feature texturing. 2021-10-01 22:02:44 +01:00
Fahim Imaduddin Dalvi
886b0c1392 Updated documentation for lights, buildings and trees.
Added comments regarding normal computation for directional lights, clarified
minor details, fixed typos and incorrect documentation regarding cartesian
coordinates for buildings and trees.
2021-09-19 14:36:38 +01:00
Stuart Buchanan
164112a8c0 WS30: Properties for lit roads 2021-08-21 17:16:28 +01:00
Fahim Imaduddin Dalvi
81af0f37c2 Shader-based scenery lights.
This commit implements shader-based scenery lights with support for
efficient rendering of a large number of lights, animations and
directionality. Detailed commit log can be found at [1]. Detailed
discussions can be found on the mailing list [2][3][4].

[1] https://sourceforge.net/u/fahimdalvi/fgdata/ci/feat/scenery-shader-lights/~/tree/
[2] (Timed animation stops working in certain configurations) https://sourceforge.net/p/flightgear/mailman/flightgear-devel/thread/4A7AC359-63B3-4D8A-815B-09823BCEFF27%40gmail.com/#msg37095923
[3] (Shader-based scenery lights) https://sourceforge.net/p/flightgear/mailman/flightgear-devel/thread/63E3C131-7662-4F59-B2E6-03208C78EF96%40gmail.com/#msg37190517
[4] (Shader-based scenery lights Part 2) https://sourceforge.net/p/flightgear/mailman/flightgear-devel/thread/74F18179-CA34-4901-A44E-15498ECC230A%40gmail.com/#msg37331695
2021-08-07 21:42:20 +03:00
Delta Echo
665d95cb69 autochecklist.nas: support <group>ing checklists 2021-03-17 13:20:15 +00:00
James Turner
4c87b09eba Remove generated PDF docs, update link to web version
Also remove some other archaic docs which are superseded by the
tutorials and Wiki.
2021-03-11 20:21:59 +00:00
Stuart Buchanan
334e9bfd13 WS30 - Document LINEAR_FEATURE_LIST 2021-02-26 10:53:31 +00:00
Stuart Buchanan
e5abe820f0 Update README.effects to match .eff files 2021-01-17 19:58:25 +00:00
Chris Frey
4a4e9089c1 Docs: fixed incorrect terragear URL in FlightGear-FAQ.html 2020-11-21 21:35:40 +00:00
Chris Frey
50c76ec338 Docs: fixed incorrect terragear URL in README.scenery 2020-11-21 21:35:25 +00:00
Stuart Buchanan
37110ad34a TREE_LIST documentation updates
Thanks to Rick Gruber-Riemer for proof-reading.
2020-11-19 14:22:58 +00:00
Stuart Buchanan
255717d812 TREE_LIST STG Verb 2020-11-17 21:19:15 +00:00
Stuart Buchanan
6f52d094a5 Document new STG range noun 2020-11-17 20:00:26 +00:00
Stuart Buchanan
9e2ee8b969 Checklist/Tutorial: Auto view direction to marker
This change automatically changes the view direction to look
at a <marker> if any is defined for a checklist item or tutorial
step.

Both the tutorial and checklist features support a <marker> element
which can be used by an aircraft developer to display a magenta
circle around an item of interest (typically a control in the
cockpit).

Previously aircraft developers had to add a <view> element to move
the viewpoint to look at the marker, while users of checklists had
to look for the marker manually.

Now:
- For checklists, pressing the "?" button on a checklist will pan the viewpoint
to the marker.
- For tutorials, if there is not a <view> element defined for a
tutorial step, the view will automatically pan to the marker.
2020-10-31 16:00:51 +00:00
Stuart Buchanan
e9e0f00568 Link .dirindex spec with test data. 2020-10-03 11:26:54 +01:00
Richard Harrison
eb5d1029c8 Documentation improvements
Rewrote the volume section of xmlsound and add documentation for expressions
2020-08-01 16:43:16 +02:00
James Turner
ad43f14b65 Extend add-ons documentation. 2020-07-10 13:10:49 +01:00
Henning Stahlke
09dca7d3f0 Configurable auto-gen of tutorials from checklists
Previously tutorials were generated from all checklists.

Now <auto-tutorial>false</auto-tutorial> can be set at
any level of the checklist heirarchy to disable generation
of tutorials for a given checklist, group, or for all
checklists.
2020-06-27 15:20:02 +01:00
James.Hester
ed0969c184 Updated documentation for use of generated normals. 2020-06-19 09:58:37 +01:00
Stuart Buchanan
b612bea466 Document Effects techniques for Scenery 2020-05-23 18:53:42 +01:00
fly
b44a1c1a7c Added autopush
Signed-off-by: fly <merspieler@airmail.cc>
2020-05-15 11:29:07 +01:00
Henning Stahlke
fe1aaaea1c Update README.add-ons 2020-04-17 09:55:02 +02:00
Stuart Buchanan
40e30a38b6 Document Compositor effects 2020-04-13 19:42:36 +01:00
Stuart Buchanan
9e7afc7291 Fix random buildings in Compositor
Update Compositor Effects and Shaders with latest random/osm2city
buildings implementation.
2020-03-28 14:27:08 +00:00
Erik Hofman
bb7d7ff24f Mention the random tag 2020-03-20 09:59:35 +01:00
Stuart Buchanan
887ec93df4 Improve scenery path, terrasync, .dirindex docs 2020-02-19 22:18:33 +00:00
Stuart Buchanan
5a0fc45853 Fix Building share when model shader off. 2020-01-27 13:38:22 +00:00
Stuart Buchanan
119fb5efe2 Random Buildings - improved texture mapping
Previously the front and side faces of random/OSM buildings
had identical texture coordinates.  This resulted in the sides
of buildings texture mapping being squeezed or stretched.

This change generates a separate texture mapping for the sides
of the buildings.
2019-11-23 17:08:04 +00:00
Stuart Buchanan
564e7b31fd Shader buildings multiple roof types
Shader buildings now support different roof types
- flat
- gabled
- hipped
- pyramidal

Primarily for osm2city use.
2019-10-08 21:39:40 +01:00
Stuart Buchanan
87e9118965 Shader buildings - split wall and roof tex index
Previously there was very limited texture variations
as a given texture index was used for both the wall
and ceiling.  Now these can be specified separately,
allowing for more variation in both STG defined and
random buildings.

Requires simgear commit 053bda26a43314a91b01b08cd4617da82f7ab807
2019-09-25 21:56:22 +01:00
Stuart Buchanan
4784a929d7 Instance based random buildings
Replace random buildings with one using proper instancing.
Also implement more control over rendering of random buildings.
see README.scenery for details.
2019-08-20 17:02:27 +01:00
Stuart Buchanan
f5d967dbb3 Update README.materials to cover regions. 2019-06-07 13:49:02 +01:00
Stuart Buchanan
af1bff53b9 Updated Chinese manual from Tong HUI.
Checking this in directly just incase we are unable to
re-generate it correctly in the future.
2019-02-15 16:12:08 +00:00
Florent Rougon
02b01af19e Add-ons: small fixes to Nasal/addons.nas and Docs/README.add-ons
+ After discussion with Henning:
    - orig_setlistener() and orig_maketimer() were not intended to be
      public -> prefix the function names with an underscore;
    - clear the add-on's lists of tracked listeners and timers in
      remove() (load() does that too, but it's a bit late).

+ Little rewording in Docs/README.add-ons.
2018-12-10 15:29:22 +01:00
Henning Stahlke
5e2756b410 Add reload support to addons.nas; add tracking of listeners and timers 2018-12-07 19:24:22 +01:00
Stuart Buchanan
b83e930736 Document additional STG Verbs 2018-11-19 19:50:57 +00:00
Scott Giese
09e8bd6f63 Revert "Doc/README: Only use Latin character set."
This reverts commit c5460a3cf1.
2018-10-10 22:11:00 -05:00
Scott Giese
c5460a3cf1 Doc/README: Only use Latin character set.
Eliminate overruns in PDF output.
2018-10-08 20:11:58 -05:00
Stuart Buchanan
3b7bdd3658 Full set of Docs updates for 2018.3.0
Hopefully final update to
- getstart
- readme.pdf
- FGShortRef
- C172p documentation.
2018-09-25 20:52:54 +01:00
Stuart Buchanan
c3e20b0ffd Update Manual with better launcher screenshot 2018-09-13 20:49:36 +01:00
Stuart Buchanan
081a21df1f Update Manual
Commit 8cfe60e7009e15e2b3804c4359246494e9f8e3d6 from getstart orignin next
2018-09-13 19:40:13 +01:00
James Turner
544e53c9d9 Standardize on Unix line ending
Reported at:
https://sourceforge.net/p/flightgear/codetickets/2042/
2018-08-08 11:17:49 +02:00
Stuart Buchanan
9f7e17a434 Support for <group> of checklists.
Checklists now support grouping by placing a group of checklists
under a <group> node.

e.g. /sim/checklists/group/checklist

The group can have a <name>, which is used by the checklist dialog
and can be used by other interfaces, such as the FG1000.
2018-04-12 22:24:57 +01:00