PDA

View Full Version : GR2 aircraft debugging (Whitley)


kapuhy
10-10-20, 03:55 PM
So here's little something I'm currently working on, a test import of aircraft model in GR2 format. The original model (https://sketchfab.com/3d-models/whitley-9b6bb975b67d43ab89cf933fc76556da) was created by manilov.ap (you can find his amazing aircraft models collection on Sketchfab HERE (https://sketchfab.com/manilov.ap)), it's Coastal Command's
Armstrong Whitworth Whitley bomber:

https://i.imgur.com/KnEfOmN.jpg

https://i.imgur.com/xJhsGzS.jpg

Textures are still unfinished and there's no campaign integration yet, I left this for when I am sure plane works 100% correctly. Which it currently does not, because I got stuck on a few bugs:

1. I have no idea which file stores ammunition types for machine guns used on aircraft. Because of this, I can't select any ammo type for wpn_Cannon controllers other than "NONE", meaning guns don't shoot.

2. For reasons unknown, "Basic" loadout of the plane does not show up in test single mission (it does in Museum), and since I seem to remember that in campaigns planes use this loadout by default, I'm worried it would show in campaign without crew and bombs.

3. This one is not "fatal" but also annoying - plane parts can break off (wings, tail etc) but it is for some reason very rare - when Sunderland gets destroyed it almost always breaks apart, while Whitley falls down in one piece in 9 out of 10 cases.

I'll keep trying to fix problems mentioned above, but I also made this thread hoping that someone might be able to point me in the right direction :06:


The test package (containing new plane and test mission in which you can see it in action) here (requires TWoS 2.2.20 to run) can be downloaded from here:

TEST PACKAGE DOWNLOAD (https://drive.google.com/file/d/1DS8d-uP5M0fbx2GTCNe_dehP05Mte4tY/view?usp=sharing)

Mad Mardigan
10-11-20, 02:11 AM
Seem to recall watching dog fight/plane-ship attacks... that not always did planes fall apart mid-crash or prior to crashing....

So, the fact that the plane isn't coming apart at the seams 100% of the time.. is not really a problem.

At least in My own opinion... any way... that's just My own personal observation.

Others, may or may not agree with that assessment.. & that's ok...

Other than that looks nice..

Hopefully you can get some help on sorting out the other issues you are facing with working on this aircraft... :yeah:

Looking forward to seeing this being added to the roster... :yep:

M. M.

:Kaleun_Salute:

vdr1981
10-13-20, 05:32 AM
Looking great Kapuhy! :up::up::up:


1. I have no idea which file stores ammunition types for machine guns used on aircraft. Because of this, I can't select any ammo type for wpn_Cannon controllers other than "NONE", meaning guns don't shoot.
If I'm not mistaken, all other airplanes have ammo type set to "NONE" as well, and yet they are operational? Right? :hmmm:


2. For reasons unknown, "Basic" loadout of the plane does not show up in test single mission (it does in Museum), and since I seem to remember that in campaigns planes use this loadout by default, I'm worried it would show in campaign without crew and bombs.Could it be something related to dates in planes eqp files?:hmmm:
EDIT: Disregard this, other airplanes don't have dates in their eqp files as well...

kapuhy
10-13-20, 06:09 AM
If I'm not mistaken, all other airplanes have ammo type set to "NONE" as well, and yet they are operational? Right? :hmmm:

They have it set to "Unknown" - usually it means you cannot edit value unless you merge file containing these values into project in Goblin. It's similar with funnel smoke, effect type is displayed as "unknown" unless you merge particles_funnelsmoke.dat with opened unit in Goblin, then you can choose smoke types.

Rosomaha
10-13-20, 07:25 AM
Welcome, kapuhy

try this: Open your plane.GR2 + plane.sim, next MERGE with (…\data\Library\) shells.dat AND +shells.sim (This should reveal the mysterious “Unknown” in the source files)

kapuhy
10-13-20, 08:29 AM
Welcome, kapuhy

try this: Open your plane.GR2 + plane.sim, next MERGE with (…\data\Library\) shells.dat AND +shells.sim (This should reveal the mysterious “Unknown” in the source files)

Aaaah.... of course! I forgot to merge sim file.

Thank you so much :salute:

EDIT: Allright - weapons free:

https://i.imgur.com/njAdIdg.jpg

By the way, smallest guns in shells.dat file are 20mm, is this what all aircraft in game are armed with? This would make planes armed (historically) with 7.7 and 12.7 mm guns tad overpowered.

kapuhy
10-22-20, 03:02 AM
I somehow debugged basic loadout, though I don't really understand what was the cause. I changed ordnance carried from Bomb_Cluster to DC_Cluster and suddenly crew and bombs were visible, and plane started to drop DC's.

So, I thought Bomb_Cluster is bugged and to test it, changed back to Bomb_Cluster... to my surprise it still works.

I suspect now the problem lied with txt file, I had situations before with ships where adding one more empty line (aka hitting enter) at end of file magically debugged it. Must have been something of that sort :hmmm:

gap
11-04-20, 01:33 PM
So here's little something I'm currently working on, a test import of aircraft model in GR2 format...

Sooo nice! I have all the aircraft models by manilov (and by many other 3D modellers) stored on my HD. Baside planes, my 3D archive includes ships, submarines, land vehicles, various landmarks, etc. That's the result of years of research on the internet. If in future you are going to need a template for your own work, just ask me: there is some chance that I can help :)

Welcome, kapuhy

try this: Open your plane.GR2 + plane.sim, next MERGE with (…\data\Library\) shells.dat AND +shells.sim (This should reveal the mysterious “Unknown” in the source files)

:up:

I somehow debugged basic loadout, though I don't really understand what was the cause. I changed ordnance carried from Bomb_Cluster to DC_Cluster and suddenly crew and bombs were visible, and plane started to drop DC's.

So, I thought Bomb_Cluster is bugged and to test it, changed back to Bomb_Cluster... to my surprise it still works.

I suspect now the problem lied with txt file, I had situations before with ships where adding one more empty line (aka hitting enter) at end of file magically debugged it. Must have been something of that sort :hmmm:

I think I had the same happening a while back. If memory serves, the problem was a space character after the missing equipment (or maybe no space)...

Likewise, eqp and sns files need an empty line at their end, else they will be ignored.

Macgregor the Hammer
11-08-20, 06:57 PM
Nice A.S.V. antenna detail!

If memory serves, the Whitley used an experimental pseudo-monocoque fuselage. It was corrugated aluminum and tubing that didn't work out too well. Any torsion along fuselage would tear the aircraft apart. Not a quality you want in an aircraft.

Can't wait to see the end product!

MacGregor

gap
11-09-20, 04:41 AM
If memory serves, the Whitley used an experimental pseudo-monocoque fuselage. It was corrugated aluminum and tubing that didn't work out too well. Any torsion along fuselage would tear the aircraft apart. Not a quality you want in an aircraft.

Nice point!

Torsion is something that we can't simulate in game, but fuselage fragility and it breaking apart under enemy gunfire, should be relatively easy to be achieved.

kapuhy
11-09-20, 03:09 PM
Nice A.S.V. antenna detail!

Credit goes to manilov.ap, I just reduced polycount a bit and modified uv maps.

If memory serves, the Whitley used an experimental pseudo-monocoque fuselage. It was corrugated aluminum and tubing that didn't work out too well. Any torsion along fuselage would tear the aircraft apart. Not a quality you want in an aircraft.

Thanks for the hint! I might fiddle with plane's rudders to make it less maneuverable (simulating cautious handling by crew aware of their plane's fragility - though I'd have to test if AI can handle it without crashing into sea), and maybe add low hp/critical damage zone somewhere in fuselage for occasional critical hit.

Meanwhile, it's getting awful crowded in my sky with 5 new and 2 remodeled/repainted aircraft already in the pipeline, in various stages of completion.

gap
11-10-20, 06:07 AM
Credit goes to manilov.ap, I just reduced polycount a bit and modified uv maps.

That is quite some work by you anyway :03:


Thanks for the hint! I might fiddle with plane's rudders to make it less maneuverable (simulating cautious handling by crew aware of their plane's fragility - though I'd have to test if AI can handle it without crashing into sea)

Nice idea. On a more general note I wonder whether - within reasonable limits - wing/rudder drag coefficients can be used to simulate in game the general improvement in aircraft handling from interwar planes to late-war designs. Far from being an expert of aerodynamics, in the past I have tried to investigate which property, off the ones that are commonly listed in aircraft specs, can be used as a measure of their "agility", and I have found wing loading (i.e. the total mass / wing area ratio) to be a good compromise.


and maybe add low hp/critical damage zone somewhere in fuselage for occasional critical hit.

A while back I have had more or less the same idea. I wanted to place a critical hit damage zones in aircraft cockpit, to simulate the killing of their pilot(s) by a lucky shot. I never tested its feasibility though. In the forst place, are critical zones going to work for air units/gun shots? :hmm2:


Meanwhile, it's getting awful crowded in my sky with 5 new and 2 remodeled/repainted aircraft already in the pipeline, in various stages of completion.

Good!

Besides the planes that you have mentioned to me in one of your last emails, there is a bunch of other aircraft, missing from SH5, which had some importance in the ASW / anti-shipping / coastal patrol role both as embarked and land-based planes. Most of them are very popular and have been modelled many times, but a few of them - mostly interwar and early-war ones - despite their extensive usage early in the war, had a limited operational success and they are almost unknown to the videogaminig / 3D modelling world.

P.S: have you read my last e-amils to you?

kapuhy
11-10-20, 06:37 AM
P.S: have you read my last e-amils to you?

Yes, I did (thanks for the model, already ported it to Blender and started prepping it for import to SH5).

gap
11-10-20, 08:31 AM
Yes, I did (thanks for the model, already ported it to Blender and started prepping it for import to SH5).

The US patrol bomber?

kapuhy
11-10-20, 08:36 AM
The US patrol bomber?

:yep:

gap
11-10-20, 08:42 AM
:yep:

:up:

Have you looked already into the books and websites that I pointed you to?
I have some more information that I can share with you when you are ready to process it :03:

kapuhy
11-10-20, 09:15 AM
Have you looked already into the books and websites that I pointed you to?
I have some more information that I can share with you when you are ready to process it :03:

Sadly, I didn't have time so far - or to be more specific, I used the time I had to push work on plane models and textures a bit forward.

gap
11-10-20, 09:59 AM
Sadly, I didn't have time so far - or to be more specific, I used the time I had to push work on plane models and textures a bit forward.

To cut short, I sent you very detailed information on RAF Squadrons with aircraft models/variants operated, main stations and detachments, duties assigned/operation area and start/end dates for all of the above.

Moreover I sent you a link to a book listing all the Fleet Air Arm squadrons with their WWII histories. From there, you can grasp information on their equipment, bases, etc. though not as detailed as the one we have about RAF squadrons.

Take your time on it :salute:

kapuhy
11-27-20, 02:40 PM
I'm having a weird issue with Goblin Editor while modding planes. In short, Goblin doesn't seem to recognize the fact that bones have been moved using GR2 Editor. Thankfully, game does, but planes look weird in Goblin.

Here's the example: I moved stock US Heavy Bomber's wing up to make it look like Liberator. Since engines were moved, I had to adjust position of propeller bones. In game and GR2 editor everything looks fine, but Goblin fails to register that bones were moved:

https://i.imgur.com/Cm0d56S.jpg

It might be harmless (doesn't seem to affect planes in game) but is kinda annoying especially when trying to edit damage zones in Goblin.

gap
11-27-20, 03:49 PM
Have you noticed anything similar with any other part but spinning propellers?

kapuhy
11-27-20, 03:55 PM
Have you noticed anything similar with any other part but spinning propellers?

Rudders, gun barrels, glass covers of turrets. Only common thing between them I can see is that I repositioned these parts.

gap
11-27-20, 04:23 PM
Rudders, gun barrels, glass covers of turrets. Only common thing between them I can see is that I repositioned these parts.

Did you change only bone position data, without editing mesh coordinates?
Does GR2 Editor show the repositioned parts correctly?

kapuhy
11-27-20, 04:49 PM
Did you change only bone position data, without editing mesh coordinates?
Does GR2 Editor show the repositioned parts correctly?

Yes to both, btw I didnt even know you can change mesh coords in gr2 editor - always simply imported meshes already placed where they need to be in blender.

gap
11-27-20, 05:57 PM
Yes to both, btw I didnt even know you can change mesh coords in gr2 editor - always simply imported meshes already placed where they need to be in blender.

So correct me if I misunderstood you: you simply changed bone position data; you did not edit mesh position in Blender. Is that correct?

kapuhy
11-27-20, 06:17 PM
So correct me if I misunderstood you: you simply changed bone position data; you did not edit mesh position in Blender. Is that correct?

I did, but that's not when this happens. After I edit mesh position in Blender and import the mesh back, everything is ok and both Goblin and GR2 editor show the same result. However, when I change bone position (regardless if mesh was earlier edited with Blender or not), this happens:

https://i.imgur.com/5v1cme6.png

On first image, my current Heavy Bomber's rudder: bone position was earlier moved to have rudder's rotation center in right place.
On second image, the same plane after editing rudder bone position again.
I did not export/import anything between these images - just edited bone position data. In GR2 Editor this didn't result in moving the mesh, but in Goblin mesh itself has moved with the bone.

So, it's not as I initially thought that Goblin doesn't recognize moving bones, it just moves meshes along with them (except, apparently, in opposite direction?)

gap
11-27-20, 06:55 PM
I get your point. Unlike nodes in the .dat format, the working of bones is a bit confusing; not always what you see in GR2 Editor or in Goblin is equal to what you see in game.

This is an issue I had reported long ago:

https://www.subsim.com/radioroom/showpost.php?p=2178003&postcount=2259

BTW, the misplaced rudder in stuka's lod model has been fixed by a fellow subsim member:

https://www.subsim.com/radioroom/showthread.php?t=215466

Maybe you can download his fix and get inspiration from it.

Other than that, my suggestion is that you move rudder's bone in the desired position, and after doing that you re-import its mesh displaced in Blender so that it will show up correctly in game, and hopefully in Goblin Editor as well... :doh:

gap
11-28-20, 02:05 PM
@ kapuhy

Not entirely related to our recent conversation, but in case you want to take in consideration a proper alternative to the stock US Heavy Bomber, I cant point you to several Liberator models, including one model ripped from "Enemy Front" and two models coming from a popular SHIV megamod.

All of the above represent different variants of the aircraft, so if you don't want to trash the work you have already done on the stock model, you can use the alternative models as templates for checking proportions and for creating different variants of the bomber :salute: