Jump to content
Sign in to follow this  
Guest JoeW

Effect Altitude

Recommended Posts

Guest

Hi,I have an API as crashed plane and I want to place fire effect on one of its engine. I can place a fire effect by giving the altitude.The problem is altitude value of effect is altitude above Mean Sea Level. My plane altitude is 50m and I am placing effect 52m above sea level. But if any user has different mesh scenery , the fire should be seen meters above the plane.Is there a solution to place an effect at exactly same altitude with an API.ThanksKenan

Share this post


Link to post
Share on other sites

I think if you place the effect file in your macro with the GObj command then you can set the altitude compared to the mesh or to MSL. It depends on the type of RefPoint used then.


Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites

Hi Kenan.This is an interesting problem. You should be able to write a controller file to offset the elevation in meters ( Y value is height... X is EW with positive offset east... Z is NS with positive values north ).I wrote a controller file ( named "cntrl_CrashFire_2M.fx"... place it in the effect folder ):[Library Effect]Lifetime=5Version=1.00Radius=200Priority=1[controller.0]lifetime=0.0, 0.0 type=0 delay=0.00, 0.00 effect.0=fx_OrangeDot.fx, 0.00, 2.00, 0.00, 0.00, 2.00, 0.00, 0.00, 0.00This will display the OrangeDot elevated correctly at 2 meters.I can place this as an effect at AGL with BGLPlacer. This is one of the purposes of a placing a controller file as an effect. This proves an effect can be offset from AGL by use of the controller.Here's the CSV file I used ( burning_2M.csv ):EFFECT,cntrl_CrashFire_2M.fx,N43* 0.0000',W89* 0.0000',AGL,0.00,0.00,0.00,Very Sparse,""http://forums.avsim.com/user_files/19921.jpgHowever, when I substitute any of the fire effects commonly available, the fire stubbornly hugs the ground. Therefore, the problem lies in the fire effects themselves... so that is where you'd need to experiment further. I don't believe any of us truly understand how to create effects. We are creating effects by substituting values in a 'monkey-see-monkey-do' fashion. I've never seen a step-by-step explaination of the creation process, or what the various parameters mean, other than the SDK ( typically short on examples ).Dick

Share this post


Link to post
Share on other sites

Hi Kenan.I believe we just have to live with the fire effects set to an MSL altitude... AGL is stubborn.The problem with differing meshes might be overcome by creating an absolute surface elevation with either an LWM landmask or an Area16n ( SCASM ) elevation... kind of like making an LWM lake... but using land instead. Then any mesh would be forced to that elevation for that object and effect... force the land to 50 meters, then place the object AGL, then place the fire effect at 52 meters.It's the best I can think of. :(Dick

Share this post


Link to post
Share on other sites
Guest JoeW

The fire effects that I have placed in my sceneries aren't altitude affected as the orange dot is for some reason. The default " snap to ground " works just fine. I have placed a forest fire, 2 plane crashes with fire, 1 hanger fire and a vehicle fire with the BglPlacer program without specifing the altitude at all. Works great...Joe W.

Share this post


Link to post
Share on other sites

Hi Joe.Yes, you're right. The original problem was that Kenan wanted to place the wreck at ground-level and the flames at ground-level +2 meters. To solve this, he placed the wreck at AGL ( 50 meters MSL in the default scenery ), and placed the flames at 52 meters. If new mesh changes the elevation ( it will ) the wreck will be at ground-level, but the flames will still be at 52 meters... which may be greatly over or under the wreck.He wanted to know if there was a way to use the AGL refpoint for the effect, and offset the effect vertically 2 meters. The documentation for effects indicated this should be possible, and the orangedot example proves the is true... where I did offset it vertically 2 meters ( I did that on purose ).But the fire effects cannot be offset vertically from AGL. I can offset them in the X and Z directions, but not in the Y direction. I consider this a bug... or else why would that code be allowed for effects ( and there are at least 3 different ways to offset effects, that I can determine.. so that was the original design intent ).With the orangedot, there are no particle emissions... just a static texture. The problem seems to lie in the {Particle.x} section.But, non-static emitted particles can be offset from an AGL placement ( fireworks ), so this needs a lot more experimentation.Dick

Share this post


Link to post
Share on other sites

Hi Kenan.Just a follow-up. And this might be confusing.Effects can have the emitter set to an altitude by specifying the MSL elevation. This can also be altered by adjusting the Y Offset in a controller file, or in the {emitter.x} portion of the effect. We can then separately adjust the particle elevation by using a Y Offset in the {particle.x} portion of the effect. So far, so good.=========================When we set an effect to AGL, what the sim does, is sets the particle to AGL ( not just the emitter ). This is the bug. If it set just the emitter to AGL, we could then offset the particles vertically. This is also ( apparently ) why a TransformCall from AGL doesn't work.I'm still unsure why the orangedot example can be offset.. I'm actually offsetting the emitter from AGL, and the orangedot has no animated particles... it is static. This leads ne to believe the emitter is set to AGL, and can be offset, but the particle animation is forced to AGL and cannot be offset. :(Time for more experimentation.Just to test this, I placed the fireworks controller on Mt. McKinnley ( about 6000 meters high ) at AGL. If I'm right, the center of all the particles will be forced to ground level... and this is actually what happens. All smoke, explosions, launches are centered at the ground, instead of at a relative height. They are offset properly NS and EW, but they cling to the slope of the mountain!A bug. :(If done right, only the emitters should be set to AGL... and even these should be able to be offset vertically from the AGL. If you set the effect at 6140 meters on McKinnley, the fireworks display properly.I don't know if this was corrected in FS2004, but I doubt it, as no one has complained about this before ( to my knowledge ).Dick

Share this post


Link to post
Share on other sites
Guest JoeW

I really interested in where this goes, Dick. I'm trying to do another light simular to the orange dot... This one will fade at the edge...I'll let you know how that goes.Joe W.

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...