Hello,
please export the average tree heigth of the currently overflown area to the property tree.
This would be extremely useful for a basic tree crash detection.
Further reading/usecase:
https://github.com/HHS81/c182s/pull/328#issuecomment-707334945
As far as I know, that's quite tricky, but maybe not impossible. Assigning to Stuart in case he knows where that data is defined, and if we could expose an avergae value.
It's possible but might be computationally expensive.
The underlying average tree height is in the material definition. We already expose some of the terrain information to the FDM (ground friction values for example), but I think we might only do that when the plane is on the ground for perf reasons.
Separately, we can do ground intersection queries (e.g. the UFO) to get material information. It might be possible to retrieve it as part of that then. However IIRC because of the way that the ground mesh is processed, at that point we don't know the exact material type - hence you get a list with the UFO. I don't recall exactly why - might be because we actually end up referencing the Effect?
This could be a nice project for someone wanting to get involved in this area (Hackathon). It's not something I'm likely to look at any time soon.
Having recently tinkered with regional definitions and the UFO, the list seems to be the block of landclasses that map to an effect in the regional definitions file (the actual landclass would be useful). Tree properties are assigned to the entire block, so maybe it's possible to retrieve these values from FG.
The height of actual trees are procedural (determined in the GPU) with ALS. Trees get smaller with increasing slope until there are no trees (done CPU side I think). There are also clearings, and clumps of smaller trees done in the shader. I believe tree sizes are also scaled slightly larger than specified in regional definitions to give greater coverage with lower densities of trees. The damage model becomes more unintuitive if people have trees switched off entirely.
The result of this: It would be fine to do a collision with an imaginary tree plane, as long as it's explicit that the damage is being given based on a typical tree hight for that terrain, rather than actual collision with specific trees. People not doing specific training might also want the option to switch that model damage off.
(Also interesting: A thick canopy technically creates a softer ground effect .)
Kind regards