# Visual Effects XML Examples This page lists some examples of the [XML](../../devmode/editors/project-editor/file-formats/xml-files/) used to create Visual Effects in Microsoft Flight Simulator 2024. You can find more information about the different XML elements used in these examples from the following page: - [Visual Effects XML Properties](visual-effects-xml-properties/)     ### Complete Effect - Contrail The XML shown below is an example of a complete effect for creating aircraft contrails: ``` xml AceXML Document Contrails_RIBBON 1200.000 60000.000 {D0437518-8907-4DE5-9973-6C751C4BC39D}, 0.000000 Distance {AD7743F6-3392-4C61-A95D-B4E041590642}, 0.000000 {74CDC4A1-0571-47B9-B598-201FBED37F76}, 0.000000, 0.000000, 0.000000 {18412C95-E4D0-485C-9D81-54A96E589634}, 0.000000 Ribbon {003A712E-62CF-4F2C-A811-C5FC17ADCD1B} {00336AC4-E654-4065-9BD5-40C56D61B91B}, 0, 0, 0, 0 {AD7743F6-3392-4C61-A95D-B4E041590642} {00000000-0000-0000-0000-000000000000}, 40.000000 {A4792B2E-2EEE-43A5-A8EC-3D1FE61BF2C0} {00000000-0000-0000-0000-000000000000}, 70.000000 {36D16B9D-B113-494B-A2B5-828AD9CCEBFE} {8C887F59-DACC-489A-B250-33E32B46A720}, 0.000000 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 {00336AC4-E654-4065-9BD5-40C56D61B91B} {00000000-0000-0000-0000-000000000000}, 1.000000 {00000000-0000-0000-0000-000000000000}, 1.000000 {00000000-0000-0000-0000-000000000000}, 1.000000 {D211B744-4AF4-4CA9-8360-E36F23B7AF2A}, 0.000000 {8C887F59-DACC-489A-B250-33E32B46A720} AgeOverLifetime {18412C95-E4D0-485C-9D81-54A96E589634} {A4792B2E-2EEE-43A5-A8EC-3D1FE61BF2C0}, 0.000000 {6B9E95E6-6A4F-4455-BD3A-AC5393327F67}, 0.000000 {6B9E95E6-6A4F-4455-BD3A-AC5393327F67} {8C887F59-DACC-489A-B250-33E32B46A720}, 0.000000 0.000,0.000,NAN,NAN,0.270,0.669,-0.217,0.146,0.949,1.000,NAN,NAN {D211B744-4AF4-4CA9-8360-E36F23B7AF2A} {36D16B9D-B113-494B-A2B5-828AD9CCEBFE}, 0.000000 {00000000-0000-0000-0000-000000000000}, 1.000000 {D0437518-8907-4DE5-9973-6C751C4BC39D} {00000000-0000-0000-0000-000000000000}, 0.010000 {74CDC4A1-0571-47B9-B598-201FBED37F76} ```     ### 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: ``` xml False 32.000 {00000000-0000-0000-0000-000000000000}, 8.000000 Time -1 0.000 2000.000 ```     ### StaticMesh Example The XML shown below is a simple example of the XML used to define a single `` block. This example shows the basic block as it would generally be used: ``` xml {FF97CF94-B89A-4E0D-8EEF-FDDB4C7274F3}, 0.000000, 0.000000, 0.000000 {00000000-0000-0000-0000-000000000000}, -90.000000, 55.000000, 90.000000 {D3514CD6-6F70-4BB2-80B6-BACC0CC788BD}, 1.000000 {DE37F56D-442C-45AB-A325-4572668CE135} {58F995B0-49DE-40FD-B839-881844D30EAD} ```   This next example shows how the block XML would look if the block was using a Heat Deform material type: ``` xml {FF97CF94-B89A-4E0D-8EEF-FDDB4C7274F3}, 0.000000, 0.000000, 0.000000 {00000000-0000-0000-0000-000000000000}, -90.000000, 55.000000, 90.000000 {D3514CD6-6F70-4BB2-80B6-BACC0CC788BD}, 1.000000 {DE37F56D-442C-45AB-A325-4572668CE135} {58F995B0-49DE-40FD-B839-881844D30EAD} {00000000-0000-0000-0000-000000000000}, 2.500000, 1.750000 {CDA63B57-19F0-4EA6-974B-46320C5B2FFD}, 1.000000 ```   This final example shows how the block XML would look if it was using an Afterburner material type: ``` xml {FF97CF94-B89A-4E0D-8EEF-FDDB4C7274F3}, 0.000000, 0.000000, 0.000000 {00000000-0000-0000-0000-000000000000}, -90.000000, 55.000000, 90.000000 {D3514CD6-6F70-4BB2-80B6-BACC0CC788BD}, 1.000000 {DE37F56D-442C-45AB-A325-4572668CE135} {58F995B0-49DE-40FD-B839-881844D30EAD} {79EE1094-52FF-432F-9F6E-D1680A85D4A7}, 1 {00000000-0000-0000-0000-000000000000}, 255, 189, 35, 255 {6EA84586-C0F4-4665-BC76-41F4A0C44835}, 1, 1, 1, 1 ```     ### Node Examples Below you can find examples of several different [VFX Node Graph](../../devmode/editors/vfx-editor/nodes/vfx-node-graph/) **Nodes** that can be used to create your effects:   ##### GetInstanceAttribute ``` xml ContactPoint {8BC8B1C5-7526-4590-A1F7-00C34D808B1D} ```   ##### GetParticleAttribute ``` xml id {F3C8CF62-2A01-49DC-A37C-D163127FBAF8} ```   ##### GetGroundAttribute ``` xml id {F3C8CF62-2A01-49DC-A37C-D163127FBAF8} ```   ##### EmitterDirection ``` xml Y+ {345A9153-2AEE-43F0-BDB9-79FC6843D4DE} ```   ##### WindDirection ``` xml {0B254A32-8810-4155-B54F-BAFEE3D49087} Normalized ```   ##### AtlasPlayer ``` xml {1D93AF87-FE17-4C35-8990-02EA1A04CD79} 0.5 ```   ##### GravityVector ``` xml {00000000-0000-0000-0000-000000000000}, 9.807 {318F7504-B393-45C7-822D-6A38AD1234DC} ```   ##### SimVar ``` xml PROP RPM rpm {BF0416C8-B9F4-4A63-ACA7-5E0485121C85} ```   ##### Lerp ``` xml {00000000-0000-0000-0000-000000000000}, 1.000000 {00000000-0000-0000-0000-000000000000}, 8.000000 {1384B3BB-7654-4F27-A43D-8974A16F7877}, 0.000000 {D5F4EB80-1472-4E95-BB8F-85B7B0946E50} ```   ##### Clamp ``` xml {D5F4EB80-1472-4E95-BB8F-85B7B0946E50}, 0.000000 {00000000-0000-0000-0000-000000000000}, 1.000000 {BE50390B-EE5A-4BB1-9FB9-92BE3FE259DD} ```   ##### SampleNoise ``` xml Perlin {BDE8E9FF-2B79-41B5-9B9E-10C18D62233F}, 0.000000, 0.000000, 0.000000 {48AE9ED8-6ACB-4D81-99A7-2A3B95C15621} ```   ##### Add ``` xml {1977EAE1-4E78-4DC0-838E-0EC8B53D060C}, 0.000000 {318F7504-B393-45C7-822D-6A38AD1234DC}, 0.000000 {FE672E1C-6FBC-40AE-B93D-3770BE2C2063} ```   ##### Subtract ``` xml {7E68323C-E75D-4F5B-988E-65DD4956F6BA}, 0.000000 {00000000-0000-0000-0000-000000000000}, 10.000000 {BF0416C8-B9F4-4A63-ACA7-5E0485121C85} ```   ##### Multiply ``` xml {00000000-0000-0000-0000-000000000000}, 360.000000 {0133478C-8AE6-41CD-808C-CE9B9DB2B7B0}, 0.000000 {EF88A2B9-C49D-4CCB-BF6A-B36DAF92A8FB} ```   ##### Divide ``` xml {00000000-0000-0000-0000-000000000000}, 100.000000 {0133478C-8AE6-41CD-808C-CE9B9DB2B7B0}, 0.000000 {318F7504-B393-45C7-822D-6A38AD1234DC} ```   ##### Pow ``` xml {48AE9ED8-6ACB-4D81-99A7-2A3B95C15621}, 0.000000 {00000000-0000-0000-0000-000000000000}, 2.000000 {D07180F4-B796-4A5E-BEE9-FBF5264C9BB7} ```   ##### Float ``` xml {00000000-0000-0000-0000-000000000000}, 4.000000 {FC379BDD-69EF-4D09-A912-749D3AB6BB19} ```   ##### Vector2, Vector3, Vector4 ``` xml {00000000-0000-0000-0000-000000000000}, 1.000000 {00000000-0000-0000-0000-000000000000}, 1.000000 {4BD2FC23-9D73-4B9B-AE35-FCEA22AED562}, 0.000000 {BF0416C8-B9F4-4A63-ACA7-5E0485121C85}, 0.000000 {480EC47F-EEF0-4F86-B37B-A3F89071D651} ```   ##### RandomValue ``` xml {00000000-0000-0000-0000-000000000000}, -0.500000 {00000000-0000-0000-0000-000000000000}, 0.500000 {00000000-0000-0000-0000-000000000000}, 512.000000 {F3C8CF62-2A01-49DC-A37C-D163127FBAF8}, 0.000000 {0133478C-8AE6-41CD-808C-CE9B9DB2B7B0} ```   ##### BezierCurve ``` xml {1384B3BB-7654-4F27-A43D-8974A16F7877}, 0.000000 -0.006,0.006,NAN,NAN,0.300,0.200,NAN,NAN,0.500,1.000,NAN,NAN,0.992,0.006,NAN,NAN False {4BD2FC23-9D73-4B9B-AE35-FCEA22AED562} ```   ##### Split ``` xml {1384B3BB-7654-4F27-A43D-8974A16F7877}, 0.000000 {12059FE5-853E-484C-86ED-8A0C133C57D5} {7E25EBBB-C2CE-44CD-A204-207B69E4E63D} {44029057-D51B-4127-99A1-2E3BEBCB2E1D} {61129D10-CD9C-48D9-93C1-806168D342DC} ```   ##### ColorSpaceConversion ``` xml {F5042066-327A-4D22-A211-ABCF0D6AE5D7}, 0, 0, 0, 0 HSV {C38AC2FD-5169-49C0-948F-36B919BE88B7} ```   ##### Color ``` xml {00000000-0000-0000-0000-000000000000}, 255, 0, 0, 172 {C38AC2FD-5169-49C0-948F-36B919BE88B7} ```   ##### GraphParameter ``` xml {1CA5F84C-1B1A-4145-A639-91115DF309B4} MyTestParam {4BC009C0-1C6A-41BF-AB15-7ACA0C30E626}, 0.000000 ```   ##### LocalDirection ``` xml {1CA5F84C-1B1A-4145-A639-91115DF309B4} {12059FE5-853E-484C-86ED-8A0C133C57D5}, 0.000000 {7E25EBBB-C2CE-44CD-A204-207B69E4E63D}, 0.000000 {44029057-D51B-4127-99A1-2E3BEBCB2E1D}, 0.000000 ```   ##### GroundDirection ``` xml {AE727D37-5679-4946-80AD-D17E3F78A505} {00000000-0000-0000-0000-000000000000}, 0.000000 {C38AC2FD-5169-49C0-948F-36B919BE88B7}, 0.000000 {00000000-0000-0000-0000-000000000000}, 0.000000 ```   ##### SetScale ``` xml {6F536269-8DC0-4E78-8A3C-CD924589F7D9} {00000000-0000-0000-0000-000000000000}, 100.000000 {BF0416C8-B9F4-4A63-ACA7-5E0485121C85}, 1.000000 ```   ##### RandomDirectionInCone ``` xml {E3255540-F64D-4A52-B8D6-B4E3878FE050} {00000000-0000-0000-0000-000000000000}, 45.000000 {00000000-0000-0000-0000-000000000000}, 180.000000 {00000000-0000-0000-0000-000000000000}, 30.000000 {00000000-0000-0000-0000-000000000000}, 60.000000 {00000000-0000-0000-0000-000000000000}, 5000000.000000 {1DE5D7A0-C5E1-4599-B74F-158A74A59C6E}, 0.000000 ```   ##### Abs ``` xml {7D655D56-AA26-4145-A02C-A8A06230DF88} {C43810E5-90A9-4203-8CF0-FE26018CB9B3}, 0.000000 ```   ##### Cos ``` xml {08A23F6A-7FEE-49C9-B441-EA47D640372B} {00000000-0000-0000-0000-000000000000}, 1.25 RADIANS ```   ##### Sin ``` xml {0FF51FB9-E210-4895-9F8D-808D49D86383} {C43810E5-90A9-4203-8CF0-FE26018CB9B3}, 0.000000 DEGREES ```   ### Model Behavior Example The example below is a complete example of a Visual Effect that has been added into a SimObject ``. 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: ``` xml {7E68323C-E75D-4F5B-988E-65DD4956F6BA} 2 0.0 1.0 0.0 90.0 0.0 0.0 1 0 gt; CONCRETE {B115D24C-2385-4DEC-85A0-040CED485481} ``` For a more complete explanation of how this works, please see the section [Using Visual Effects](visual-effects/#UsingVFX).   #### Example Using Graph Parameters You can define multiple different parameters using the `` 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: ``` xml , ``` 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](../../programming-apis/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](../../devmode/editors/vfx-editor/nodes/update/) block node tree.   The model behavior example below is defining some additional "custom" parameters that can be used by the `` element (the [GraphParameter](../../devmode/editors/vfx-editor/nodes/graphparameter/) node): ``` xml {3CECB9DE-EDAD-4625-ABE4-F62B1EBCE9B6} (A:PLANE ALT ABOVE GROUND, Feet) 300 < red, (L:GraphParamRed) (A:GROUND VELOCITY, knots) 80 / * green, (L:GraphParamGreen) (A:PLANE ALT ABOVE GROUND, feet) 300 / * blue, (L:GraphParamBlue) (A:GEAR IS ON GROUND:1, bool) * alpha, (L:GraphParamAlpha) (A:GEAR IS ON GROUND:0, bool) * 0 1 2 ```