FSDeveloper Community

Go Back   FSDeveloper Community > Microsoft Flight Simulator development > Aircraft Design > Graphics

Graphics Use this forum for all your graphics (eg. textures) related discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 12 Apr 2012, 22:27
Multipilot Multipilot is offline
  sweden
Join Date: Jan 2012
Posts: 50
Landing Light

Hello,

Anyone have a tutorial on how to create the landing/taxi light ground splash and how to turn it off and on using FSD?

I have tried to create a landing light ground splash in FSD and I made a semi-transparent polygon to act as light....and animated the polygon/light so that it moves down/into the ground and out of the visual field of the pilot in the VC when the light is turned off and the opposite when the light is turned on.

This does not give me the desired effect that I want because I want the light to turn off immidiately because the landing light bulbs dont move so the light emitted from the landing lights should not move either; just turn on and off.

I am using FSX.

Any hints or comments are appreciated

Regards,
John Stewart

ps. sending some photos of my project
Attached Thumbnails
Click image for larger version

Name:	2012-4-12_11-38-33-746.jpg
Views:	113
Size:	81.7 KB
ID:	12008   Click image for larger version

Name:	2012-4-12_11-38-20-526.jpg
Views:	125
Size:	98.1 KB
ID:	12009   Click image for larger version

Name:	2012-4-12_4-6-34-862.jpg
Views:	123
Size:	97.3 KB
ID:	12010  

Last edited by Multipilot; 12 Apr 2012 at 22:33.
Reply With Quote
  #2  
Old 13 Apr 2012, 16:39
tgibson tgibson is offline
  us-california
Location: San Diego
Join Date: Sep 2006
Posts: 3,154
Include a <Visibility> line in your XML code that tests for the landing light variable?
__________________
Tom Gibson
CalClassic Propliners
http://www.calclassic.com
Reply With Quote
  #3  
Old 20 Apr 2012, 07:45
Multipilot Multipilot is offline
  sweden
Join Date: Jan 2012
Posts: 50
Pesky landing light....

Can anyone give me the XML code for a landing light....so that I can see the programming structure?
Reply With Quote
  #4  
Old 20 Apr 2012, 13:44
n4gix n4gix is offline
  unitedstates
Location: Hammond, Indiana
Join Date: Sep 2006
Posts: 8,517
Quote:
Originally Posted by Multipilot View Post
Can anyone give me the XML code for a landing light....so that I can see the programming structure?
Code:
  <PartInfo>
    <Name>light_landing_on</Name>
    <Visibility>
      <Parameter>
        <Code>
          (A:LIGHT LANDING,bool)
          (A:ELECTRICAL MASTER BATTERY,bool)
          and
        </Code>
      </Parameter>
    </Visibility>
  </PartInfo>

  <PartInfo>
    <Name>light_landing_off</Name>
    <Visibility>
      <Parameter>
        <Code>
          (A:LIGHT LANDING,bool) !
          (A:ELECTRICAL MASTER BATTERY,bool) !
          or
        </Code>
      </Parameter>
    </Visibility>
  </PartInfo>
__________________
Bill Leaming
3d Modeler Max/GMax
C & XML Gauge Programmer
Eaglesoft Development Group
http://eaglesoftdg.com

Intel® Core™ i7-3770k 4.2GHz - Crucial 16GB DDR3 - Dual Radeon HD770 1GB DDR5 (Crossfire) - Eco II Watercooling - Win7 64bit
Intel® Core™ i7-2600k 3.4GHz - Crucial 4GB DDR3 - NVIDIA GeForce GTX550Ti 1GB - Win7 64bit
Intel® Core™ i7-860 2.8GHz - Crucial 8GB DDR3 - NVIDIA GeForce GTS240 1GB - Win8 64bit
NOTE: Unless explicitly stated otherwise, everything written by my hand is MY opinion. I do NOT speak for any company, real or imagined...
Reply With Quote
  #5  
Old 21 Apr 2012, 11:34
Multipilot Multipilot is offline
  sweden
Join Date: Jan 2012
Posts: 50
Thanks Bill.....should I insert a image parameter in the code some where as well?

How do I, "connect" the code to the landing light switch in the virtual cockpit? Do I have to insert X, Y, Z coordinates in the xml code to place it in the correct place over the switch in the virtual cockpit or how does that work?

Last edited by Multipilot; 21 Apr 2012 at 11:42.
Reply With Quote
  #6  
Old 22 Apr 2012, 11:42
n4gix n4gix is offline
  unitedstates
Location: Hammond, Indiana
Join Date: Sep 2006
Posts: 8,517
That script I posted is for the attachpoint for the fx_landing.fx effect file (lightsplash).

The switch is another script entirely, the script for which is already in the modeldef.xml file by default:

