Board index FlightGear Development Aircraft Liveries

MRTT tanker liveries

Discussion of aircraft textures and liveries

Re: MRTT tanker liveries

Postby Thorsten » Sun Sep 16, 2018 6:34 am

I'm guessing somewhere in either the "XXXX-Set", "XXXX-Main" or "XXXX"-xml. this is set to "true" I just can't find it.


The idea is correct though - look in blender what the gear object is called, search the aircraft xml (grep under Linux is really the tool for this, not sure what equivalent people use under Mac or Win) for anything that affects this object, and you'll find the animation that moves gear - from there you can study what properties this refers to,
Thorsten
 
Posts: 11649
Joined: Mon Nov 02, 2009 8:33 am

Re: MRTT tanker liveries

Postby RobAndrew » Sun Sep 16, 2018 12:42 pm

Okay, so i'm nearly there!

I'm not sure how, but when I placed the livery on to the model, it replicated the model a couple of times. I have opened it ad saved it a couple times so maybe thats got something to do with it? Either way, I had to get rid of a ton of stuff from the list of items in Blender to get rid of the Multi-wing issue. Surprisingly it also removed the Main undercarriage...???
Now I'm just left with the nose wheel to try and remove....

Thorsten wrote in Sun Sep 16, 2018 6:34 am:
I'm guessing somewhere in either the "XXXX-Set", "XXXX-Main" or "XXXX"-xml. this is set to "true" I just can't find it.


The idea is correct though - look in blender what the gear object is called, search the aircraft xml (grep under Linux is really the tool for this, not sure what equivalent people use under Mac or Win) for anything that affects this object, and you'll find the animation that moves gear - from there you can study what properties this refers to,


so I found this in the animations xml. It's the closest I can find to relating to movement of undercarriage.

Code: Select all
<animation>
      <type>rotate</type>
      <object-name>NoseGear</object-name>
      <property>gear/gear[0]/position-norm</property>
      <interpolation>
            <entry>
                <ind>0</ind>
                <dep>110</dep>
            </entry>
            <entry>
                <ind>0.2</ind>
                <dep>110</dep>
            </entry>
            <entry>
                <ind>1.0</ind>
                <dep>0</dep>
            </entry>
        </interpolation>
      <center>
         <x-m>-15.79</x-m>
         <y-m>0</y-m>
         <z-m>-2.58</z-m>
      </center>
      <axis>
         <y>1</y>
      </axis>
   </animation>
   
   <animation>
      <type>translate</type>
      <object-name>NoseWheel</object-name>
      <object-name>NGearStrut</object-name>
      <property>gear/gear[0]/position-norm</property>
      <interpolation>
            <entry>
                <ind>0</ind>
                <dep>0.5</dep>
            </entry>
            <entry>
                <ind>0.2</ind>
                <dep>0.5</dep>
            </entry>
            <entry>
                <ind>1.0</ind>
                <dep>0</dep>
            </entry>
        </interpolation>
      <axis>
         <z>1</z>
      </axis>
   </animation>
   
   <animation>
      <type>translate</type>
      <object-name>NoseGear</object-name>
      <property>gear/gear[0]/position-norm</property>
      <interpolation>
            <entry>
                <ind>0</ind>
                <dep>0.1</dep>
            </entry>
            <entry>
                <ind>0.2</ind>
                <dep>0.1</dep>
            </entry>
            <entry>
                <ind>1.0</ind>
                <dep>0</dep>
            </entry>
        </interpolation>
      <axis>
         <x>-1</x>
      </axis>
   </animation>


It then goes on with the left and right gear and gear doors in the same fashion. I'm just not sure exactly what part of this i'm meant to edit? I did try to switch the x and y axis figures around, but that didn't do anything.
RobAndrew
 
Posts: 134
Joined: Thu Jul 12, 2018 4:59 pm
Version: 2017.3.1
OS: Mac OSX 10.11.6

Re: MRTT tanker liveries

Postby Thorsten » Sun Sep 16, 2018 2:38 pm

if you have the animation with your model, change /gear/gear[0]/position-norm in the animation into /my-properties/gear and set that to 0 or 1 - should retract or extend the gear for you.
Thorsten
 
Posts: 11649
Joined: Mon Nov 02, 2009 8:33 am

Re: MRTT tanker liveries

Postby RobAndrew » Sun Sep 16, 2018 3:40 pm

Okay, so I changed the original code to:

Code: Select all
<animation>
      <type>rotate</type>
      <object-name>NoseGear</object-name>
      <property>my-properties/gear[1]</property>
      <interpolation>
            <entry>
                <ind>0</ind>
                <dep>110</dep>
            </entry>
            <entry>
                <ind>0.2</ind>
                <dep>110</dep>
            </entry>
            <entry>
                <ind>1.0</ind>
                <dep>0</dep>
            </entry>
        </interpolation>
      <center>
         <x-m>-15.79</x-m>
         <y-m>0</y-m>
         <z-m>-2.58</z-m>
      </center>
      <axis>
         <y>1</y>
      </axis>
   </animation>
   
   <animation>
      <type>translate</type>
      <object-name>NoseWheel</object-name>
      <object-name>NGearStrut</object-name>
      <property>my-properties/gear[1]</property>
      <interpolation>
            <entry>
                <ind>0</ind>
                <dep>0.5</dep>
            </entry>
            <entry>
                <ind>0.2</ind>
                <dep>0.5</dep>
            </entry>
            <entry>
                <ind>1.0</ind>
                <dep>0</dep>
            </entry>
        </interpolation>
      <axis>
         <z>1</z>
      </axis>
   </animation>
   
   <animation>
      <type>translate</type>
      <object-name>NoseGear</object-name>
      <property>my-properties/gear[1]</property>
      <interpolation>
            <entry>
                <ind>0</ind>
                <dep>0.1</dep>
            </entry>
            <entry>
                <ind>0.2</ind>
                <dep>0.1</dep>
            </entry>
            <entry>
                <ind>1.0</ind>
                <dep>0</dep>
            </entry>
        </interpolation>
      <axis>
         <x>-1</x>
      </axis>
   </animation>


