Post by felixffds on Oct 17, 2007 21:49:40 GMT -5
Until now, attaching landing lights to animated parts was an impossibility. WIth FSDS3.5.1 we now have that ability, although at first it wasn't obvious. Working with Louis Sinclair and Fr. Bill, we've clarified the way to do it. It may not be perfect and not work in all situations, but the net result.
landing (and taxi) lights that are directional and can be attached to animated parts
the possibility (since I haven't tested it) of making FS-X compliant hardened platforms, etc.
In essence we now have the same capability that the gmax Attachpoint tool gives the gmaxers.
This is my little Stits Playboy (it started life as an FSDS1 FS2000 model), showing off a landing light attached to the right spat.
reate a small (or large, it shouldn't matter since the "attach point" generates no geometry) point for the effect to attach to.
In this case, I placed a small triangle just ahead of the part, and tagged "attachpt_landing_1" (note that per the FS-X SDK this NEEDS a unique name so that if you want a second landing light, you can name it "attachpt_landing_2" and add another blurb)
Then the following attachpoint xml blurb is added to a PartDataDefs.txt file in your main FSDS 3.5 folder:
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>
THERE MUST BE AT LEAST ONE ANIMATION IN YOUR MODEL. My first attempt, on a basic cylnder and attached light were not working. Note that the visibility condition is "general light" which is a part in the modeldef.xml file, therefore, if there is no animation, an *.xanim file is not there for xtomdl.exe to parse through the modeldef.xml file and you get a "fixed" light that doesn't respond to the "L" and "CTRL-L" keyboard commands.
To get the light "spread" I went whole hog and assigned the attachpt_landing_1 part a material that had all channels (sorry for the gmaxspeak) 255 and a specular of 40. With just the default material, you get a tiny point light.
I "aimed" the light with the Y axis. I rotated the part in x so as to point the Y axis opposite - to the rear of the plane -
IF you want a second landing light, it appears that you have to create a new attachpoint tag (attachpt_landing_2) and add a modified blurb to the PartDataDefs.txt file.
You would also have to add to the modeldef.xml file the appropriate visibility condition if it isn't already there, such as a taxi light
(The following is courtesy of Fr. Bill:
Add to the PartDataDefs.txt file:
attachpt_taxi_1 <?xml version="1.0" encoding="ISO-8859-1" ?> <FSMakeMdlData version="9.0"> <Attachpoint name="attachpt_taxi_1"> <AttachedObject> <Effect effectName="fx_landing" effectParams=""/> </AttachedObject> </Attachpoint> <Visibility name="taxi_light"> </Visibility> </FSMakeMdlData>
To the modeldef.xml file:
<Animation name="taxi_light" guid="43347384-cff6-479c-a654-9b9cd33e4f09" length="100" type="Sim" typeParam2="taxi_light" typeParam="AutoPlay" />
<PartInfo>
<Name>taxi_light</Name>
<AnimLength>100</AnimLength>
<Visibility>
<Parameter>
<Sim>
<Variable>LIGHT TAXI</Variable>
<Units>bool</Units>
</Sim>
</Parameter>
</Visibility>
</PartInfo>
---------------------------------------
OF course I repeat my thanks to Louis and Fr. Bill, you don't think I can make all of this up myself, eh?
---------------------------------------
the PartsDataDefs.txt file is a straight text file placed in the main FSDS35 folder and will hold the attach point XML blurbs that FSDS will parse into the x file, and then process with xtomdl.
You should be able to add a scenery type xml blurb (Create the platform polygon, add the blurb to tell it its concrete or whatever) and have a hard surface. etc. I haven't tried the scenery aspect of it yet.
landing (and taxi) lights that are directional and can be attached to animated parts
the possibility (since I haven't tested it) of making FS-X compliant hardened platforms, etc.
In essence we now have the same capability that the gmax Attachpoint tool gives the gmaxers.
This is my little Stits Playboy (it started life as an FSDS1 FS2000 model), showing off a landing light attached to the right spat.
reate a small (or large, it shouldn't matter since the "attach point" generates no geometry) point for the effect to attach to.
In this case, I placed a small triangle just ahead of the part, and tagged "attachpt_landing_1" (note that per the FS-X SDK this NEEDS a unique name so that if you want a second landing light, you can name it "attachpt_landing_2" and add another blurb)
Then the following attachpoint xml blurb is added to a PartDataDefs.txt file in your main FSDS 3.5 folder:
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>
THERE MUST BE AT LEAST ONE ANIMATION IN YOUR MODEL. My first attempt, on a basic cylnder and attached light were not working. Note that the visibility condition is "general light" which is a part in the modeldef.xml file, therefore, if there is no animation, an *.xanim file is not there for xtomdl.exe to parse through the modeldef.xml file and you get a "fixed" light that doesn't respond to the "L" and "CTRL-L" keyboard commands.
To get the light "spread" I went whole hog and assigned the attachpt_landing_1 part a material that had all channels (sorry for the gmaxspeak) 255 and a specular of 40. With just the default material, you get a tiny point light.
I "aimed" the light with the Y axis. I rotated the part in x so as to point the Y axis opposite - to the rear of the plane -
IF you want a second landing light, it appears that you have to create a new attachpoint tag (attachpt_landing_2) and add a modified blurb to the PartDataDefs.txt file.
You would also have to add to the modeldef.xml file the appropriate visibility condition if it isn't already there, such as a taxi light
(The following is courtesy of Fr. Bill:
Add to the PartDataDefs.txt file:
attachpt_taxi_1 <?xml version="1.0" encoding="ISO-8859-1" ?> <FSMakeMdlData version="9.0"> <Attachpoint name="attachpt_taxi_1"> <AttachedObject> <Effect effectName="fx_landing" effectParams=""/> </AttachedObject> </Attachpoint> <Visibility name="taxi_light"> </Visibility> </FSMakeMdlData>
To the modeldef.xml file:
<Animation name="taxi_light" guid="43347384-cff6-479c-a654-9b9cd33e4f09" length="100" type="Sim" typeParam2="taxi_light" typeParam="AutoPlay" />
<PartInfo>
<Name>taxi_light</Name>
<AnimLength>100</AnimLength>
<Visibility>
<Parameter>
<Sim>
<Variable>LIGHT TAXI</Variable>
<Units>bool</Units>
</Sim>
</Parameter>
</Visibility>
</PartInfo>
---------------------------------------
OF course I repeat my thanks to Louis and Fr. Bill, you don't think I can make all of this up myself, eh?
---------------------------------------
the PartsDataDefs.txt file is a straight text file placed in the main FSDS35 folder and will hold the attach point XML blurbs that FSDS will parse into the x file, and then process with xtomdl.
You should be able to add a scenery type xml blurb (Create the platform polygon, add the blurb to tell it its concrete or whatever) and have a hard surface. etc. I haven't tried the scenery aspect of it yet.