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: 9909
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: 59
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: 9909
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: 59
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: 9909
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: 609
Joined: Sun Nov 02, 2014 10:17 pm
Version: Git
OS: Win10

Previous

Return to Liveries

Who is online

Users browsing this forum: No registered users and 0 guests