Code:
    <PartInfo>
        <Name>switch_landing_light</Name>
        <AnimLength>50</AnimLength>
        <Animation>
            <Parameter>
                <Sim>
                    <Variable>LIGHT LANDING</Variable>
                    <Units>bool</Units>
                    <Scale>50</Scale>
                </Sim>
                <Lag>400</Lag>
            </Parameter>
        </Animation>
        <MouseRect>
            <Cursor>Hand</Cursor>
            <HelpID>HELPID_GAUGE_LIGHT_SWITCH_LANDING</HelpID>
            <TooltipID>TOOLTIPTEXT_LIGHT_SWITCH_LANDING</TooltipID>
            <EventID>LANDING_LIGHTS_TOGGLE</EventID>
        </MouseRect>
    </PartInfo>
To use this, you would simply animate your 3d switch in the VC using 50 keyframes, then use the Animation Manager and Attachpoint Tool to assign "switch_landing_light" to the 3d switch object.
__________________
Bill Leaming
3d Modeler Max/GMax
C & XML Gauge Programmer
Eaglesoft Development Group
http://eaglesoftdg.com

Intel® Core™ i7-3770k 4.2GHz - Crucial 16GB DDR3 - Dual Radeon HD770 1GB DDR5 (Crossfire) - Eco II Watercooling - Win7 64bit
Intel® Core™ i7-2600k 3.4GHz - Crucial 4GB DDR3 - NVIDIA GeForce GTX550Ti 1GB - Win7 64bit
Intel® Core™ i7-860 2.8GHz - Crucial 8GB DDR3 - NVIDIA GeForce GTS240 1GB - Win8 64bit
NOTE: Unless explicitly stated otherwise, everything written by my hand is MY opinion. I do NOT speak for any company, real or imagined...
Reply With Quote
  #7  
Old 24 Apr 2012, 09:26
Multipilot Multipilot is offline
  sweden
Join Date: Jan 2012
Posts: 50
Alright......that make things a little bit clearer but I am using FS Design Studio and there is a animation funktion and I have animated the landing light switch but I can not find the attach point function as you described it Is this function only available in GMAX or do I have to write the code by hand?
Reply With Quote
  #8  
Old 24 Apr 2012, 11:28
n4gix n4gix is offline
  unitedstates
Location: Hammond, Indiana
Join Date: Sep 2006
Posts: 8,517
I have absolutely no idea how Louis integrated Attachpoints in FSDS...
__________________
Bill Leaming
3d Modeler Max/GMax
C & XML Gauge Programmer
Eaglesoft Development Group
http://eaglesoftdg.com

Intel® Core™ i7-3770k 4.2GHz - Crucial 16GB DDR3 - Dual Radeon HD770 1GB DDR5 (Crossfire) - Eco II Watercooling - Win7 64bit
Intel® Core™ i7-2600k 3.4GHz - Crucial 4GB DDR3 - NVIDIA GeForce GTX550Ti 1GB - Win7 64bit
Intel® Core™ i7-860 2.8GHz - Crucial 8GB DDR3 - NVIDIA GeForce GTS240 1GB - Win8 64bit
NOTE: Unless explicitly stated otherwise, everything written by my hand is MY opinion. I do NOT speak for any company, real or imagined...
Reply With Quote
  #9  
Old 24 Apr 2012, 13:06
Roy Holmes Roy Holmes is offline
  us-virginia
Location: Roanoke VA
Join Date: Feb 2011
Posts: 764
In the FSDS main folder there is a file called PartDataDefs.txt.
It should include this line of code:
Code:
attachpt_landing_1 	<?xml version="1.0" encoding="ISO-8859-1" ?> <FSMakeMdlData version="9.0"> <Attachpoint name="attachpt_landing_1"> <AttachedObject> <Effect effectName="fx_landing" effectParams=""/> </AttachedObject> </Attachpoint> <Visibility name="general_light"> </Visibility> </FSMakeMdlData>
You call the part attachpt_landing_1.

I'm not sure if it is necessary, but I add that name to the [FSX Aircraft visibility] section of another file called PartNames.txt.

Then in the Part Properties dialog, Browse, Category, FSX Aircraft Visibility dropdown, click onattachpt_landing_1.

That is how to do it in FSDS

Roy
Reply With Quote
  #10  
Old 24 Apr 2012, 18:02
n4gix n4gix is offline
  unitedstates
Location: Hammond, Indiana
Join Date: Sep 2006
Posts: 8,517
In that case then, you might wish to use this that will take advantage of the custom <Visibility> script I suggested in my first post.

The "default" uses "general light" which isn't really very specific at all. The following will use "light_landing_on" which is keyed to both the battery switch and the landing light switch.

Lights should not be on if the master battery switch is OFF...

Code:
attachpt_landing_1 	<?xml version="1.0" encoding="ISO-8859-1" ?> <FSMakeMdlData version="9.0"> <Attachpoint name="attachpt_landing_1"> <AttachedObject> <Effect effectName="fx_landing" effectParams=""/> </AttachedObject> </Attachpoint> <Visibility name="light_landing_on"> </Visibility> </FSMakeMdlData>
__________________
Bill Leaming
3d Modeler Max/GMax
C & XML Gauge Programmer
Eaglesoft Development Group
http://eaglesoftdg.com

