VISUAL EFFECTS EXAMPLES
This page lists some examples of the XML used to create Visual Effects in Microsoft Flight Simulator. You can find more information about the different XML elements used in these examples from the following page:
Complete Effect - Contrail
The XML shown below is an example of a complete effect for creating aircraft contrails:
<?xml version="1.0" encoding="UTF-8"?>
<SimBase.Document Type="AceXML" version="1,0">
<Descr>AceXML Document</Descr>
<WorldBase.Flight>
<VisualEffect.VisualEffect InstanceId="{904EC2CE-F8DD-4480-99E7-B33F7CF6E114}">
<Name>Contrails_RIBBON</Name>
<EmitterList>
<ObjectReference InstanceId="{1969C736-D184-484A-B845-44B2612397F4}" id="Emitter"/>
</EmitterList>
</VisualEffect.VisualEffect>
<VisualEffect.Emitter InstanceId="{1969C736-D184-484A-B845-44B2612397F4}">
<Capacity>1200.000</Capacity>
<MaxDistanceEmission>60000.000</MaxDistanceEmission>
<ParticleRate>{D0437518-8907-4DE5-9973-6C751C4BC39D}, 0.000000</ParticleRate>
<ParticleRateType>Distance</ParticleRateType>
<ParticleInit>
<ObjectReference InstanceId="{29F1717C-8183-41E4-87D7-DFE3FB3C4317}" id="BlockParticleInit"/>
</ParticleInit>
</VisualEffect.Emitter>
<VisualEffect.BlockParticleInit InstanceId="{29F1717C-8183-41E4-87D7-DFE3FB3C4317}">
<ParticleLifetime>
<FloatIn>{AD7743F6-3392-4C61-A95D-B4E041590642}, 0.000000</FloatIn>
</ParticleLifetime>
<ParticleUpdate>
<ObjectReference InstanceId="{7E818355-22B4-4670-AFA9-D1E59A361D96}" id="BlockParticleUpdate"/>
</ParticleUpdate>
<ParticleVelocity>
<Float3In>{74CDC4A1-0571-47B9-B598-201FBED37F76}, 0.000000, 0.000000, 0.000000</Float3In>
</ParticleVelocity>
</VisualEffect.BlockParticleInit>
<VisualEffect.BlockParticleUpdate InstanceId="{7E818355-22B4-4670-AFA9-D1E59A361D96}">
<ParticleOutput>
<ObjectReference InstanceId="{8F12BC9F-B7D8-484C-9569-F15A5DFB4E69}" id="Output"/>
</ParticleOutput>
<ParticleSize>
<FloatIn>{18412C95-E4D0-485C-9D81-54A96E589634}, 0.000000</FloatIn>
</ParticleSize>
</VisualEffect.BlockParticleUpdate>
<VisualEffect.Output InstanceId="{8F12BC9F-B7D8-484C-9569-F15A5DFB4E69}">
<PrimitiveType>Ribbon</PrimitiveType>
<Material>{003A712E-62CF-4F2C-A811-C5FC17ADCD1B}</Material>
<ParticleColor>
<ColorIn>{00336AC4-E654-4065-9BD5-40C56D61B91B}, 0, 0, 0, 0</ColorIn>
</ParticleColor>
</VisualEffect.Output>
<VisualEffect.Float InstanceId="{CD314712-E9B9-4FAD-9E9D-D98E04CAE74D}">
<OutputValue>{AD7743F6-3392-4C61-A95D-B4E041590642}</OutputValue>
<x>{00000000-0000-0000-0000-000000000000}, 40.000000</x>
</VisualEffect.Float>
<VisualEffect.Float InstanceId="{6BB10415-6322-4EE1-B153-58633549C2AC}">
<OutputValue>{A4792B2E-2EEE-43A5-A8EC-3D1FE61BF2C0}</OutputValue>
<x>{00000000-0000-0000-0000-000000000000}, 70.000000</x>
</VisualEffect.Float>
<VisualEffect.GetBezierCurve InstanceId="{9C9E5B38-8779-4650-8C8D-5454CC468C45}">
<OutputValue>{36D16B9D-B113-494B-A2B5-828AD9CCEBFE}</OutputValue>
<FXTime>{8C887F59-DACC-489A-B250-33E32B46A720}, 0.000000</FXTime>
<Curve>0.000,0.000,NAN,-0.004,0.064,0.007,0.003,NAN,0.080,0.463,-0.477,-0.475,0.928,-0.002,0.005,NAN</Curve>
</VisualEffect.GetBezierCurve>
<VisualEffect.Vector4 InstanceId="{003585A5-0316-42D8-BA53-E2445B78F9F0}">
<OutputValue>{00336AC4-E654-4065-9BD5-40C56D61B91B}</OutputValue>
<x>{00000000-0000-0000-0000-000000000000}, 1.000000</x>
<y>{00000000-0000-0000-0000-000000000000}, 1.000000</y>
<z>{00000000-0000-0000-0000-000000000000}, 1.000000</z>
<w>{D211B744-4AF4-4CA9-8360-E36F23B7AF2A}, 0.000000</w>
</VisualEffect.Vector4>
<VisualEffect.GetParticleAttribute InstanceId="{EA93FDED-2565-4894-A0D5-F7ECD57CFBC2}">
<OutputValue>{8C887F59-DACC-489A-B250-33E32B46A720}</OutputValue>
<ParticleAttributeType>AgeOverLifetime</ParticleAttributeType>
</VisualEffect.GetParticleAttribute>
<VisualEffect.MultiplyOperation InstanceId="{2DD24F31-0DE7-4979-A18A-DECB9CE61025}">
<OutputValue>{18412C95-E4D0-485C-9D81-54A96E589634}</OutputValue>
<xVariant>{A4792B2E-2EEE-43A5-A8EC-3D1FE61BF2C0}, 0.000000</xVariant>
<yVariant>{6B9E95E6-6A4F-4455-BD3A-AC5393327F67}, 0.000000</yVariant>
</VisualEffect.MultiplyOperation>
<VisualEffect.GetBezierCurve InstanceId="{66FB59F4-86AD-4BED-8479-2B769BC120A2}">
<OutputValue>{6B9E95E6-6A4F-4455-BD3A-AC5393327F67}</OutputValue>
<FXTime>{8C887F59-DACC-489A-B250-33E32B46A720}, 0.000000</FXTime>
<Curve>0.000,0.000,NAN,NAN,0.270,0.669,-0.217,0.146,0.949,1.000,NAN,NAN</Curve>
</VisualEffect.GetBezierCurve>
<VisualEffect.Clamp InstanceId="{8237A4D6-BF11-4A03-AE04-F6B0DC0E442C}">
<OutputValue>{D211B744-4AF4-4CA9-8360-E36F23B7AF2A}</OutputValue>
<x>{36D16B9D-B113-494B-A2B5-828AD9CCEBFE}, 0.000000</x>
<z>{00000000-0000-0000-0000-000000000000}, 1.000000</z>
</VisualEffect.Clamp>
<VisualEffect.Float InstanceId="{A1F92557-A7AF-4A28-A0F4-C6D3440ADE40}">
<OutputValue>{D0437518-8907-4DE5-9973-6C751C4BC39D}</OutputValue>
<x>{00000000-0000-0000-0000-000000000000}, 0.010000</x>
</VisualEffect.Float>
<VisualEffect.WindDirection InstanceId="{40DAEBDC-4A69-4D9A-81A9-F6F2BE1A2CFE}">
<OutputValue>{74CDC4A1-0571-47B9-B598-201FBED37F76}</OutputValue>
</VisualEffect.WindDirection>
</WorldBase.Flight>
</SimBase.Document>
Emitter Example
The XML shown below is a simple example of the XML used to define a single Emitter Block. Note that each effect can have one or more emitters in it:
<VisualEffect.Emitter InstanceId="{5224AC6B-B1C7-4566-97C2-1C1261E8249B}">
<EmitInLocalSpace>False</EmitInLocalSpace>
<Capacity>32.000</Capacity>
<ParticleRate>{00000000-0000-0000-0000-000000000000}, 8.000000</ParticleRate>
<ParticleRateType>Time</ParticleRateType>
<TimeEmission>-1</TimeEmission>
<Delay>0.000</Delay>
<MaxDistanceEmission>2000.000</MaxDistanceEmission>
<ParticleInit>
<ObjectReference InstanceId="{6EA84586-C0F4-4665-BC76-41F4A0C44830}" id="BlockParticleInit"/>
</ParticleInit>
</VisualEffect.Emitter>
StaticMesh Example
The XML shown below is a simple example of the XML used to define a single <VisualEffect.StaticMesh>
block. This example shows the basic block as it would generally be used:
<VisualEffect.StaticMesh InstanceId="{B6537934-100D-4F1F-A05E-2E433F3A3567}">
<StaticMeshPosition>{FF97CF94-B89A-4E0D-8EEF-FDDB4C7274F3}, 0.000000, 0.000000, 0.000000</StaticMeshPosition>
<StaticMeshRotation>{00000000-0000-0000-0000-000000000000}, -90.000000, 55.000000, 90.000000</StaticMeshRotation>
<StaticMeshScale>{D3514CD6-6F70-4BB2-80B6-BACC0CC788BD}, 1.000000</StaticMeshScale>
<Material>{DE37F56D-442C-45AB-A325-4572668CE135}</Material>
<Mesh>{58F995B0-49DE-40FD-B839-881844D30EAD}</Mesh>
</VisualEffect.StaticMesh>
This next example shows how the block XML would look if the block was using a Heat Deform material type:
<VisualEffect.StaticMesh InstanceId="{B6537934-100D-4F1F-A05E-2E433F3A3567}">
<StaticMeshPosition>{FF97CF94-B89A-4E0D-8EEF-FDDB4C7274F3}, 0.000000, 0.000000, 0.000000</StaticMeshPosition>
<StaticMeshRotation>{00000000-0000-0000-0000-000000000000}, -90.000000, 55.000000, 90.000000</StaticMeshRotation>
<StaticMeshScale>{D3514CD6-6F70-4BB2-80B6-BACC0CC788BD}, 1.000000</StaticMeshScale>
<Material>{DE37F56D-442C-45AB-A325-4572668CE135}</Material>
<Mesh>{58F995B0-49DE-40FD-B839-881844D30EAD}</Mesh>
<HeatDeformDeformation>{00000000-0000-0000-0000-000000000000}, 2.500000, 1.750000</HeatDeformDeformation>
<HeatDeformBlur>{CDA63B57-19F0-4EA6-974B-46320C5B2FFD}, 1.000000</HeatDeformBlur>
</VisualEffect.StaticMesh>
This final example shows how the block XML would look if it was using an Afterburner material type:
<VisualEffect.StaticMesh InstanceId="{B6537934-100D-4F1F-A05E-2E433F3A3567}">
<StaticMeshPosition>{FF97CF94-B89A-4E0D-8EEF-FDDB4C7274F3}, 0.000000, 0.000000, 0.000000</StaticMeshPosition>
<StaticMeshRotation>{00000000-0000-0000-0000-000000000000}, -90.000000, 55.000000, 90.000000</StaticMeshRotation>
<StaticMeshScale>{D3514CD6-6F70-4BB2-80B6-BACC0CC788BD}, 1.000000</StaticMeshScale>
<Material>{DE37F56D-442C-45AB-A325-4572668CE135}</Material>
<Mesh>{58F995B0-49DE-40FD-B839-881844D30EAD}</Mesh>
<AfterburnerPower>{79EE1094-52FF-432F-9F6E-D1680A85D4A7}, 1</AfterburnerPower>
<AfterburnerColor1>{00000000-0000-0000-0000-000000000000}, 255, 189, 35, 255</AfterburnerColor1>
<AfterburnerColor2>{6EA84586-C0F4-4665-BC76-41F4A0C44835}, 1, 1, 1, 1</AfterburnerColor2>
</VisualEffect.StaticMesh>
Node Examples
Below you can find examples of several different VFX Node Graph Nodes that can be used to create your effects:
GetInstanceAttribute
<VisualEffect.GetInstanceAttribute InstanceId="{D66FCBC3-F90F-4656-B035-ABBFAB668285}">
<InstanceAttributeType>ContactPoint</InstanceAttributeType>
<OutputValue>{8BC8B1C5-7526-4590-A1F7-00C34D808B1D}</OutputValue>
</VisualEffect.GetInstanceAttribute>
GetParticleAttribute
<VisualEffect.GetParticleAttribute InstanceId="{D3514CD6-6F70-4BB2-80B6-BACC0CC788BD}">
<AttributeType>id</AttributeType>
<OutputValue>{F3C8CF62-2A01-49DC-A37C-D163127FBAF8}</OutputValue>
</VisualEffect.GetParticleAttribute>
GetGroundAttribute
<VisualEffect.GetGroundAttribute InstanceId="{D3514CD6-6F70-4BB2-80B6-BACC0CC788BD}">
<GroundAttributeType>id</GroundAttributeType>
<OutputValue>{F3C8CF62-2A01-49DC-A37C-D163127FBAF8}</OutputValue>
</VisualEffect.GetParticleAttribute>
EmitterDirection
<VisualEffect.EmitterDirection InstanceId="{76DC2083-8540-4E4D-9CE6-89DD90A4D515}">
<EmitterDirectionType>Y+</EmitterDirectionType>
<OutputValue>{345A9153-2AEE-43F0-BDB9-79FC6843D4DE}</OutputValue>
</VisualEffect.EmitterDirection>
WindDirection
<VisualEffect.WindDirection InstanceId="{5DD2B2EB-6B86-46F5-A6CA-64167E88B341}">
<OutputValue>{0B254A32-8810-4155-B54F-BAFEE3D49087}</OutputValue>
<WindDirOptions>Normalized</WindDirOptions>
</VisualEffect.WindDirection>
AtlasPlayer
<VisualEffect.AtlasPlayer InstanceId="{6ED18A4E-DC3A-4E35-B603-063DD2ED38D6}">
<OutputValue>{1D93AF87-FE17-4C35-8990-02EA1A04CD79}</OutputValue>
<FrameRate>0.5</FrameRate>
</VisualEffect.AtlasPlayer>
GravityVector
<VisualEffect.GravityVector InstanceId="{CDA63B57-19F0-4EA6-974B-46320C5B2FFD}">
<GravityScale>{00000000-0000-0000-0000-000000000000}, 9.807</GravityScale>
<OutputValue>{318F7504-B393-45C7-822D-6A38AD1234DC}</OutputValue>
</VisualEffect.GravityVector>
SimVar
<VisualEffect.GetSimVar InstanceId="{7D466461-9070-425F-80A1-C74758EBC0A8}">
<SimvarType>PROP RPM</SimvarType>
<Unit>rpm</Unit>
<OutputValue>{BF0416C8-B9F4-4A63-ACA7-5E0485121C85}</OutputValue>
</VisualEffect.GetSimVar>
Lerp
<VisualEffect.Lerp InstanceId="{CB4A180B-ECA3-45F1-9923-A045F1C87651}">
<xVariant>{00000000-0000-0000-0000-000000000000}, 1.000000</xVariant>
<yVariant>{00000000-0000-0000-0000-000000000000}, 8.000000</yVariant>
<FXTime>{1384B3BB-7654-4F27-A43D-8974A16F7877}, 0.000000</FXTime>
<OutputValue>{D5F4EB80-1472-4E95-BB8F-85B7B0946E50}</OutputValue>
</VisualEffect.Lerp>
Clamp
<VisualEffect.Clamp InstanceId="{6435E809-249F-4B88-B0F6-64ADF48C29FD}">
<y>{D5F4EB80-1472-4E95-BB8F-85B7B0946E50}, 0.000000</x>
<z>{00000000-0000-0000-0000-000000000000}, 1.000000</z>
<OutputValue>{BE50390B-EE5A-4BB1-9FB9-92BE3FE259DD}</OutputValue>
</VisualEffect.Clamp>
SampleNoise
<VisualEffect.SampleNoise InstanceId="{D66FCBC3-F90F-4656-B035-ABBFAB668285}">
<NoiseType>Perlin</NoiseType>
<Coordinate3D>{BDE8E9FF-2B79-41B5-9B9E-10C18D62233F}, 0.000000, 0.000000, 0.000000</Coordinate3D>
<OutputValue>{48AE9ED8-6ACB-4D81-99A7-2A3B95C15621}</OutputValue>
</VisualEffect.SampleNoise>
Add
<VisualEffect.AddOperation InstanceId="{FF97CF94-B89A-4E0D-8EEF-FDDB4C7274F3}">
<xVariant>{1977EAE1-4E78-4DC0-838E-0EC8B53D060C}, 0.000000</xVariant>
<yVariant>{318F7504-B393-45C7-822D-6A38AD1234DC}, 0.000000</yVariant>
<OutputValue>{FE672E1C-6FBC-40AE-B93D-3770BE2C2063}</OutputValue>
</VisualEffect.AddOperation>
Subtract
<VisualEffect.SubtractOperation InstanceId="{1D93AF87-FE17-4C35-8990-02EA1A04CD79}">
<xVariant>{7E68323C-E75D-4F5B-988E-65DD4956F6BA}, 0.000000</xVariant>
<yVariant>{00000000-0000-0000-0000-000000000000}, 10.000000</yVariant>
<OutputValue>{BF0416C8-B9F4-4A63-ACA7-5E0485121C85}</OutputValue>
</VisualEffect.SubtractOperation>
Multiply
<VisualEffect.MultiplyOperation InstanceId="{6ED18A4E-DC3A-4E35-B603-063DD2ED38D6}">
<xVariant>{00000000-0000-0000-0000-000000000000}, 360.000000</xVariant>
<yVariant>{0133478C-8AE6-41CD-808C-CE9B9DB2B7B0}, 0.000000</yVariant>
<OutputValue>{EF88A2B9-C49D-4CCB-BF6A-B36DAF92A8FB}</OutputValue>
</VisualEffect.MultiplyOperation>
Divide
<VisualEffect.DivideOperation InstanceId="{6ED18A4E-DC3A-4E35-B603-063FF286AB2}">
<xVariant>{00000000-0000-0000-0000-000000000000}, 100.000000</xVariant>
<yVariant>{0133478C-8AE6-41CD-808C-CE9B9DB2B7B0}, 0.000000</yVariant>
<OutputValue>{318F7504-B393-45C7-822D-6A38AD1234DC}</OutputValue>
</VisualEffect.DivideOperation>
Pow
<VisualEffect.PowOperation InstanceId="{748DA266-4169-41F6-B992-D9AE68DD75A5}">
<xVariant>{48AE9ED8-6ACB-4D81-99A7-2A3B95C15621}, 0.000000</xVariant>
<yVariant>{00000000-0000-0000-0000-000000000000}, 2.000000</yVariant>
<OutputValue>{D07180F4-B796-4A5E-BEE9-FBF5264C9BB7}</OutputValue>
</VisualEffect.PowOperation>
Float
<VisualEffect.Float InstanceId="{E1962601-AEC6-483E-A854-757EFF5F05FB}">
<x>{00000000-0000-0000-0000-000000000000}, 4.000000</x>
<OutputValue>{FC379BDD-69EF-4D09-A912-749D3AB6BB19}</OutputValue>
</VisualEffect.Float>
Vector2, Vector3, Vector4
<VisualEffect.Vector4 InstanceId="{8BC8B1C5-7526-4590-A1F7-00C34D808B1D}">
<x>{00000000-0000-0000-0000-000000000000}, 1.000000</x>
<y>{00000000-0000-0000-0000-000000000000}, 1.000000</y>
<z>{4BD2FC23-9D73-4B9B-AE35-FCEA22AED562}, 0.000000</z> <!-- vec3, vec4 only -->
<w>{BF0416C8-B9F4-4A63-ACA7-5E0485121C85}, 0.000000</w> <!-- vec4 only -->
<OutputValue>{480EC47F-EEF0-4F86-B37B-A3F89071D651}</OutputValue>
</VisualEffect.Vector4>
RandomValue
<VisualEffect.RandomValue InstanceId="{2D6917D8-67FC-4C8E-8A1C-70AC4C848687}">
<MinRandValue>{00000000-0000-0000-0000-000000000000}, -0.500000</MinRandValue>
<MaxRandValue>{00000000-0000-0000-0000-000000000000}, 0.500000</MaxRandValue>
<RandSeed>{00000000-0000-0000-0000-000000000000}, 512.000000</RandSeed>
<RandIndex>{F3C8CF62-2A01-49DC-A37C-D163127FBAF8}, 0.000000</RandIndex>
<OutputValue>{0133478C-8AE6-41CD-808C-CE9B9DB2B7B0}</OutputValue>
</VisualEffect.RandomValue>
BezierCurve
<VisualEffect.GetBezierCurve InstanceId="{1D93AF87-FE17-4C35-8990-02EA1A04CD79}">
<FXTime>{1384B3BB-7654-4F27-A43D-8974A16F7877}, 0.000000</FXTime>
<Curve>-0.006,0.006,NAN,NAN,0.300,0.200,NAN,NAN,0.500,1.000,NAN,NAN,0.992,0.006,NAN,NAN</Curve>
<CurveLoop>False</CurveLoop>
<OutputValue>{4BD2FC23-9D73-4B9B-AE35-FCEA22AED562}</OutputValue>
</VisualEffect.GetBezierCurve>
Split
<VisualEffect.Split InstanceId="{1D93AF87-FE17-4C35-8990-02EA1A04CD79}">
<x>{1384B3BB-7654-4F27-A43D-8974A16F7877}, 0.000000</x>
<outX>{12059FE5-853E-484C-86ED-8A0C133C57D5}</outX>
<outY>{7E25EBBB-C2CE-44CD-A204-207B69E4E63D}</outY>
<outZ>{44029057-D51B-4127-99A1-2E3BEBCB2E1D}</outZ>
<outW>{61129D10-CD9C-48D9-93C1-806168D342DC}</outW>
</VisualEffect.Split>
ColorSpaceConversion
<VisualEffect.ColorSpaceConversion InstanceId="{D94666A6-07C6-4F51-B5BC-D7DF19AA9D76}">
<ColorIn>{F5042066-327A-4D22-A211-ABCF0D6AE5D7}, 0, 0, 0, 0</ColorIn>
<ToColorSpace>HSV</ToColorSpace>
<OutputValue>{C38AC2FD-5169-49C0-948F-36B919BE88B7}</OutputValue>
</VisualEffect.ColorSpaceConversion>
Color
<VisualEffect.Color InstanceId="{D94666A6-07C6-4F51-B5BC-D7DF19AA9D76}">
<ColorIn>{00000000-0000-0000-0000-000000000000}, 255, 0, 0, 172</ColorIn>
<OutputValue>{C38AC2FD-5169-49C0-948F-36B919BE88B7}</OutputValue>
</VisualEffect.Color>
GraphParameter
<VisualEffect.GraphParameter InstanceId="{1D599EA5-FDEC-4D4F-A9E6-B8017B041D7F}">
<OutputValue>{1CA5F84C-1B1A-4145-A639-91115DF309B4}</OutputValue>
<GraphParamName>MyTestParam</GraphParamName>
<GraphParamDefaultValue>{4BC009C0-1C6A-41BF-AB15-7ACA0C30E626}, 0.000000</GraphParamDefaultValue>
</VisualEffect.GraphParameter>
LocalDirection
<VisualEffect.LocalDirection InstanceId="{1D599EA5-FDEC-4D4F-A9E6-B8017B041D7F}">
<OutputValue>{1CA5F84C-1B1A-4145-A639-91115DF309B4}</OutputValue>
<x>{12059FE5-853E-484C-86ED-8A0C133C57D5}, 0.000000</x>
<y>{7E25EBBB-C2CE-44CD-A204-207B69E4E63D}, 0.000000</y>
<z>{44029057-D51B-4127-99A1-2E3BEBCB2E1D}, 0.000000</z>
</VisualEffect.LocalDirection>
GroundDirection
<VisualEffect.GroundDirection InstanceId="{8B6F45C2-D1DC-457C-B7C2-E1D6B6BAAA2A}">
<OutputValue>{AE727D37-5679-4946-80AD-D17E3F78A505}</OutputValue>
<x>{00000000-0000-0000-0000-000000000000}, 0.000000</x>
<y>{C38AC2FD-5169-49C0-948F-36B919BE88B7}, 0.000000</y>
<z>{00000000-0000-0000-0000-000000000000}, 0.000000</z>
</VisualEffect.GroundDirection>
SetScale
<VisualEffect.SetScale InstanceId="{AACFD121-50A0-49CC-9FB1-88740CF3E01F}">
<OutputValue>{6F536269-8DC0-4E78-8A3C-CD924589F7D9}</OutputValue>
<xVariant>{00000000-0000-0000-0000-000000000000}, 100.000000</xVariant>
<FXScale>{BF0416C8-B9F4-4A63-ACA7-5E0485121C85}, 1.000000</FXScale>
</VisualEffect.SetScale>
RandomDirectionInCone
<VisualEffect.RandomDirectionInCone InstanceId="{4D8155A1-366C-4252-B9E1-21FB812DB341}">
<OutputValue>{E3255540-F64D-4A52-B8D6-B4E3878FE050}</OutputValue>
<InputPitch>{00000000-0000-0000-0000-000000000000}, 45.000000</InputPitch>
<InputHeading>{00000000-0000-0000-0000-000000000000}, 180.000000</InputHeading>
<InnerAngle>{00000000-0000-0000-0000-000000000000}, 30.000000</InnerAngle>
<OuterAngle>{00000000-0000-0000-0000-000000000000}, 60.000000</OuterAngle>
<RandSeed>{00000000-0000-0000-0000-000000000000}, 5000000.000000</RandSeed>
<RandIndex>{1DE5D7A0-C5E1-4599-B74F-158A74A59C6E}, 0.000000</RandIndex>
</VisualEffect.RandomDirectionInCone>
Abs
<VisualEffect.Abs InstanceId="{DC0E2A16-206B-481E-8999-215AA598DB12}">
<OutputValue>{7D655D56-AA26-4145-A02C-A8A06230DF88}</OutputValue>
<x>{C43810E5-90A9-4203-8CF0-FE26018CB9B3}, 0.000000</x>
</VisualEffect.Abs>
Cos
<VisualEffect.Cos InstanceId="{05066C70-BA61-4035-8431-EDDA18B41542}">
<OutputValue>{08A23F6A-7FEE-49C9-B441-EA47D640372B}</OutputValue>
<x>{00000000-0000-0000-0000-000000000000}, 1.25</x>
<AngleInputUnit>RADIANS</AngleInputUnit>
</VisualEffect.Cos>
Sin
<VisualEffect.Sin InstanceId="{88AB7824-AC1A-465E-8115-3DFF98961F0B}">
<OutputValue>{0FF51FB9-E210-4895-9F8D-808D49D86383}</OutputValue>
<x>{C43810E5-90A9-4203-8CF0-FE26018CB9B3}, 0.000000</x>
<AngleInputUnit>DEGREES</AngleInputUnit>
</VisualEffect.Sin>
Model Behavior Example
The example below is a complete example of a Visual Effect that has been added into a SimObject <Behaviors>
. The effect is set to always spawn, but will choose one of two different effects depending on whether the aircraft is on grass or concrete:
<Component ID="#MyFXSpawner#">
<Parameter type="Override">
<FX_GUID>{7E68323C-E75D-4F5B-988E-65DD4956F6BA}</FX_GUID>
<FX_CONTACT_POINT_ID>2</FX_CONTACT_POINT_ID>
<FX_OFFSET_X>0.0</FX_OFFSET_X>
<FX_OFFSET_Y>1.0</FX_OFFSET_Y>
<FX_OFFSET_Z>0.0</FX_OFFSET_Z>
<FX_ROTATION_OFFSET_P>90.0</FX_ROTATION_OFFSET_P>
<FX_ROTATION_OFFSET_B>0.0</FX_ROTATION_OFFSET_B>
<FX_ROTATION_OFFSET_H>0.0</FX_ROTATION_OFFSET_H>
</Parameter>
<Component ID="#MyFirstUniqueSpawningRuleID#" Node="#MyFabulousAndShinyNodeName#">
<UseTemplate Name="ASOBO_GT_FX">
<FX_CODE>1 0 gt;</FX_CODE>
<SURFACE_TYPE_0>CONCRETE</SURFACE_TYPE_0>
<FX_SURFACE_TYPE_GUID_0>{B115D24C-2385-4DEC-85A0-040CED485481}</FX_SURFACE_TYPE_GUID_0>
</UseTemplate>
</Component>
</Component>
For a more complete explanation of how this works, please see the section Using Visual Effects.
Example Using Graph Parameters
You can define multiple different parameters using the <FX_GRAPH_PARAM_N>
element within the model behaviors XML, where N
starts at zero and increments by 1 for each additional parameter. This element takes two values separated by a comma:
<FX_GRAPH_PARAM_N><param_name>, <param_rpn/value></FX_GRAPH_PARAM_N>
You give the name of the parameter that you are defining - which is what will be used in the VFX node - and then give a value or some Reverse Polish Notation code. Any code given will be evaluated every frame that the particle exists when the node is used as part of the Update block node tree.
The model behavior example below is defining some additional "custom" parameters that can be used by the <VisualEffect.GraphParameter>
element (the GraphParameter node):
<Component ID="TEST_FX_GRAPH_PARAM">
<Parameters Type="Override">
<FX_GUID>{3CECB9DE-EDAD-4625-ABE4-F62B1EBCE9B6}</FX_GUID>
<FX_CODE>(A:PLANE ALT ABOVE GROUND, Feet) 300 <</FX_CODE>
<FX_GRAPH_PARAM_0>red, (L:GraphParamRed) (A:GROUND VELOCITY, knots) 80 / *</FX_GRAPH_PARAM_0>
<FX_GRAPH_PARAM_1>green, (L:GraphParamGreen) (A:PLANE ALT ABOVE GROUND, feet) 300 / *</FX_GRAPH_PARAM_1>
<FX_GRAPH_PARAM_2>blue, (L:GraphParamBlue) (A:GEAR IS ON GROUND:1, bool) *</FX_GRAPH_PARAM_2>
<FX_GRAPH_PARAM_3>alpha, (L:GraphParamAlpha) (A:GEAR IS ON GROUND:0, bool) *</FX_GRAPH_PARAM_3>
</Parameters>
<Component ID="FX_GRAPH_PARAM_0" Node="__NO_NODE__">
<UseTemplate Name="ASOBO_GT_FX">
<FX_CONTACT_POINT_ID>0</FX_CONTACT_POINT_ID>
</UseTemplate>
<UseTemplate Name="ASOBO_GT_FX">
<FX_CONTACT_POINT_ID>1</FX_CONTACT_POINT_ID>
</UseTemplate>
<UseTemplate Name="ASOBO_GT_FX">
<FX_CONTACT_POINT_ID>2</FX_CONTACT_POINT_ID>
</UseTemplate>
</Component>
</Component>