FSXA 3D Landing Lights?

Heretic

Resource contributor
#1
First of all, I can't make the stock landing lights work. I attach them in Max 9 to dummy geometry with the Attach Tool and they show up fine in FSX...but as red or green beacons instead of lights (they HAVE been tagged with the "fx_landing" effect and "general light" for visibility). :confused:

So I decided to give "real" 3D lights a go.

I crashed and burned with VRS' instructions posted here right at the "create your own code" part since my XML knowledge is still limited and never working. :(

Anyways, I found Bill L.'s "illuminate stuff" (ramp)lights a seemingly easier solution. So I built a stack of polies as a test object:


The materials are set up as per Bill L.'s instructions and are correctly placed in the aircraft "Texture" folder in the correct format.

But here's the headscratcher: How can I make them show up on an aircraft in FSX?

I needed some XML code with visibility tags that doesn't make the geometry disappear, like the "light_general" one, so I tried using an L: variable (that save the lights from invisibility?) controlled by a controller dummy.

Here's the code for the controller, assigned with the Animation Tool:
Code:
<Animation name="LL_controller" guid="7ded7f85-adb0-4eb1-b6e9-1ebdd9f7575b" length="100" type="Sim" typeparam2="LL_controller" typeparam="AutoPlay" />


<PartInfo> 
  <Name>LL_controller</Name>   
  <AnimLength>100</AnimLength>    
   <Animation>   
     <Parameter>     
         <Code>
          (A:LIGHT LANDING,bool) 1 == (A:ELECTRICAL MASTER BATTERY,bool) 1 == and 
          if{ 1 (&gt;L:LL_Custom,bool)}
          els{ 0 (&gt;L:LL_Custom,bool)}
         </Code>  
     </Parameter>   
   </Animation>  
</PartInfo>
So the controller determines the state of the landing lights and battery switches and gives out an appropriate response as an L:var.

And here's the visibility code for the stack of polies, assigned with the Attach Tool:
Code:
<PartInfo>
	<Name>Landing_Light_Custom</Name>
	<Visibility>
	  <Parameter>
		<Code>
		  (L:LL_Custom,bool) 1 == if{ 1 } els { 0 }
		</Code>
	  </Parameter>
	</Visibility>
  </PartInfo>
Visibility is controlled by the state of the L:var.

Something wrong there?


I *need* those 3D lights, at least for my taxi lights which are attached to the steerable nose gear.

*If* this can be convinced to work, there's another issue: Those landing light beams are pretty huge and thus messing up the views in the aircraft preview window and in spot mode in the sim. I could animate the beams to be small when stowed and huge when deployed with a scale animation. Does FSX support those?

Other than that, I'd be grateful for different ideas...
 
Last edited:

n4gix

Resource contributor
#2
*If* this can be convinced to work, there's another issue: Those landing light beams are pretty huge and thus messing up the views in the aircraft preview window and in spot mode in the sim. I could animate the beams to be small when stowed and huge when deployed with a scale animation. Does FSX support those?

Other than that, I'd be grateful for different ideas...
FSX does not support scale animations, unfortunately.

The only way to make 3d lights ("Lotus L-39" style) is to use animated bones to control the size/position of the "light polygons."

This technique was explicated at Freeflight Design about four or five months ago, as you've noted. I have however greately simplified the system, finding that there's no real need for all the complications of having so many stacked layers.

Custom XML "controller code" (which was also posted) is used to control the size and position of the "light polygon(s)" based on the on/off state, as well as the altitude of the aircraft. You see, you want the "light polys" to "stick to the ground" and not float in the air ahead of the aircraft... :D

Write to me directly at n4gix@comcast.net and I will send you an example. Are you using GMax or Max?

Alternatively, you could use what you have now, and simply use Arno's wonderful RADitor utility to reset the radius of the model to fix the Preview window as well as the Spot View camera distance...
 
Last edited:

Heretic

Resource contributor
#3
I have however greately simplified the system, finding that there's no real need for all the complications of having so many stacked layers.
I see what you mean.

Custom XML "controller code" (which was also posted) is used to control the size and position of the "light polygon(s)" based on the on/off state, as well as the altitude of the aircraft. You see, you want the "light polys" to "stick to the ground" and not float in the air ahead of the aircraft... :D
The problem of the Lotus/VRS method is that you can't attach the lights to anything!

So what would I do about the taxi lights then?

Write to me directly at n4gix@comcast.net and I will send you an example. Are you using GMax or Max?
Max 9. E-Mail is on the way.

Alternatively, you could use what you have now, and simply use Arno's wonderful RADitor utility to reset the radius of the model to fix the Preview window as well as the Spot View camera distance...
Well, what I have now doesn't work.
But thanks for the hint about RADiator.
 

n4gix

Resource contributor
#4
The problem of the Lotus/VRS method is that you can't attach the lights to anything!
Not true! In fact, I'm going to send you the complete nosegear taxi light example...

...just as soon as I cool down a bit.

I had to walk home from the garage...

...it's only two blocks, but it's 104º F here today!
 

Heretic

Resource contributor
#6
Thanks for the e-mail, Bill!

I'm still investigating *my* method. The XML code definately works now after some modifications, but I still can't see any lights so it's possibly a material issue, as *any* object with that material refuses to display.

Hmm...
 

Heretic

Resource contributor
#7
Wilson, I've made light!