Intel® Core™ i7-3770k 4.2GHz - Crucial 16GB DDR3 - Dual Radeon HD770 1GB DDR5 (Crossfire) - Eco II Watercooling - Win7 64bit
Intel® Core™ i7-2600k 3.4GHz - Crucial 4GB DDR3 - NVIDIA GeForce GTX550Ti 1GB - Win7 64bit
Intel® Core™ i7-860 2.8GHz - Crucial 8GB DDR3 - NVIDIA GeForce GTS240 1GB - Win8 64bit
NOTE: Unless explicitly stated otherwise, everything written by my hand is MY opinion. I do NOT speak for any company, real or imagined...
Reply With Quote
  #11  
Old 24 Apr 2012, 21:24
Roy Holmes Roy Holmes is offline
  us-virginia
Location: Roanoke VA
Join Date: Feb 2011
Posts: 764
Bill
Thanks.
The FSDS PartDataDefs file is IMHO a bit of a mess.
It is also UberCritical about the number of spaces folowing the part name.
Another reason for my blankaphobia
Will modify accordingly. (the file that is, nothing I can do about the phobia)

Roy
Reply With Quote
  #12  
Old 09 May 2012, 22:18
Multipilot Multipilot is offline
  sweden
Join Date: Jan 2012
Posts: 50
Still having problems getting the landing light to work.

Hello again....

I am still not able to get the landing light to work. I have added the code that you two have mentioned above to the files mentioned.

The result is that I can see the light splash on the ground now but the animation of the landing light switch is, "stuck" I can't click the landing light switch anymore so that the switch move when I click it.

I have tried pressing Ctrl-L to turn on and off the landing light but the landing light splash remains lit and the switch moves using key commands but not when I click on it using the mouse?!?!

If I understand you two correctly I need the following to make this work:
(1) Make a landing light splash form using a polygon infront of the airplane; adding Alpha texturing and L texture on top of the polygon?
(2) Add the code to the .txt files mentioned by you two above?
(3) Make the light attach to the ground splash/polygon texture using FSDS light attach?
(4) Assign FSDS, "part name", "landing light" to the landing light switch?

anything else?

I should mention that this airplane is made for FSX and the landing lights can be seen on the exterior model and they turn on and off nicely on the exterior model but the problem is to see the landing light splash on the ground from the VC and to make the landing light switch turn on and off the light.

Regards,
John Stewart
Reply With Quote
  #13  
Old 22 May 2012, 15:28
Roy Holmes Roy Holmes is offline
  us-virginia
Location: Roanoke VA
Join Date: Feb 2011
Posts: 764
Quote:
(4) Assign FSDS, "part name", "landing light" to the landing light switch?
There is your problem. If you used the stock "switch_landing_light" animation in the modeldef file, you have to name the switch the same in FSDS. Easiest way is to look for that name in the FSDS FSX Animation drop down and select it.

Roy
Reply With Quote
  #14  
Old 24 May 2012, 01:26
Multipilot Multipilot is offline
  sweden
Join Date: Jan 2012
Posts: 50
Thanks Roy for the suggestion. I have tested changing the name of the landing light switch but it didn't work. I suspect I am doing something wrong with the texturing on the exterior polygon.

I have not created a .Xml or .fx file for the light because I don't see why I should make one when I am using the VC? FSDS add the correct information into the .model file and find the standard fsx landing lights after I have animated the landing light switch and added a correctly textured polygon when I compile the aircraft in FSDS; or no?

I don't know if I need to create a .Xml file and a .fx file? I have covered the polygon with a .tga texture having alpha activated on it. I have animated the switch....and I have attached the landing light but nothing happens when I switch the landing light switch.

John
Reply With Quote
  #15  
Old 24 May 2012, 08:49
Roy Holmes Roy Holmes is offline
  us-virginia
Location: Roanoke VA
Join Date: Feb 2011
Posts: 764
When I create a landing light with FSDS this is all I do.
1. Place a small polygon in front of the shape for the light. The Y axis of the polygon should be pointing backwards, opposite to the direction of the light beam. Call this polygon attachpt_landing_1. This means that the visual effect of a landing light "fx_landing.fx" will start from that attachment point. It will be visible in all views.
2.Name the switch by picking it from the FSX animated parts drop-down. You want switch_landing_light. Then animate it.

Since the stock switch_landing_light entry in modeldef.xml has a mouse rectangle, when compiled you should get a "Hand" cursor and a tooltip. They must be there for you to control the switch in the VC.

No textures involved.

Roy
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Landing light ground splash. demyhr Modeling 15 29 Mar 2012 00:00
[FSX] 3D Landing Lights using FSDS Anthony31 Modeling 6 28 Nov 2011 16:36
Light bulbs amahran General chat 5 11 Aug 2011 17:16
[FSXA] Unwanted default landing light ground splash Heretic Modeling 5 07 Jul 2011 11:00
Landing Light Glitch? ViperThreat Special Effects General 0 04 Jul 2010 04:20


All times are GMT -4. The time now is 00:28.

Kirsch designed by Andrew & Austin


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.