Sign in to follow this  
Guest BADev

Drawing trajectory

Recommended Posts

Any one know if you can draw the trajectory of an a/c?

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

I think you will need to be a bit more specific about what you are after. Do you mean record it and view it another program or actually draw it in FSX?David

Share this post


Link to post
Share on other sites

If you want to draw the trajectory in-flight, would a modified smoke effect - that emitted a single stream of particles with extremely long lifespans - not work for you?- skydrift

Share this post


Link to post
Share on other sites

SkydriftYes so long as I could do it in advance of the users a/c and so long as it would remain in place and not be blown away.Any ideas how to do this?

Share this post


Link to post
Share on other sites

For the effects file, try this://=================================[Library Effect]Display Name= Aircraft Path LineLifetime= 5Version= 2.00Radius= 0.3Priority= 0[Properties]Cockpit= 1VirtualCockpit= 1Spot= 1Tower= 1Map= 1[Emitter.0]Lifetime= 3600, 3600No Interpolate= 1Rate= 100, 100[Particle.0]Lifetime= 3600, 3600Type= 19X Scale= 0.50, 0.50Y Scale= 0.50, 0.50Z Scale= 0.00, 0.00Drag= -9999, -9999Color Rate= 0.50, 0.50Fade In= 0.00, 0.00Fade Out= 1.00, 1.00Face= 1,1,1[ParticleAttributes.0]Blend Mode= 0Texture= FX_YELLOW-LINE.bmpColor Start= 255, 255, 0, 255Color End= 255, 255, 0, 255uv1= 0.00, 0.00uv2= 1.00, 1.00X Scale Goal= 1.00Y Scale Goal= 1.00[Emitter.1]Lifetime= 3600, 3600No Interpolate= 1Rate= 100, 100[Particle.1]Lifetime= 3600, 3600Type= 19X Scale= 0.50, 0.50Y Scale= 0.50, 0.50Z Scale= 0.00, 0.00Drag= -9999, -9999Color Rate= 0.50, 0.50Fade In= 0.00, 0.00Fade Out= 1.00, 1.00Face= 1,1,1[ParticleAttributes.1]Blend Mode= 0Texture= FX_YELLOW-LINE.bmpColor Start= 255, 255, 0, 255Color End= 255, 255, 0, 255uv1= 0.00, 0.00uv2= 1.00, 1.00X Scale Goal= 1.00Y Scale Goal= 1.00//=================================Just copy the above text into a new, blank text file, give it a name (e.g. FX_Aircraft_Line.fx", and put it into the FSX effects folder.Next, associate this fx file with an aircraft's smoke system in the aircraft's .configuration (cfg) file - e.g:[sMOKESYSTEM]Smoke.0= 0.0, 0.0, 0.0, FX_Aircraft_LineFinally, create a simple 64x64 pixel square yellow box in a paint program, name it FX_YELLOW-LINE.bmp, and put it in the FSX effects/texture folder.This is a quick'n'dirty effect that will show the aircraft's flight path when you enable the aircraft's smoke system - you can refine it as you see fit to meet your needs.However, if your goal is to create a pre-defined visual flightpath that an aircraft can follow when it loads a flight (like the visual flight path in FSX that you can enable to assist in landings), using an effect won't work, as you can't save the path shown by the effect.One solution would be to create visible waypoints for the aircraft to follow, storting them in a blg file. You'll need FSX Deluxe & the SDK installed to do this. You won't get a line, but if the visual waypoint objects are close enough, aircraft could follow the route easily enough.Another thought (I have not tried this, though, so this is pure speculation) would be to create the trajectory as a vector and then compile it with Shp2Vec to a blg file.- regards, skydrift

Share this post


Link to post
Share on other sites

SkydriftThanks for this info, I'll give a try and let you know how I get on.Thanks for your timePaul

Share this post


Link to post
Share on other sites

That brings up an interesting point - can scenery files get dynamically created and loaded while in sim?I was thinking that one way to do this would be to create a simple line or rectangle object in GMAX/3DS, and to position a series of these as static objects using the AI object placement functions in Simconnect. That should work dynamically. I was also thinking that you can also assign the object waypoints but you would have very little control over the trajectory between two points.I'm not sure how that's done in the missions, but they do have these objects in the sky.Etienne

