1
0
Fork 0
fgdata/Docs
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
..
img Add a svg version of our FG logo 2015-11-05 20:52:31 +01:00
keyboard Fix conflict Tab key vs cycle mouse mode 2014-01-16 19:11:58 +01:00
model-combined.eff Standardize on Unix line ending 2018-08-08 11:17:49 +02:00
Serial User Doco 2001-07-03 18:10:50 +00:00
AI_doc.html Move AI ships into the AI department as well, adjust AI scenarios and 2008-03-11 10:27:50 +00:00
autopush-config.xml.template Added autopush 2020-05-15 11:29:07 +01:00
buildings.png Instance based random buildings 2019-08-20 17:02:27 +01:00
compile_docs.py Implemented a documentation compiler, initially for Aircraft 2015-01-14 18:42:04 -05:00
FGShortRef.css Updated docs for V3.2.0 2014-08-11 15:52:17 +01:00
FGShortRef.html Full set of Docs updates for 2018.3.0 2018-09-25 20:52:54 +01:00
FGShortRef.pdf Full set of Docs updates for 2018.3.0 2018-09-25 20:52:54 +01:00
Goldhofert.xml Clean up autopush attribution 2022-10-18 10:08:41 +01:00
index.html Remove generated PDF docs, update link to web version 2021-03-11 20:21:59 +00:00
model-howto.html Model howto: fix OSG wiki link 2013-10-07 12:50:02 +02:00
Nasal-doc.tex Nasal internals LaTeX document (.tex & .pdf) 2014-01-21 11:44:03 -06:00
README Added User Doco 2001-07-03 18:00:53 +00:00
README.3DClouds Updates to 3D clouds to use the new shading parameters. 2011-10-06 21:21:13 +01:00
README.add-ons Extend add-ons documentation. 2020-07-10 13:10:49 +01:00
README.aircraft-metadata.md Add docs on MetaData for aircraft 2022-10-18 10:08:59 +01:00
README.airspeed-indicator fix for bug 1089: concorde airspeed indicator value at subsonic speeds 2013-03-28 12:11:50 +01:00
README.autopush Clean up autopush attribution 2022-10-18 10:08:41 +01:00
README.checklists autochecklist.nas: support <group>ing checklists 2021-03-17 13:20:15 +00:00
README.commands Update docs for rate parameter of property-interpolate 2012-09-06 14:14:08 +02:00
README.conditions Document "not-equals" condition. 2011-07-10 10:29:45 +02:00
README.digitalfilters Clean up README files. 2013-06-20 23:02:17 +01:00
README.effects Update README.effects to match .eff files 2021-01-17 19:58:25 +00:00
README.electrical Add a bunch of new documents. 2004-08-21 09:00:40 +00:00
README.embedded-resources Revert "Doc/README: Only use Latin character set." 2018-10-10 22:11:00 -05:00
README.expressions Documentation improvements 2020-08-01 16:43:16 +02:00
README.fgjs sync with some READMEs that originate in main CVS 2002-10-28 20:14:53 +00:00
README.flightrecorder Clean up README files. 2013-06-20 23:02:17 +01:00
README.gui Clean up README files. 2013-06-20 23:02:17 +01:00
README.hud minor update 2006-07-28 16:53:01 +00:00
README.introduction Add a bunch of new documents. 2004-08-21 09:00:40 +00:00
README.IO sync. with source version 2009-06-17 10:03:05 +00:00
README.Joystick Sync with the source code. 2004-08-21 08:57:29 +00:00
README.Joystick.html update Joystick documentation for new delay-sec and release-delay-sec properties 2014-03-05 00:46:48 +01:00
README.JSBsim sync with some READMEs that originate in main CVS 2002-10-28 20:14:53 +00:00
README.jsclient Clean up README files. 2013-06-20 23:02:17 +01:00
README.kln89.html OpenSuSE: Fix inconsistent line-feeds in READMEs 2011-08-01 19:45:13 +02:00
README.layout GUI layout management and a few visual/eye-candy modifications. See 2004-05-12 15:37:17 +00:00
README.local_weather.html Add link to more user-oriented wiki article in local weather readme 2024-01-19 09:24:55 +01:00
README.logging - Corrected the XML example so it works in FG and without aborting. 2008-01-06 15:10:46 +00:00
README.materials Update documentation of LINEAR_FEATURE_LIST 2023-12-29 13:09:22 +00:00
README.mingw Revert "Doc/README: Only use Latin character set." 2018-10-10 22:11:00 -05:00
README.minipanel *** empty log message *** 2001-07-03 21:06:42 +00:00
README.multiplayer Clean up README files. 2013-06-20 23:02:17 +01:00
README.multiscreen Add a short note to document the 'overrideRedirect' flag. This gives an 2014-02-05 10:00:34 -06:00
README.osgtext Revert "Doc/README: Only use Latin character set." 2018-10-10 22:11:00 -05:00
README.properties Update jsb aircraft to use the changed tank/level-lbs property 2009-02-06 22:56:00 +00:00
README.protocol Add a note about the generic-protocol-analyse utilty. 2009-06-30 07:49:46 +00:00
README.scenery Implement instancing for scenery objects 2024-02-24 11:11:12 +03:00
README.sound Clean up README files. 2013-06-20 23:02:17 +01:00
README.submodels Clean up README files. 2013-06-20 23:02:17 +01:00
README.systems Revert "Doc/README: Only use Latin character set." 2018-10-10 22:11:00 -05:00
README.tutorials Checklist/Tutorial: Auto view direction to marker 2020-10-31 16:00:51 +00:00
README.voice.html typos 2006-02-14 23:36:53 +00:00
README.wildfire move from $FG_ROOT/Models/Effects/Wildfire/ to $FG_ROOT/Docs/ 2009-02-03 18:13:08 +00:00
README.xmlhud Revert "Doc/README: Only use Latin character set." 2018-10-10 22:11:00 -05:00
README.xmlpanel Clean up README files. 2013-06-20 23:02:17 +01:00
README.xmlpanel.html remove author email address; not only is it invalid now, it's also broken 2005-10-30 13:07:46 +00:00
README.xmlparticles Clean up README files. 2013-06-20 23:02:17 +01:00
README.xmlsound README.xmlsound: update doc for samples with mode 'once' 2023-01-10 09:27:36 +01:00
README.xmlsyntax Sync with the source code. 2004-08-21 08:57:29 +00:00
README.yasim Clean up README files. 2013-06-20 23:02:17 +01:00
README.YASim.rotor.ods Try again 2010-06-04 19:11:05 +02:00
README.yasim.rotor.png Oops, this wasn't supposed to be removed. 2006-09-14 20:37:34 +00:00
README.YASim.rotor.xls Try again 2010-06-04 19:11:05 +02:00

FGShortRef.pdf describes the key bindings and has a
nice short description of controls for FGFS.

The HTML documentation is a copy of the official 
manual. If you would like a nicely printed copy
it is available in PDF form at the the FGFS website

http://flightgear.org/Docs/InstallGuide/getstart.pdf