1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Approach Light Tests

Discussion in 'Special Effects General' started by Peter Hornfeck, 6 Aug 2015.

  1. Peter Hornfeck

    Peter Hornfeck

    Joined:
    23 Apr 2013
    Messages:
    93
    Country:
    germany
    Only beginning with scenery design, I made some test.

    I made a 128 x 128 bmp for an approach light.

    On a lightpole I have a group of 5 lights.

    Now I can use 5 effects, for every light one effect.
    face should be 1,1,1 because it doesn't matter the effect follow my position.

    Or I can use the bitmap 5 times in one effect. In this case I set

    X Scale=5, 5
    Y Scale=1, 1
    ...
    Face=0, 0, 0
    ...
    uv1=0.00, 0.00
    uv2=5.00, 1.00

    Every 2 m along the runway the the effects are.
    First with one row of the effect with 5 lights
    Second with 5 rows of the effect with 1 light inside.

    First results are, the FPS decrease down to 8 FPS with the 5 rows of 1 effect.
    With 1 row of the effect with 5 lights inside the FPS are 20 to 24.

    In my opinion it has no negative impact on FPS to change FACE from 1,1,1 to 0,0,0.
    It's better to repeat the bitmap 5 x in the effect than to use 5 effects for 5 lights.

    Some screenshots:

    fsscr071.jpg


    The test row with 5 lights in one effect:
    fsscr067.jpg
    At this moment 25 FPS!
     
  2. jtanabodee

    jtanabodee Resource contributor

    Joined:
    16 Jan 2008
    Messages:
    3,145
    Country:
    thailand
    Congratulation on your success. I think you have dig more on effect parameters.
     
  3. Peter Hornfeck

    Peter Hornfeck

    Joined:
    23 Apr 2013
    Messages:
    93
    Country:
    germany
    Ok, now the question is, what kind of seperation plane is needed.
    With Sketchup I made 6 dae files.
    A plane (wall) has an front face and a back face. Front face should always be outside of a model, back face inside. With Reverse Face it is possible to change the faces of a plane in SU.
    If a face is not visible for the user later, it should not have a texture! Otherwise it only costs performance in FSX if you do this. A face without a texture and no color will be not visible in FSX.

    So I made my 6 files to proof whats best
    1 Front Face to the effect / Texture on Front Face
    2 Front Face to the effect / Texture on Back Face
    3 Front Face to the effect / Texture on both Faces (doubleside)
    4 Back Face to the effect / Texture on Front Face
    5 Back Face to the effect / Texture on Back Face
    6 Back Face to the effect / Texture on both Faces (doublesided)

    The width of the planes are the same as my taxiways, but the hight is much bigger. I want to see how ZWrite influence the visibility of other objects in my scenery, so its ok if they are bigger for this test.

    Next I make a 64 x 64 bitmap with white light inside. It is not needed to use a color! The file is extended bitmap 32bit with mipmaps DXTBitmap programm can do this with png files easy. I name this bitmap with MyCompanyName_HaloSmall. Next put it in effects/texture folder.

    With FXEditor and MCX next is easy to do. Open them both!
    fsscr072.jpg
     
  4. Peter Hornfeck

    Peter Hornfeck

    Joined:
    23 Apr 2013
    Messages:
    93
    Country:
    germany
    Then attach the effect to the plane. If you change something in FXEditor and save it, you can see the effect in MCX if you copy the EffectName entry into clipboard, delete it and paste it again. This way its easy to set all the parameters you need. For my taxiway I use:
    [Particle.0]
    Lifetime=0.00, 0.00
    Type=19
    I use this parameters to fit the size of the effect to the taxiway width = plane width
    X Scale=25, 25
    Y Scale=1.5, 1.5

    Z Scale=0.00, 0.00
    X Scale Rate=0.00, 0.00
    Y Scale Rate=0.00, 0.00
    Z Scale Rate=0.00, 0.00
    Drag=0.00, 0.00
    Color Rate=0.00, 0.00
    X Offset=0.00, 0.00
    Y Offset=0.00, 0.00
    Z Offset=0.00, 0.00
    Fade In=0.00, 0.00
    Fade Out=0.00, 0.00
    Rotation=0.00, 0.00
    Static=1
    Face must be set 0, otherwise the effect will follow and turn to your viewpoint!
    Face=0, 0, 0

    [ParticleAttributes.0]
    ...
    Here I set the color, easy to understand, it is Red, Green, Blue and how blurry or sharp the color will be.
    Red = 255
    Green = 50
    Blue = 0
    and not full light, only 250
    Color Start=255, 50, 0, 250
    Color End=255, 50, 0, 250

    ....
    uv1=0.00, 0.00
    uv2=18.00, 1.00
    This means, the bitmap is used 18 times in row, so I get red 18 lights
    X Scale Goal=0.00
    Y Scale Goal=0.00
    Z Scale Goal=0.00
    Extrude Length=0.00
    Extrude Pitch Max=0.00
    Extrude Heading Max=0.00
     
  5. Peter Hornfeck

    Peter Hornfeck

    Joined:
    23 Apr 2013
    Messages:
    93
    Country:
    germany
    In the attachment tool I set Position to 0.00, -0.50, 0.20, the lights are not full visible and in front of the seperation plane. Thats all.
    In MCX I use for my first test

    Alpha Test
    Never, 0, False

    Allow Bloom = false

    Specular color = black, otherwise the material will shimmer a little bit during moonlight

    No base material specular = true
    No shadow = true

    The other things I will check after breakfast :)

    And continue:
    As dummy I use a dds file with transparency.
    Destination Blend InvSrcAlpha
    Source Blend SrcAlpha

    With Instant Scenery it's fast and easy to see how it works.
     
    Last edited: 7 Aug 2015
  6. Peter Hornfeck

    Peter Hornfeck

    Joined:
    23 Apr 2013
    Messages:
    93
    Country:
    germany
    Ok, some test and now the result

    - Texture file dds transparent, made with the save texture function of MCX
    - Back face of the seperation plane in direction to the effect
    - Front face with texture
    - Settings in MCX
    Alpha Test: Never/1/False
    Allow Bloom: False
    Specular Color: 255/255/255
    No base material specular: true
    No shadow: true
    Z-Write Alpha: true
    Destiantion Blend: InvSrcAlpha
    Source Blend: SrcAlpha

    Uh, a lot of trial and error.
     
  7. Peter Hornfeck

    Peter Hornfeck

    Joined:
    23 Apr 2013
    Messages:
    93
    Country:
    germany
    Next step is how to make the Rabbit Lights. Thinking about different ways. Maybe it would be possible to make an GMAX animation. A seperation plane moves along a path and the effect is attached to this plane.

    But I want to use only the effects. So I create an effect control file. It's the same like an effect, only it controls the effects (never thought something did what it is named for by Microsoft).

    In an effect control file it is possible to add some effects, position them and let the control file execute them in sequence. One is the type is 0, this means, the sequence is like they are written in the control file. Maybe someone nows a better solution and I'm stupid, but I try this first.

    For the file I use FX Editor. But not sure I could do this. This tool can not show the control file effects correct, right? And also MCX can not attach a control file. GMAX also can't do this. So I must create a BGL File, right? Maybe someone nows this?
     
  8. Peter Hornfeck

    Peter Hornfeck

    Joined:
    23 Apr 2013
    Messages:
    93
    Country:
    germany
    Ok, no step forward with the controller files. But with seperation plane I made some experiments.
    fsscr076.jpg
     
  9. Peter Hornfeck

    Peter Hornfeck

    Joined:
    23 Apr 2013
    Messages:
    93
    Country:
    germany
    Not a good idea at first step, but it works. This is my FS2004 Safegate I use in FSX also. The idea was to use 2 speration planes. Here you see the two planes, one is transparent from he inside because it is a front face with transparent texture. The green plane is green because I use for backfaces with no textures this color in styles setting from SU. Later in FSX, the Green face will be not visible, the transparent face will hide the effect as an seperation plane.
    I use one texture with the left and right arrows for the effect and place it like the arrows of my old safegate show.
    It works fine, the only problem, the seperation planes also hide the clouds in the sky and not usefull.

    But it would be much better to use 2 small seperation planes only in the safegate. If they have an angle to the outside, a pilot who is rolling to the safegate could see from both planes the transparent (with textures) insides and he can not see the arrows. If he is rolling to much right, he see right arrow, but the Left arrow would disapear behind the left plane. If he is on the correct line, no arrows are visible.

    A moving effect (maybe controlled by distance) for the center part would be visible all the time because it would be between the seperation planes and looking from the right or left would also not hide this.

    Someone tried this? Maybe someone who didn't tell it.
     
  10. jtanabodee

    jtanabodee Resource contributor

    Joined:
    16 Jan 2008
    Messages:
    3,145
    Country:
    thailand
    I am not quite understand about the separation plane. Why it is not visible?
     
  11. Peter Hornfeck

    Peter Hornfeck

    Joined:
    23 Apr 2013
    Messages:
    93
    Country:
    germany
    Like above. One side has no texture, it is transparent all the time. The other side has a transparent texture, but with the settings above (not sure the specular 255,255,255 or 0,0,0) it is transparent, but the effects are hidden behind this. It only makes the effects behind invisible for the pilot.
    When I use an effect for the arrows, so the part behind the seperation plane is not visible. But all other of the model is visible and didn't disapear.

    2 planes = 4 faces. The faces inside the little street have textures, inside the street you can not see the effect at right and left
    Outside the street you can see the effect. For example you are right of the street. The left side arrows are hide behind the left plane. The right side effect is visible, no plane between. And you can see the center part if there is another effect because you look from outside the street to the inside. And this wall has no texture and is everytime transparent.
     
  12. Peter Hornfeck

    Peter Hornfeck

    Joined:
    23 Apr 2013
    Messages:
    93
    Country:
    germany
  13. Peter Hornfeck

    Peter Hornfeck

    Joined:
    23 Apr 2013
    Messages:
    93
    Country:
    germany
    So much trouble with MCX to attach the effect. It's correct in MCX, but in FSX much higher. But you can see what I try to do. Only one effect. the right part is visible, center both, right only the left part. But not so happy with this because the seperation planes do hide clouds. You can see left, there's a cloud below the light and it is cut like the light is.
    I saw flytampa. They make their Safegate for Sydney with effects. Easy to do, but it can not give directions. Only stop at the end of the way, not so helpful.

    Oh, I see the problem. The altitude of the effect is independent from the model. Because this is in the ground, the lights are at correct altitude. Not an error in MCX, my error.
     
    Last edited: 9 Aug 2015
  14. Peter Hornfeck

    Peter Hornfeck

    Joined:
    23 Apr 2013
    Messages:
    93
    Country:
    germany
    The only problem now is the way the seperation plane cuts the clouds. Maybe I will find a solution for this.
    Made a short video, poor quality, but you can see how it would work:



    In FSX looks better than this video.
     
  15. Peter Hornfeck

    Peter Hornfeck

    Joined:
    23 Apr 2013
    Messages:
    93
    Country:
    germany
    I want to attach the effects control file to my approach lights. I do not know how to do this. Maybe it's a heading problem. With the Safegate I learned, when I set it not at correct altitude, the effect will stay as the in MCX set altitude. Could it be with heading of a control effects file this similar?

    When I tried to make a bgl with the coordinates of my airport to check how the effect would be shown, it was not visible. Also the fire sample from SDK is visible in KSAE, but if I change the coordinates to my airport, nothing is visible.

    In MCX I use this coordinates:
    29.826788131
    121.461946533
    Heading 123.371214
    3.962
    and made this xml:

    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <FSData version="9.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="bglcomp.xsd">
    <SceneryObject lat="29.826" lon="121.461" alt="3.962" pitch="0" bank="0" heading="123.37" altitudeIsAgl="TRUE" imageComplexity="NORMAL">
    <Effect effectName="fx_ForestFire;"/>
    </SceneryObject>
    </FSData>

    What's my fault? The bgl file is made, but nothing is shown?
     
  16. jtanabodee

    jtanabodee Resource contributor

    Joined:
    16 Jan 2008
    Messages:
    3,145
    Country:
    thailand
  17. Peter Hornfeck

    Peter Hornfeck

    Joined:
    23 Apr 2013
    Messages:
    93
    Country:
    germany
    Yes, I know, but it is not ready. SODE is really good. I read the tutorial. And I installed it in Gmax to make a moving jetway. I will not support P3D with my current airport. There I use my own Safegate BGL, it's working in FSX and FS2004.
    Later I want to use SODE (and I will make a donation if I do).
    Because this is my first project it's horrible. Every day I see something intresting what I could make better. This way it never will be finished.
     
    jtanabodee likes this.
  18. Peter Hornfeck

    Peter Hornfeck

    Joined:
    23 Apr 2013
    Messages:
    93
    Country:
    germany
    Today also wasting time. For the rabbit light I add for every light one effect in the control file. Changed many parameters, but it's really useless. With MCX the Rabbit lights attached to an object will only run between North and South.
    Changing Heading, Pitch ... in the Attachment Tool of MCX doesn't change anything. The Effect will always placed with heading 0 to FSX. To make a BGL with coordinates also not funny.
     
  19. MANOCHVARMA RAMAN

    MANOCHVARMA RAMAN

    Joined:
    12 Jan 2016
    Messages:
    251
    Country:
    malaysia
    Hi Peter,

    Thanks for the info. I am new for scenery design. Can you please provide the texture and effect file?