1
0
Fork 0
No description
Find a file
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
AI [AI/Aircraft] PNG compression and iCCP removal 2023-04-17 14:59:10 -05:00
Aircraft Add compositor flashlight to the walker to replace the ALS one from Effects/model-combined 2024-01-09 22:24:09 +01:00
Aircraft-aisim Add some documentation. Updates from validates data for aircraft. 2020-10-01 08:04:46 +02:00
Aircraft-uiuc fix path for beech99 doco 2002-05-01 01:27:18 +00:00
Airports latest airports 2023-11-03 17:43:14 -05:00
Astro Expanded stars catalog from Chris 2019-03-03 11:46:47 +00:00
ATC Improvements to spoken ATIS 2016-04-24 10:45:57 +02:00
Compositor HDR: Implement a logarithmic depth buffer 2024-01-31 01:17:50 +01:00
Docs Implement instancing for scenery objects 2024-02-24 11:11:12 +03:00
Effects Implement instancing for scenery objects 2024-02-24 11:11:12 +03:00
Environment Advanced weather: do not match 'Fair weather' to 'High pressure core' 2024-01-23 09:27:54 +01:00
Fonts Add the Noto font: 2023-02-21 09:17:53 +01:00
Geodata [Geodata] PNG compression and iCCP removal 2023-04-17 14:50:03 -05:00
gui Move ShaderVG shaders to another directory 2024-02-07 00:36:37 +01:00
HLA hla: Bring the object model in line with fgviewer. 2012-12-16 17:46:34 +01:00
Huds Control: Add reworked Generic Autopilot 2022-03-31 16:31:32 +01:00
Input Add ISA METAR scenario 2023-07-21 13:50:44 +01:00
Lighting Cancel specular highlights due to sun at night 2012-07-12 09:27:35 +02:00
Materials Improve Svalbard Material 2024-02-07 14:42:48 +01:00
Models [Models] PNG compression and iCCP removal 2023-04-17 14:30:48 -05:00
MP Sync with VirtualAir (http://virtualair.sourceforge.net/). 2010-02-10 10:41:25 +00:00
Nasal hitch.nas: Fix documentation typo 2024-02-07 14:42:47 +01:00
Navaids Add Truman TACAN to carrier navaids 2017-09-01 12:35:05 +03:00
Phi Update German map tile URLs 2023-12-11 11:49:20 +01:00
Protocol David Megginson: here are the generic protocols I implemented for ForeFlight's sim integration (also supported by Garmin Pilot). The XATT one isn't fully working in Garmin Pilot (I've checked that the output is correct by sending it to a file), so I'd be grateful if anyone with an iOS device could try it in ForeFlight. The XGPS one is working flawlessly in Garmin Pilot on Android. 2017-07-05 09:03:45 +02:00
Shaders Implement instancing for scenery objects 2024-02-24 11:11:12 +03:00
Sounds Add turbojet fan sound by Bjoern K; edited to remove pops/cracks 2021-06-18 12:58:09 +01:00
Textures HDR: Render the Moon, stars and planets 2023-11-06 14:56:45 +01:00
Timezone Add a missing timezone file 2023-05-13 10:05:56 +02:00
Translations Add "vpb" as a valid subdirectory for scenery 2024-02-05 21:10:02 +00:00
Video gui/dialogs/vr-options: Add mirror options 2021-09-11 23:43:55 +01:00
.gitignore Add gitignore file. 2012-02-18 14:26:17 +01:00
AtlasPalette Fix type 2005-01-31 14:20:38 +00:00
AUTHORS Updates in preparation for the 0.9.8 release. 2004-12-21 00:21:11 +00:00
ChangeLog text file updates. 2002-02-18 15:37:50 +00:00
COPYING Updates in preparation for the 0.9.8 release. 2004-12-21 00:21:11 +00:00
defaults.xml HDR: Add night vision effect 2024-01-26 15:19:22 +01:00
httpd-settings.xml Phi: move URL to the browsers root directory 2015-04-18 13:03:46 +02:00
joysticks.xml joysticks.xml: Manual revert of unintended changes from Alexis merge. 2010-10-29 20:43:09 +02:00
keyboard.xml Fix Ctrl-M shortcut to open map 2024-01-29 15:24:35 +01:00
location-presets.xml Updated default location to BIKF 2019-05-24 11:43:13 +01:00
mice.xml mice.xml: don't let mouse move control surfaces while paused or replaying. 2021-01-01 17:19:08 +00:00
NEWS Preparation for 0.9.11-pre1 release. 2007-05-15 16:09:55 +00:00
options.xml Update -h -v output according to boolean options with optional values 2023-09-19 12:27:11 +01:00
README spelling fixes 2007-11-20 18:09:20 +00:00
runfgfs.bat Initial revision. 2001-06-11 22:11:49 +00:00
Thanks Ack to ESA for providing Gaia satellite data used in making the Milky Way texture 2022-03-03 19:09:36 +00:00
version Set version information 2020-10-13 22:31:39 +01:00

Welcome to the FlightGear Flight Simulator project.
===================================================

The primary web page for this project is: http://www.flightgear.org

For basic installation instructions see the "INSTALL" file.

Before you can run FlightGear you will also need to download and
install the "base" package which is a collection of textures, sounds,
sample scenery, and other data files needed by the sim.

For additional install help for specific platforms please browse the
"docs-mini/" subdirectory.

More complete documentation is available from our web page as a
separate distribution.

Please take a look at the "Thanks" file for a list of people who have
contributed to this project.  If you have contributed something but
don't find your name in this file.  Please send a polite reminder to
http://www.flightgear.org/~curt

For a summary of changes/additions by version see the "NEWS" file.

This project is GPL'd.  For complete details on our licensing please
see the "COPYING" file.

For information on available mailing lists, mailing list archives, and
other available source code and documentation, please visit our web
site.

FlightGear is a product of the collaboration of large international
group of volunteers.  FlightGear is a work in progress.  FlightGear
comes with no warranty.  We hope you enjoy FlightGear and/or find it
of some value!