Share this post


Link to post
Share on other sites

Skydrift - I could'nt get this to work. Im trying it on a 747 so I wonder if its because its not smoke enabled? I did try it on other a/c and nothing seemed to work. Im moving the a/c in slew mode which I thought might have been the problem but slew or no slew it did'nt make a difference. I could set smoke on via the keyboard or simconnect but not a sniff.Thanks

Share this post


Link to post
Share on other sites

Well, that's strange. Enclosed are some updated files that show some options:FX_Yellow-Line.fx: Goes in the effects folderFX_Green-Line.fx: Goes in the effects folderFX_GreenHoop.fx: Goes in the effects folderFX_GreenHoopLine.fx:Goes in the effects folderFX_YELLOW-LINE.BMP: Goes in the effectstexture folderFX_GREEN-HOOP.BMP: Goes in the effectstexture folderAircraft.cfg: Goes in the SimobjectsAirplanesb747-400 folder=====Don't forget to backup your original aircraft.cfg file for the b747-400 first! - Note the addition of the SMOKESYSTEM setting in my file.You can choose to enable any or all of the effects by adding or removing two slashes: before each line within the SMOKESYSTEM section of the file=====Also attached are some screenshots that show the various examples.FX_Yellow-Line.fx illustrates a series of discrete particles that create a path - this is viewable from all directions, but is clearly does not look like a line from certain angles.FX_Green-Line.fx illustrates an extruded line. However, this is only viewable from 2 directions (vertically down & horizontally right). Using an extrude in FSX, it seems that one cannot view the extrude from both sides (i.e vertically up & horizontally left). I'm not sure if this a bug in FSX or not.FX_GreenHoop.fx illustrates using a bmp that has an alpha transparency set to allow a "hole" in the middle to fly through, as well as overall transparency so that the aircraft ahead is faintly visible though the green sides as well. The hoops are only visible if viewed from behind the aircraft.FX_GreenHoopLine.fx illustrates both a Hoop & Line together.One effect option I have not been able to get to work is attaching library objects (such as the EFIS_Road or EFIS_Hoop) to an aircraft effect. The option is available in the FX Tool utility provided in the SDK, but if you try to do this FSX will crash. I'm not sure if this is a bug or if I'm doing something wrong. W.r.t. Ziporama's comments:"Can scenery files get dynamically created and loaded while in sim?"Since scenery files are only loaded when needed, as long as the scenery bgl file existed before it was required by FSX to be loaded, it should be OK, I'd say. As long as you new what needed to be displayed & could create the bgl & place it in the scenery folder before the aircraft arrived within that "displayable airspace", FSX would load it."I was thinking that one way to do this would be to create asimple line or rectangle object in GMAX/3DS..."Yup - or you could just use the mission hoops or EFIS object already in FSX :-)"...and to position a series of these as static objects using the AI object placement functions in Simconnect..."You mean SimConnect_SetDataOnSimObject and SimmConnect_AICreateSimulatedObject? Not a bad idea & worth investigating.- Hope this helps with your project. Regards, SkyDrifthttp://forums.avsim.net/user_files/175396.jpg

Share this post


Link to post
Share on other sites

SkydriftThe effect you have created looked great, could it be the bmp file? As requested I created a 64 x 64 (16 color bmp) in paint? I'll try in 256 color and then 24 bit and let you know how I get on.Everyting else is exactly the same as your post.Thanks for your effortsPaul

Share this post


Link to post
Share on other sites

The Yellow line bmp is 64x64 pixels, 96dpi, 8bitsThe Green Hoop bmp is 256x256 pixels, 96dpi, 32bits Both bmps were created with MS Digital Image Pro (the Green Hoop bmp was also modified with the free program DXTbmp.exe to add the alpha channel), but really any paint program should work for these very simple bmp images. Enclosed is another very simple bmp, this time specifically created with MS Paint - 64x64 pixels, 96dpi, 24bits - so I know that MSPaint is not the problem.FYI, another good forum for SimmConnect questions and FSX development learning is: http://www.fsdeveloper.com/forum/forumdisplay.php?f=60- regards, SkyDrift

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this