Turns out you shall read instructions for materials better than just assuming you've got a normal transparent material. :eek:

Now how to exploit this best...
 
#8
Wow, that looks really nice, but what about making a cone and slice off the part that goes underground and then flip the normals? It would give a more solid look I think... ;)
 

Heretic

Resource contributor
#9
Wow, that looks really nice, but what about making a cone and slice off the part that goes underground and then flip the normals? It would give a more solid look I think... ;)
Yeah, was thinking about that as well. That would mostly help illuminating the fuselage.

But I got the XML code and material working, and that's *very* important. :D
 

Heretic

Resource contributor
#10
Whee!

Lotus'/VRS' system is working. Trial and error but damn me, it's working!

Here's the lights at work. Note the increasing brightness.








I have no idea what a light splash should look like in terms of size though...anyone?



Oh, and: THANK YOU MIKE/JON/BILL!
 

n4gix

Resource contributor
#11
Nicely done sir! Just in case you haven't discovered this yet, you absolutely can NOT Link any of the skinned mesh polygons to anything. They must remain at the top level of the model's hierarchy... :)

Also, when you have time, try creating a small version and use is as "panel lighting" in the VC... :)
 

Heretic

Resource contributor
#12
Haven't linked the polies to anything.

You can't even <Visibility> tag them, right?
Otherwise, you wouldn't need to clone those bones to get the gradual intensity effect...

And the VC will be done later. For now, it's all about the external model. But I'll keep that in mind.


Also, I'm thinking about putting this into a tutorial. Could I use your XML examples for that and do you think Jon/Mike would mind?
(All on the base of proper crediting of course.)
 
#13
Also, when you have time, try creating a small version and use is as "panel lighting" in the VC... :)
That's what I have been playing with. At this point I have a post light that has 5 separate degrees of brightness. I can clone & place them all over the panel in no time! The thing to keep in mind is that you are somewhat limited in that since you are using a poly for the effect it cannot be over placed anything you have a mouserect applied to! ;)

 
Last edited:

n4gix

Resource contributor
#14
Very nicely done, Robert! I first thought of this as a possibility while working on my 33MO scenery and used this techique for "porch lights," having one poly vertically place and another horizontally placed.

Yes, one must ensure that none of the polys cover an active "mouse area" otherwise things will go pear-shaped in a heartbeat. Frequent testing is required to make certain... :cool:
 

n4gix

Resource contributor
#15
Haven't linked the polies to anything.

You can't even <Visibility> tag them, right?
Otherwise, you wouldn't need to clone those bones to get the gradual intensity effect...

Also, I'm thinking about putting this into a tutorial. Could I use your XML examples for that and do you think Jon/Mike would mind?
(All on the base of proper crediting of course.)
That is correct. You cannot have <Visibility> on the bones either!

Since the information has already been made "public knowledge" I cannot forsee any objection to such a tutorial.
 

Heretic

Resource contributor
#16
That is correct. You cannot have <Visibility> on the bones either!
Would have been cool for even MORE gradual intensity transition.

I don't want to afford the 8 bone sets per light VRS used.

Since the information has already been made "public knowledge" I cannot forsee any objection to such a tutorial.
Okay, cool. Let's see if I can get something scribbled down on the weekend.
 

Heretic

Resource contributor
#17
Okay, the splashes look good and work...but somehow I'm too dumb to make the light *cones* work...say I can never make them look convincing, no matter what base (cone, plane) and array I use.

Anyone want to kick me in the rear with a hint or two? :D


- Edit:
The beacon also misbehaves...it works, but has a green navlight stuck to it. I've already tried re-doing the whole dummy mesh and re-tagging it (default beacon.fx and Bill L.'s visibility code), to no avail. Anyone?
 

Attachments

Last edited:

n4gix

Resource contributor
#18
What "light cones?" I don't use any at all...

I do have a set of .fx files that give me an expanding "foggy ball of light," that that's another trick aside from the 3d poly ground splashes.
 

Heretic

Resource contributor
#19
I do have a set of .fx files that give me an expanding "foggy ball of light," that that's another trick aside from the 3d poly ground splashes.
Do they also illuminate the surroundings (rain/fuselage)?



Well, I managed to pursue my own solution. With some calculations and input from Vitus this is what I have now:













The other side will be easy, but I do NOT look forward doing the whole array for the taxi lights (which apparently complement the landing lights on every landing IRL). :ziplip:



- Edit: Bill, I still need a solution for the beacon. Any ideas? Would doing a "custom" .fx file work?
 

n4gix

Resource contributor
#20
That's looking very nice!

Yes and yes for the fuselage/rain. Note how the nose gear taxi light "bloom" is angled slightly downwards.



Although I must say I do like your solution!

I didn't like any of the "Beacon" .fx files, so I wrote my own controller script for the Beacon which allows me to "illuminate" the glass cover and the "light bulb" nicely:

Code:
  <PartInfo>
    <Name>C310_BeaconLight</Name>
    <Visibility>
      <Parameter>
        <Code>(A:LIGHT BEACON,bool) 0 &gt; (A:ELECTRICAL MASTER BATTERY,bool)
          and (P:Absolute time,seconds) 1 % 0.7 > and if{ 1 } els{ 0 }</Code>
      </Parameter>
    </Visibility>
  </PartInfo>
It's "on" for 0.3 seconds and "off" for 0.7 seconds.
 
Last edited:
Top