Loading [MathJax]/extensions/Safe.js

Special Aircraft Service

the SAS Hangar => The Lounge => Stainless' new Flight Simulator => Topic started by: Stainless on November 03, 2017, 03:09:28 AM

Title: Help required
Post by: Stainless on November 03, 2017, 03:09:28 AM
I have changed the way the flight dynamic model works to make it more realistic.

The system that most people use (including JBSIM and YASIM used in flight gear) makes approximations about key elements. Like fuel tanks. A fuel tank is basically modeled as a cylinder as far as the physics is concerned. This is better than just ignoring it and just treating it as part of the aircraft's mass, but is pretty crude.

I also want to have a lot of realistic damage effects. So fuel tanks can be holed, hydraulics damaged, radio, engine and radar can take hits.

I realised yesterday that it is easy to do both things.

The physics engine I am using can handle objects as meshes. So you add a collision mesh to the msh file that defines the shape and location of a fuel tank, I pass that into the physics system and it calculates the inertia tensor from the shape. I just need to play with the mass and the shape as the fuel level decreases.

With the addition of other collision meshes as well it removes the randomness in the damage code. So you can actually target weak points in an aircraft and get the results you expect. Also if your aircraft gets hit, you have to manage the damage. Pumping fuel from damaged tanks to undamaged ones. Using the MFD HUD repeater if the HUD gets damaged. Anything we can think of.

Of course that does mean that someone has to add these collision meshes to the aircraft.

At the moment the only two I need doing are the F16 and something for it to go up against. I can't see a modern mig in the list, but anything would do.

Once I have something to work with it other aircraft can wait until I have released something you can play with.

Anyone interested?
Title: Re: Help required
Post by: Pursuivant on November 05, 2017, 03:08:38 PM
Very cool that you are planning these things, it will go a long way to making the flight and and damage models more realistic, and might eventually allow for more realistic simulation of fluid dynamics for things like leaking tanks or deliberate fluid ejections like fuel dumping, sprayed liquids, or in-flight refueling. It would also allow for realistic calculations of things like fuel starvation for planes which don't have fuel injectors or pressurized fuel systems.

If you wanted to get even more complex with the damage modeling, please possibly consider some mechanism for modeling the mechanical properties different materials as well as the basic physics of hydrostatic shock on fluid-filled containers. That would allow the damage absorption capacities and fluid loss properties of a "self-sealing" fuel cell to be modeled differently from those of a bullet hitting a solid metal tank. (More simply it would allow correct "damage decals" to be applied to hits on external parts made from different materials - splintering for wood or composites, tears and flapping material for canvas, punched holes for metal.)
Title: Re: Help required
Post by: Stainless on November 06, 2017, 11:46:06 AM
Damage application based on materials is already planned..... well actually started would be a better phrase.

Fuel tanks have a type specifier, which ranges form ... well .. bucket, to self healing synthetic.

I haven't got around to the code yet, but it's in the pipeline.  :D

I am only mortal, but I am a damn good mortal.  8)
Title: Re: Help required
Post by: Dimlee on November 06, 2017, 12:26:40 PM
Just wonder would it be possible to simulate different effects of a bullet penetration of:
- full tank - fuel leaking as the only result
- empty/almost empty tank full of vapours - immediate detonation
- empty tank equipped with inerting system - no other result than holes.
Title: Re: Help required
Post by: Stainless on November 06, 2017, 11:11:25 PM
Just wonder would it be possible to simulate different effects of a bullet penetration of:
- full tank - fuel leaking as the only result
- empty/almost empty tank full of vapours - immediate detonation
- empty tank equipped with inerting system - no other result than holes.

Yes. I have also built in a fuel type variable. So a tank filled with modern avgas behaves differently from a solid rocket booster, or exotic fuels like HTP etc.
Title: Re: Help required
Post by: Stainless on August 05, 2019, 12:56:46 PM
Hi Guys,

I am trying to create a texture to go on the table in the RAF sector stations for the Battle Of Britain part of the game.

But I am stuck.

I have dug around for ages looking for a copy of the RAF sector map. Can't find anything other than a few partia nl images.

Anyone help?

This is what I have so far