I also changed them to [0] and nothing has happened. The A330 package i'm using represents 3 different A330 variants all in the same package-I cleaned the file up quite a bit and basically just left the shell and livery with relevant xml files. Have I potentially removed a file that I shouldn't have? there was an additional "Nasal" folder that I removed, could that have anything to do with it?
RobAndrew
 
Posts: 134
Joined: Thu Jul 12, 2018 4:59 pm
Version: 2017.3.1
OS: Mac OSX 10.11.6

Re: MRTT tanker liveries

Postby Thorsten » Sun Sep 16, 2018 4:27 pm

It really does work like this.

Look at a working example of an aircraft with movable gear, try to understand the principle from there, tinker with it to make it query your own properties, apply this to your use case.

There's a dozen things you can do wrong (path spelling, modifying the wrong file, modifying the wrong property, animation refers to the wrong object,...) - you need to understand the basic principle (which you can best do by starting from a working example) and then apply it to double-check your own use case.

I can't work out from here why something doesn't work at your end on the first try - every time I do an animation myself I work through a checklist, trying to make sure my code really refers to what I want.
Thorsten
 
Posts: 11649
Joined: Mon Nov 02, 2009 8:33 am

Re: MRTT tanker liveries

Postby Richard » Sun Sep 16, 2018 4:53 pm

General debug of animations as follows:

1. Run with the console open; often this problem is caused by using an incorrect object-name in the .xml
2. Watch the console for error messages. Use debug->Reload model and watch the console.
2. Use the property inspector (/ key) to verify that the property contains the value you expect.
Richard
 
Posts: 778
Joined: Sun Nov 02, 2014 10:17 pm
Version: Git
OS: Win10

Re: MRTT tanker liveries

Postby RobAndrew » Tue May 12, 2020 2:04 pm

Sorry to bring up an old thread of mine, but i'm having issues which I thought I could solve myself, but clearly I can't!

I have a really nice A330 MRTT tanker modeled, with livery and ready to be used in a scenario. However i'm struggling to get it to actually give fuel as such. I've done some testing and seems like when flying and in the AI tanker role (When activated through "Call tanker" or whatever it is) the standard A330-MRTT gives fuel. As it should. Parameters are adjusted through the slider. However when the same aircraft is in my AI scenario, the aircraft won't give fuel, despite having none of it's files changed. <AI><tanker><refuel><contact> is set to true within a few meters of the Contact point, yet no fuel is given.
To make this easier, I was wondering how possible it is, to use <systems><refuel> (The property for the original tanker controls) in my AI scenario. So that, when I turn the scenario on, I can adjust contact radius from given points and actually make it refuel. I'd have to add my detailed A330-200 MRTT to the tanker.xml list in scenarios i'm guessing, and give it contact points.
This seems pretty hard to word for myself. Hopefully I've got something across? i've tried all sorts of things over a few days but I just end up making things worse!

Anyway thanks to anyone who's made it this far!
RobAndrew
 
Posts: 134
Joined: Thu Jul 12, 2018 4:59 pm
Version: 2017.3.1
OS: Mac OSX 10.11.6

Re: MRTT tanker liveries

Postby RobAndrew » Tue May 12, 2020 11:16 pm

I took another look at it today and started from the bottom. I've managed to get an AI aircraft working as a tanker and giving fuel. The problem is the radius still though as it's a good 10 meters away from contact point. I've deciphered that the tanker.xml has nothing to do with this and is there for the additional AI tankers that come as standard (The service that lets you spawn them in)
Is there any way that I can set the contact points for a tanker in an AI scenario? If I should be, where should I be placing <contact> tags?
RobAndrew
 
Posts: 134
Joined: Thu Jul 12, 2018 4:59 pm
Version: 2017.3.1
OS: Mac OSX 10.11.6

Re: MRTT tanker liveries

Postby wkitty42 » Wed May 13, 2020 5:02 pm

the contact tag goes in the tankers.xml file AFAICS...

is there a problem adding your tanker to that file with the others??
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 6503
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: MRTT tanker liveries

Postby RobAndrew » Wed May 13, 2020 10:06 pm

Yeah I've tried changing those. I tried lowering the x-value on the standard A330-MRTT (to get the contact closer to the aircraft) but it stops it from giving fuel. Interestingly enough, looking in the properties, it looks like it's still making contact but not giving fuel.
to me it's unclear what to do with the tanker.xml file. Clearly it has some form of interaction with the aircraft, even in an AI scenario, but I'm not doing it right? Perhaps I should lower all values (X, y and Z) at the same rate? Not sure.
RobAndrew
 
Posts: 134
Joined: Thu Jul 12, 2018 4:59 pm
Version: 2017.3.1
OS: Mac OSX 10.11.6

Previous

Return to Liveries

Who is online

Users browsing this forum: No registered users and 0 guests