(https://i.postimg.cc/W4xzLLHX/map2.png) (https://postimg.cc/LqB2L7R1)
Title: Re: Help required
Post by: vonofterdingen on August 05, 2019, 03:35:13 PM
I think this is what you are looking for. I took this from Canon's original (beta) channel map. The guy was pretty good about getting the details correct:

(https://i.postimg.cc/cJ3zM9FQ/Screen-Hunter-38.png) (https://postimg.cc/f3w5MKnL)
Title: Re: Help required
Post by: Pursuivant on August 05, 2019, 06:19:07 PM
I have dug around for ages looking for a copy of the RAF sector map. Can't find anything other than a few partial images.

Are you looking for a map that covers all of the UK or do you just need one which provides more information about the sectors you've got?

If you're wanting a map which gives more coverage of the UK, this is the best I could find so far:

https://www.ibiblio.org/hyperwar/UN/UK/UK-RAF-I/maps/UK-RAF-I-5.jpg

It doesn't cover Northern Ireland or the Scottish Highlands, but it extends the map you've got. Keep in mind that 13 & 14 Fighter Groups were sort of a combined reserve and Operational Training command which was progressively stripped of men and machines as the battle progressed. They had the impossible job of defending every bit of the UK north of Liverpool to the Shetlands and West to Belfast and beyond. No. 13 Group covered the Midlands and North. No. 14 Group covered Scotland.

Here's another map which provides better coverage of Wales and Cornwall and also depicts a bit of Ireland:

https://sites.google.com/site/battlegbr1940/_/rsrc/1354151409750/home/bobmap.jpg?height=577&width=471

If you want more detailed info on the important sectors in SE England and the Midlands then this map might help (Ignore the Almany Stock image BS - it's taken from the Duxford Air Museum)

https://www.alamy.com/stock-photo-map-of-uk-showing-wwii-air-defence-sectors-and-airfields-90842400.html

This map is very similar to the above, but labels things slightly differently:

http://www.warfaremagazine.co.uk/articles/the-battle-of-britain-britains-defences-1940/53

For Scotland, here's the southern extent of No. 14 Group's coverage:

https://www.classicwarbirds.co.uk/images/articles/bob-timeline-14-group.jpg

Try doing image searches by specific Fighter Group (11, 12 are the ones that took the brunt of the fighting) or subsector using keywords like "Battle of Britain," and "Group Sector Map" to get more specialist information.

FWIW, here's a link to the High and Low Chain Home Radar Coverage area:

https://upload.wikimedia.org/wikipedia/commons/d/de/Chain_home_coverage.jpg

Edits:

Nice big map of No. 11 Group Sector:

https://doverhistorian.files.wordpress.com/2013/06/th-fighter-command-groups-and-sector-boundaries-airfields-squadrons-18-08-1940-bofb-mem-capel.jpg

Labels for No. 11 Group Sectors:

https://www.battleofbritaintours.co.uk/detailed-map/

Period map of approximately the same area:

http://www.nationalarchives.gov.uk/wp-content/uploads/2019/03/AIR-41_16_1940-Battle-Britain.jpg

And, paydirt if you were looking for a full group sector map for the UK:

https://www.ibiblio.org/hyperwar/UN/UK/UK-Defence-UK/img/DefenseOfUK-23.jpg

In fact, this e-book has lots of good maps and other data about the battle. I believe that it's an official military history published by the RAF.

https://www.ibiblio.org/hyperwar/UN/UK/UK-Defence-UK/index.html#contents
Title: Re: Help required
Post by: Stainless on August 06, 2019, 02:51:57 AM
 :D

You guys have come up with all the same things I found.

It's frustrating as hell, the groups you can see pretty easily, with variable level of detail, but the sectors are a nightmare.

They either cover them all really nicely, but name them after the base airfield instead of the official sector codes, or they only cover a single group.

This one is almost perfect   http://www.nationalarchives.gov.uk/wp-content/uploads/2019/03/AIR-41_16_1940-Battle-Britain.jpg (http://www.nationalarchives.gov.uk/wp-content/uploads/2019/03/AIR-41_16_1940-Battle-Britain.jpg) but it doesn't cover enough area.

At the moment I am using QGIS to generate a map from a shape file, then adding detail by hand, but I am not a graphic artist.

This is what is known in the trade as "programmer art"  :P

The area displayed in the map I generated is based on a single image of 11 group headquarters I have in a book I bought.

To give you some more detail, this image is to be used as a texture drawn on top of a table in the 3D scene that represents 11 group headquarters.

WAF officers will be animated plotting the incoming raids and you will be able to issue commands to all the squadrons in 11 group. Then jump into an aircraft as you wish.

So ....

Do you think I should start again?

Use QGIS to generate a map of the correct area then detail it to look like the period map and use the airfield names for each sector (which is not correct, but would make game play easier) ?

Do any of you guys want a go at this?



Title: Re: Help required
Post by: Pursuivant on August 08, 2019, 03:35:13 PM
Bummer that I couldn't help.

Since you're in the UK you might be able to get local resources that others can't.

A potentially perfect solution is a really good photo of the surviving plotting maps at Duxford and elsewhere. Sadly, that would require a bit of access and some camera techniques that required permission of museum staff.

I'd also bet that the UK national archives has all the maps you need. You'd just have to send email to the appropriate contact person or get someone to go to the National Archives and photograph the relevant documents. The ideal person would be an underemployed history PhD since the doctoral degree allows them access as "legitimate academic researchers," which is sometimes harder for less qualified people to obtain. Alternately, you get such a person to write you (or your researcher) a letter of introduction which will get them in the door.

It might also be possible to have NA staff photograph the desired documents for you since they offer a copying service (for a fee).

It appears that the mother lode is in Air Series 16 (Fighter Command) or close to it:

https://discovery.nationalarchives.gov.uk/details/r/C506742

https://discovery.nationalarchives.gov.uk/details/r/C506432

https://discovery.nationalarchives.gov.uk/details/r/C506433

https://discovery.nationalarchives.gov.uk/details/r/C506438

https://discovery.nationalarchives.gov.uk/details/r/C506609

https://discovery.nationalarchives.gov.uk/details/r/C506691

This is the sort of file research that has me absolutely dancing at the prospect, except that I don't have a PhD and I'm on the wrong side of the ocean.
Title: Re: Help required
Post by: Stainless on August 09, 2019, 01:50:02 AM
 :) Finding the time to go to Kew is not easy. Also the cost is just stupid.

You are looking at £100 on trains assuming you travel off peak, then another £100 on taxis to get to where you actually need to be. Then food, beer, etc.

I am trying to request copies of the maps, but the server keeps crashing. Government websites. Say No More.

I have a backup plan.

Tangmere is not too far from me. It's £250 to become a lifetime "Friend of Tangmere" which gives you access to the archives and things not available to the general public.

Might be worthwhile.

This is what I am currently using, it's rubbish and needs to be re-created, but it'll do for now.

(https://i.postimg.cc/9F2Wth5v/map.png) (https://postimg.cc/c6Dy0PJm)

And this is where it will be when I get time to do it.

(https://i.postimg.cc/QN9SDFCr/Desktop-Screenshot-2019-08-09-08-45-52-16.png) (https://postimg.cc/ThxnqYnk)

(https://i.postimg.cc/63Drqhqx/Desktop-Screenshot-2019-08-09-08-46-58-79.png) (https://postimages.org/)
Title: Re: Help required
Post by: Pursuivant on August 10, 2019, 03:59:13 PM
While I'd consider the idea of taking an extended trip to an archive to be a sort of holiday, I can understand why you would not.

Anyhow, it might not be necessary.

I finally got off my ass and started checking my actual library/e-book library. I think that I've got exactly the map you need.

It's a declassified map of all the Fighter Command Sectors as of July 1940. If it's a reproduction, it's a very good one.

The book title is:

All About History Book Of The Battle of Britain
© 2015 Imagine Publishing Ltd
ISBN 9781785460647

p. 40-41

PM me and I can send you an image of the pages in question.
Title: Re: Help required
Post by: slibenli on August 10, 2019, 04:05:31 PM

(https://i.postimg.cc/QN9SDFCr/Desktop-Screenshot-2019-08-09-08-45-52-16.png) (https://postimg.cc/ThxnqYnk)


This reminds me of the ready room in old Flight Unlimited :)

(skip to 4:15)

https://youtu.be/Iqnv1_GUWKg?t=255
Title: Re: Help required
Post by: SAS~Ghost129er on August 10, 2019, 04:24:10 PM
No way!!! I have Flight Unlimited 2 on a disk which a real pilot gave to me as he knew my obsession and love for planes! I've got such a cheeky and cheesy grin you have no idea, love the SAS community and the common sims a lot of us have had! (sorry for the derail).
Title: Re: Help required
Post by: Pursuivant on August 13, 2019, 09:49:31 AM
This is a quick and dirty .jpg of the map, based on two screenshots edited together. Sadly, the resolution of the original isn't quite good enough to determine the exact map number (in lower L hand corner just below the map itself).

I'm not sure of the original source, but the "Secret" marking means that it was a wartime issue map.


(https://i.postimg.cc/SKRCBd1C/Fighter-Command-Layout-July-1940-Appendix-AA.jpg) (https://postimg.cc/p9Nm8fHL)
Title: Re: Help required
Post by: Pursuivant on August 18, 2019, 03:00:49 AM
A bit more research on my part.

Each sector and subsector had its own control station with customized tabletop-sized maps in the operations room for the filterers and plotters. Overall command was at Bentley Priory, now a museum with a recreated filtering room with giant map. Each subsector appears to have had its own custom map, loosely based on a map similar to what I posted above.

Wikipedia has a great picture of a sector fighter control map here, from RAF Uxbridge:

https://upload.wikimedia.org/wikipedia/commons/b/bf/Plotting_Table.jpg

The search term "operations room" + map gets a lot of other good pictures as well.
Title: Re: Help required
Post by: Stainless on August 18, 2019, 04:36:08 AM
That image is my main reference.

I have already started putting together assets, but getting the map sorted is a skull crusher.


(https://i.postimg.cc/bdfqsb3N/Debug-Screenshot-2019-08-18-11-32-32-87.png) (https://postimg.cc/JHxfFsf9)

These will be added to my noew deferred renderer so we can have real lighting effects for the squadron status.
Title: Re: Help required
Post by: Stainless on September 03, 2019, 02:08:20 AM
I have decided that the only way to solve this problem is to write a tool.

So I have started a map creator.

It takes GIS data as input and can create maps of any region of the world in any projection. So we know that during WWII the allies used a Cassini projection for all the maps. I can add that as well as any others we need.

Then you can set a visualisation theme to match the maps used by any country.

Add any locations or other GIS data you want to have visible on the map

And render it to a file.

You can obviously do any tweaks you want after that in any art package you like.

Eventually I want to add the ability to take other input data as well, so you could render maps of airfields or towns or anything really as long as you have data for it.


Title: Re: Help required
Post by: Stainless on September 03, 2019, 02:11:28 AM
I do need help with something else though.

At the moment I have a problem with my lighting.

I calculate the suns position based on time, date, latitude, longitude. So at night the sun is still there, it's just below the horizon.

I need an equation that defines when the sun goes below the horizon based on aircraft altitude.

Aircraft high in the sky are lit for longer than aircraft at low altitude.

I need to model that as well

If anyone spots an equation for this, please post a link here as I am really busy at the moment.

Cheers guys
Title: Re: Help required
Post by: Pursuivant on September 04, 2019, 02:06:13 PM
My apologies if I'm missing something, but can't you determine illumination of aircraft above the horizon in the same way you determined the illumination of the moon and planets by the sun using the Pythagorean Theorem or Secant-Tangent Theorem and the object's azimuth?

Darkness/gloaming occurs on the planet's surface when the earth's motion takes the line formed by the sun's top edge and the true horizon beyond the observer's position, but only ceases to illuminate objects as higher altitudes when the planet's motion brings the sun's position below the object's astronomical horizon as compared to the true horizon. The same illumination effect allows mountains to remain illuminated after the rest of the terrain goes dark.

Basic calculations here:

https://en.wikipedia.org/wiki/Horizon

If you want to get into the nuances of atmospheric refraction, the necessary calcs are here:

https://aty.sdsu.edu/explain/atmos_refr/altitudes.html

If you want to simplify it, define levels of illumination for civil twilight, nautical twilight, astronomic twilight, and night based on each 6 degrees the sun goes below the horizon.

https://www.timeanddate.com/astronomy/astronomical-twilight.html
Title: Re: Help required
Post by: Stainless on September 05, 2019, 12:38:05 AM
I will read through those, they seem to be exactly what I need.

It's not a trivial problem for two reasons.

1) Coordinate systems
    The Earth, Sun and Moon are in Galactic coordinates. The renderer works in world coordinates.  Conversion between the two is possible, but floating point accuracy makes the results unreliable.
2) Screen positions
    I don't render the sun as a 2D object, it exists in the shaders as a calculated angular position which is then subject to display transformations.

So the two simple, obvious approaches just fail to work.

Thanks for digging those references out for me, I will dig through them and see what I can do

Title: Re: Help required
Post by: slibenli on September 05, 2019, 01:15:14 AM
Assuming that the object position, earth center and sun direction are available in the shader, you could cast a ray from the object into the sun's direction and test whether it intersects the earth's sphere.

https://gitlab.com/vrresto/render_util/blob/master/shaders/util.glsl#L62
Title: Re: Help required
Post by: Stainless on September 05, 2019, 12:19:46 PM
Tried that , didn't work. don't know why, I think it is just a matter of scale.

I have a prototype solution which is hard to explain,,  of course

SO .....

It is easy to calculate the distance to the horizon based on altitude.

So I know one point and a distance.

I then calculate the two intersection points of two circles.

One with the aircraft at the centre and radius (distance to the horizon), and the other the Earth.

From one of these intersection points I can calculate a direction from the horizon to the aircraft.

I can then calculate the "elevation" of this direction and compare it with the suns elevation (already known)

I haven't put it into the renderer yet, just ran the maths for a few values, but it looks like it should work.

(https://i.postimg.cc/CL0RMK4F/horizon-test.png) (https://postimg.cc/z3dz08MM)
Title: Re: Help required
Post by: Stainless on September 05, 2019, 12:57:35 PM
It works !!!!!!!!!!!!


https://www.youtube.com/watch?v=zbIZSlMVO6g&feature=youtu.be
Title: Re: Help required
Post by: Pursuivant on September 07, 2019, 10:48:56 AM
Thanks for digging those references out for me, I will dig through them and see what I can do

Glad to help.

While not quite central to the problem, if you choose to use them, the various calculations for "looming" and "towering" items on the horizon due to light diffraction will go a long way to make the terrain look more realistic.
Title: Re: Help required
Post by: Stainless on January 21, 2020, 03:46:53 AM
More help required.

Now that I have a way of generating maps for any location in the world, I want to get some mission planning working.

To do that I need two things, order of battle by date, and air force structure.

I have a data base for the RAF airfields which needs some work, I am thinking of making the data I have available in git and asking people to help refine it.

Would any of you be willing and able to do some data entry?

The second thing I need is an organisational diagram for each force.

This is where it gets confusing.

For the RAF , the official structure is

RAF Command -> Groups -> Wings -> Stations ->Squadrons

So you would have 11 group controlling some fighter wings based at some stations made up of some squadrons.

I have all the groups encoded, with locations.

I have all the stations and which squadrons were based there and when they were based there

I have the operational strength of all the squadrons at date time.

But I cannot find any mention of wings.

I have a list of wing commanders, but not which wings they controlled and not what stations they were based at.

Has anyone got any data that can help out with that?

Also has anyone got the equivalent for the Luftwaffe at the start of the battle of Britain.


Cheers guys
Title: Re: Help required
Post by: Pursuivant on January 26, 2020, 01:47:56 PM
I can help. Historical research/data entry are things I'm very good at and it's dead simple to get RAF and Luftwaffe Orders of Battle down to the squadron level. Entire books have been written on the subject.

IIRC, groups and squadrons were sometimes assigned to wings as needed. Other than that, units assigned to bases within a Wing Commander's command area were formally or informally under his control.

That said, for any WW1 or WW2 air campaign, the real trick is finding effective squadron strength, precise aircraft models (e.g., Spitfire Mk Ia vs. just "Spitfire"), and other operational readiness factors (e.g., fuel, ammo, and supplies availability, pilot quality, morale) for a given squadron on a given day.
Title: Re: Help required
Post by: Stainless on January 27, 2020, 03:14:14 AM
Thanks man,

I am drowning in work at the moment.

The plan is to have a database that can be used by anyone to get a list of active airbases at a given date, in a given region, to make it easier to create missions.

I will find a way of sharing the database and we can start extending what I have as we go along.

Will post more here when I come up with a good solution.

Title: Re: Help required
Post by: Pursuivant on January 28, 2020, 01:22:04 PM
The BoB has been a favorite of hex & chit wargame for decades and old-school wargamers are obsessive about their research. (For example, the Osprey books were originally published with them in mind.)

So, you might find this link useful. It touches on the sort of issues that modelers and flight simmers tend to overlook and the interviews are short reads.

http://www.airbattle.co.uk/b_designer_notes.html
Title: Re: Help required
Post by: Pursuivant on January 28, 2020, 01:39:17 PM
I assume that you've already got this page. It lists Fliegerkorps (AKA Wing - sort of) commanders for August 1940. I don't believe that any of the Fliegerkorps commanders were replaced during the BoB.

https://en.wikipedia.org/wiki/Luftwaffe_order_of_battle_August_1940
Title: Re: Help required
Post by: Stainless on February 03, 2020, 01:31:09 PM
Added support for AC3D objects.

This means we can use all the objects from FlightGear as base objects for editing.

It was quite a suprise to see the range of quality of the meshes.

Some are quite nice, like this.

(https://i.postimg.cc/m2F0b8z3/Desktop-Screenshot-2020-02-03-20-20-40-54.png) (https://postimg.cc/4ms8Pv1n)

And some are bloody awful.

(https://i.postimg.cc/MGtLsLNw/Desktop-Screenshot-2020-02-03-20-12-35-100.png) (https://postimg.cc/5HYpysfK)

Compare that with the carriers available for download from this site and you really start to appreciate just how talented the people here are!


Title: Re: Help required
Post by: Stainless on March 08, 2020, 04:07:40 AM
Can someone sanity check this for me please?

Just looks wrong

Code: [Select]
namespace GuruEngine.Characters.Ranks.Luftwaffe
{
    /// <summary>
    /// subcodes
    ///   5 post 1944
    ///   1 subrank
    ///   2 cadet
    ///   10 Flyers
    ///   11 Paratroopers
    ///   12 Anti aircraft gunner
    ///   13 Communications
    ///   14 Air force
    /// </summary>
    public class LuftwaffeRankTable
    {
        public static Dictionary<int, String> Ranks = new Dictionary<int, string>();
        public static Dictionary<String, String> ShortForm = new Dictionary<string, string>();

        public LuftwaffeRankTable()
        {
            Ranks.Add(Rank.MakeCode(RankCodes.QR1, 0, false), "Flieger");
            Ranks.Add(Rank.MakeCode(RankCodes.QR2, 0, false), "Gefreiter");
            Ranks.Add(Rank.MakeCode(RankCodes.QR3, 0, false), "Obergefreiter");
            Ranks.Add(Rank.MakeCode(RankCodes.QR4, 0, false), "Hauptgefreiter");
            Ranks.Add(Rank.MakeCode(RankCodes.QR4, 5, false), "Stabsgefreiter");
            Ranks.Add(Rank.MakeCode(RankCodes.QR5, 0, false), "Unteroffizier");
            Ranks.Add(Rank.MakeCode(RankCodes.QR5, 2, false), "Fahnenjunker");
            Ranks.Add(Rank.MakeCode(RankCodes.QR5, 1, false), "Unterfeldwebel");
            Ranks.Add(Rank.MakeCode(RankCodes.QR5, 3, false), "Fähnrich");
            Ranks.Add(Rank.MakeCode(RankCodes.QR6, 0, false), "Feldwebel");
            Ranks.Add(Rank.MakeCode(RankCodes.QR7, 0, false), "Oberfeldwebel");
            Ranks.Add(Rank.MakeCode(RankCodes.QR7, 1, false), "Oberfähnrich");
            Ranks.Add(Rank.MakeCode(RankCodes.QR8, 0, false), "Stabsfeldwebel");

            Ranks.Add(Rank.MakeCode(RankCodes.OF0, 0, false), "Leutnant");
            Ranks.Add(Rank.MakeCode(RankCodes.OF1, 0, false), "Oberleutnant");
            Ranks.Add(Rank.MakeCode(RankCodes.OF2, 0, false), "Hauptmann");
            Ranks.Add(Rank.MakeCode(RankCodes.OF3, 0, false), "Major");
            Ranks.Add(Rank.MakeCode(RankCodes.OF4, 0, false), "Oberstleutnant");
            Ranks.Add(Rank.MakeCode(RankCodes.OF5, 0, false), "Oberst");
            Ranks.Add(Rank.MakeCode(RankCodes.OF6, 0, false), "Generalmajor");
            Ranks.Add(Rank.MakeCode(RankCodes.OF7, 0, false), "Generalleutnant");
            Ranks.Add(Rank.MakeCode(RankCodes.OF8, 10, false), "General der Flieger");
            Ranks.Add(Rank.MakeCode(RankCodes.OF8, 11, false), "General der Fallschirmtruppe");
            Ranks.Add(Rank.MakeCode(RankCodes.OF8, 13, false), "General der Luftnachrichtentruppe");
            Ranks.Add(Rank.MakeCode(RankCodes.OF8, 12, false), "General der Flakartillerie");
            Ranks.Add(Rank.MakeCode(RankCodes.OF8, 14, false), "General der Luftwaffe");
            Ranks.Add(Rank.MakeCode(RankCodes.OF9, 0, false), "Generaloberst");
            Ranks.Add(Rank.MakeCode(RankCodes.OF10, 0, false), "Generalfeldmarschall");
            Ranks.Add(Rank.MakeCode(RankCodes.OF11, 0, false), "Reichsmarschall");

            ShortForm.Add("Flieger", "Flg");
            ShortForm.Add("Gefreiter", "Gefr");
            ShortForm.Add("Obergefreiter", "Ogfr");
            ShortForm.Add("Hauptgefreiter", "Hptgefr");
            ShortForm.Add("Stabsgefreiter", "Sbsgefr");
            ShortForm.Add("Unteroffizier", "Uffz");
            ShortForm.Add("Fahnenjunker", "Fhr");
            ShortForm.Add("Unterfeldwebel", "Ufw");
            ShortForm.Add("Fähnrich", "Fhr");
            ShortForm.Add("Feldwebel", "Fw");
            ShortForm.Add("Oberfeldwebel", "Obfw");
            ShortForm.Add("Oberfähnrich", " Obfhr");
            ShortForm.Add("Stabsfeldwebel", "Stabsfw");
            ShortForm.Add("Leutnant", "Lt");
            ShortForm.Add("Oberleutnant", "Olt");
            ShortForm.Add("Hauptmann", "Hptm");
            ShortForm.Add("Major", "Maj");
            ShortForm.Add("Oberstleutnant", "ObLt");
            ShortForm.Add("Oberst", "Ob");
            ShortForm.Add("Generalmajor", "GenMaj");
            ShortForm.Add("Generalleutnant", "GenLt");

            ShortForm.Add("General der Flieger", "GendFl");
            ShortForm.Add("General der Fallschirmtruppe", "GendFal");
            ShortForm.Add("General der Luftnachrichtentruppe", "GendLuft");
            ShortForm.Add("General der Flakartillerie", "GendFlak");
            ShortForm.Add("General der Luftwaffe", "GendL");

            ShortForm.Add("Generaloberst", "GenOb");
            ShortForm.Add("Generalfeldmarschall", "GenFeldm");
            ShortForm.Add("Reichsmarschall", "RM");
        }

    }
}

The first table has a list of all ranks, the parameters to MakeCode are (Nato rank equivalent, sub code, IsFemale) 

The second the short form of the rank

Title: Re: Help required
Post by: Stainless on July 19, 2020, 04:18:39 AM
I have added point lights to the deferred renderer when guns fire, the effect is very subtle, but interesting.

So the gunfire lights the aircraft.

I remember reading an after action report from a beaufighter pilot who claimed he was able to locate and shoot down two JU88's by tracking the light from the engines. He said that the engines sparked brightly enough for him to see the aircraft and get into a shooting position.

Does anyone else think this is correct? 

Do I need to add point lights for each engine?

Title: Re: Help required
Post by: Dimlee on July 19, 2020, 01:33:02 PM
The flames (up to 1 m long) from engines were considered a serious problem for the Soviet Pe-8 bomber. Flights were stopped in 1943 after 4 aircraft were shot down within 9 days. Flights were resumed only after the flame arresters were tested and installed.
Probably it was a common issue in all air forces? I remember stories about PVO (anti-air defense) of Moscow where some German bombers were intercepted due to engine exhaust flames.
Title: Re: Help required
Post by: Pursuivant on July 19, 2020, 04:40:28 PM
I have added point lights to the deferred renderer when guns fire, the effect is very subtle, but interesting

How subtle is subtle? The muzzle flash from a HMG or autocannon can be very impressive in darkness. To limit this effect, some night fighters had flash hiders attached to the ends of their gun barrels.

https://ww2db.com/image.php?image_id=9651

I remember reading an after action report from a beaufighter pilot who claimed he was able to locate and shoot down two JU88's by tracking the light from the engines. He said that the engines sparked brightly enough for him to see the aircraft and get into a shooting position.

Does anyone else think this is correct?

Absolutely. That's why night fighters and night bombers of the era had "flame dampers" over the exhaust ports. They had to be added in order to conceal the flames both to avoid detection and to preserve the crew's night vision. Additionally, the exhaust stacks on some aircraft got hot enough that they glowed red hot, which also gave them away.

Examples:

https://ww2db.com/image.php?image_id=11362

http://www.ipmsstockholm.org/magazine/2006/06/stuff_eng_profile_night_spitfires.htm

You will need to create potential light points for EVERY exhaust port on the engine, meaning 12+ for engines which didn't collect the exhaust gasses into just a few manifolds.

Since flames/glow effects could vary based on aircraft type, model, and modifications, it's probably one of those things where you should just create a suitable tool to allow modders to do the fiddly work.
Title: Re: Help required
Post by: Stainless on July 20, 2020, 12:53:35 AM
Okay so the best thing I can do is add another game component, say EngineFlashComponent.

That will require...

HookTo give location
Particle systemThis is the only way to do thousands of lights for the forward renderer, and an extra effect for the deferred renderer
Lighting parametersColour, intensity, size


The way you do point lights in the deferred renderer is you render a small mesh at the lights location into the light buffer. For every pixel inside the area of the mesh, you extract the position of the pixel in world coordinates and it's normal. Then run a lighting equation on the pixel and write it to the light buffer.

So for an engine exhaust I would need to add a new mesh shape for this. Instead of drawing a simple sphere, I should allow a box aligned with the exhaust.

Light shape

Hmmm

Yes I think that would work, the box shape will light the mesh and the particle system can be used to mark the individual exhaust pipes

Title: Re: Help required
Post by: Stainless on September 03, 2020, 09:17:15 AM
I am finalising animation for cockpits and there are a few functions I would like someone to explain to me.

The ones I am puzzled by are .....

Code: [Select]
float getball(float limit)
This seems to get acceleration values and convert them into an angle which is then limited to +- limit. What does it represent?

Code: [Select]
fm.getW()
W is not really enough of a description for me to work out what it is

Code: [Select]
fm.Or.getKren()
Kren..... never heard of Kren.... I think he drinks in my local though

Code: [Select]
fm.Or.getTangage()
Tangage ..... Is this French for Pitch?

Cheers guys


Title: Re: Help required
Post by: sniperton on September 03, 2020, 09:57:24 AM
The last two are pitch and roll in Russian:

https://ru.wikipedia.org/wiki/%D0%A2%D0%B0%D0%BD%D0%B3%D0%B0%D0%B6

Title: Re: Help required
Post by: Pursuivant on September 03, 2020, 07:41:34 PM

Code: [Select]
float getball(float limit)
This seems to get acceleration values and convert them into an angle which is then limited to +- limit. What does it represent?

My first guess is that it's the data for an old-style bank indicator where you've got an inverted crescent-shaped spirit level. As you bank the aircraft the angle of the bubble changes from the vertical. IIRC, the I-16 has such an indicator and I believe that similar items were used in WW1-era aircraft.

If it just takes acceleration data, then there might be similar instruments which just measure momentary acceleration along a particular axis.
Title: Re: Help required
Post by: Stainless on September 05, 2020, 01:23:21 AM
Code: [Select]
protected float getBall(double paramDouble)
  {
    double d1 = 0.0D;
    long l1 = Time.current();
    long l2 = l1 - this.oldBallTime;
    this.oldBallTime = l1;
    if (l2 > 200L) l2 = 200L;
    double d2 = 0.00038D * l2;
    if (-this.fm.getBallAccel().z > 0.001D) {
      d1 = Math.toDegrees(Math.atan2(this.fm.getBallAccel().y, -this.fm.getBallAccel().z));
      if (d1 > 20.0D) d1 = 20.0D;
      else if (d1 < -20.0D) d1 = -20.0D;
      this.pictBall = ((1.0D - d2) * this.pictBall + d2 * d1);
    } else {
      if (this.pictBall > 0.0D) d1 = 20.0D; else
        d1 = -20.0D;
      this.pictBall = ((1.0D - d2) * this.pictBall + d2 * d1);
    }
    if (this.pictBall > paramDouble) this.pictBall = paramDouble;
    else if (this.pictBall < -paramDouble) this.pictBall = (-paramDouble);
    return (float)this.pictBall;
  }

Okay so the code calls into this.fm.getBallAccel()

Code: [Select]
public Vector3d getBallAccel() {
    TmpV.set(this.LocalAccel);
    if (this.Vwld.lengthSquared() < 10.0D) {
      double d = this.Vwld.lengthSquared() - 5.0D;
      if (d < 0.0D) d = 0.0D;
      TmpV.scale(0.2D * d);
    }

    TmpA.set(0.0D, 0.0D, -Atmosphere.g());
    this.Or.transformInv(TmpA);

    TmpA.sub(TmpV);
    return TmpA;
  }

Which looks like it tries to convert local acceleration into a scaled impulse???

Code: [Select]
d1 = Math.toDegrees(Math.atan2(this.fm.getBallAccel().y, -this.fm.getBallAccel().z));
So the angle is formed from the forward impulse and the up impulse. so its some kind of up impulse.


 
Title: Re: Help required
Post by: Stainless on September 05, 2020, 01:33:51 AM
So it is slip indicator .....  ;)
Title: Re: Help required
Post by: Stainless on September 19, 2020, 05:58:42 AM
I have added an OxygenSuppplyComponent

This only has two parameters

CapacityIn litres
AutomaticBoolean

This is linked to the hypoxia system so if you fly too high for two long you will blackout and eventually die if luck does not take you below 15000 feet.

The problem is I can only find limited data.

I am using an approximation that the pilot requires 1 litre of oxygen per second for each ten thousand feet above 15000 feet.

However the only data I can find for the Spitfire quotes 750 litres of O2 , which seems bloody little to me.

It only gives you some 10 minutes of flight above 15000 feet, can't be correct.

Anyone got any other data?


Title: Re: Help required
Post by: Michkov on September 19, 2020, 04:22:25 PM
I am using an approximation that the pilot requires 1 litre of oxygen per second for each ten thousand feet above 15000 feet.

Is that a typo? I did a quick search and everything is in the liters per minute range. This (https://www.aopa.org/news-and-media/all-news/1998/september/pilot/o2-issues) mentions 1l/min/10000ft as a good rule of thumb.
Title: Re: Help required
Post by: Stainless on September 20, 2020, 02:31:56 AM
Okay that was my mistake.

A pilot needs 1 litre of AIR  per second per 10,000 feet.

The oxygen required is much less than that and the approximation 1 litre of OXYGEN per minute per 10,000 feet seems much more sensible.

Thanks Michkov
Title: Re: Help required
Post by: Stainless on December 12, 2020, 09:49:57 AM
So I have upgraded my object tester to allow me to check animation ranges on game objects.

And it looks like I have mesh issues.

https://youtu.be/gaPnCVwL_gg

You can clearly see the barrel of the gun moves through the head of the gun.

Can anyone tell me if this is normal ?

Or is the flak 88 bugged?

Title: Re: Help required
Post by: Stainless on December 13, 2020, 02:57:55 PM
I realised I needed a second animation type where the head is animated as well as the gun

https://www.youtube.com/watch?v=STc7ou6rMq4&feature=youtu.be

Flak 88 still looks bugged
Title: Re: Help required
Post by: Pursuivant on December 15, 2020, 08:33:21 PM
It's not you, the animation is screwed. Only the barrel/breech and recoil recovery mechanism recoils not the entire gun carriage. Also, the recoil speed is wrong and the travel distance looks to be excessive.

If you want to be a real stickler for accuracy, there's also no recoil effect on the gun stand given the relative angle of fire. It should pitch up slightly on the side closest to the gun barrel when the gun is fired. Add dust effects as necessary for effects of muzzle blast and the gun platform slamming back into position.

Assuming that the model is actually a Flak 36-37 88mm the model is also wrong, the legs of the gun stand should be thinner and the gun carriage/elevation mechanism should be thinner and shaped differently.

There are plenty of videos out there, both contemporary and modern, showing the Flak 36 in action. No excuse to get the animation and model so badly wrong.