• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Light beam: puzzled!

Messages
108
Country
france
Hi all,

I'm trying to create a "beam" to mimic the one of a lighthouse.
My problem is that I really can't make it with texture parameters, even after reading and re-reading the SDK doc and MCX small tips.
In fact I can't succeed in making my rotating "beam" look realistic, additive but/and translucid to let clouds (when flying under the beam) or the landscape (when looking from above) see through.

All I get is a solid cone of "light". OK it "shines" at night and is visible during day time but:
- it is not translucid/transparent
- it looks solid, not as light through thin air
- it is too much visible at day time

What parameters should I tweak and by how much?
I'm getting mad with so many avalable, and moreover: without understanding which does what.

Enclosed are my MDL and the texture applied. Hope someone can help...

Thanks! :)
 

Attachments

I'm assuming this is for FSX or later. In the MCX Material Editor, select the texture (or material) used for the light cone. Then use the drop down box and choose Set Default Transparent.

Hope this helps,
 
Hello:

Your "Green" rotating beacon certainly looks good in MCX, and as a "flat" object, it would work especially well for visibility when viewed from above in a aircraft approaching the airport.

IIUC, the FS default airport beacon is a 'mysterious object' (created by the rendering engine from internal code at run time ? o_O).

It is a "cone" shape rather than 'flat', and it uses gradient transparency along the course of its length to control viability during day and night, as well as to fade the light color off at is farthest end away from the pivot point in the "3D model".



FYI: In the following example BGLComp placement for such a classic airport rotating "civilian-type" beacon with tower, the "Tower" is called by an actual GUID from a scenery library object; the "Beacon" itself is called by FS SDK "Type" descriptive names. :scratchch

1.) Copy and Paste the following into a text or XML editor such as Windows NotePad or NotePad++:

Code:
Code:
<?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="[your geographic Latitude placement coordinate goes here]"
      lon="[your geographic Longitude placement coordinate goes here]"
      alt="0.0M"
      altitudeIsAgl="TRUE"
      pitch="0"
      bank="0"
      heading="7.0"
      imageComplexity="VERY_SPARSE">
      <LibraryObject
         name="{7f38bfbc-e295-4a40-845c-3f3c872cfa82}"
         scale="1.00"
/>
      <AttachedObject
         attachpointName="attachpt_beacon"
         pitch="0"
         bank="0"
         heading="0">
         <RandomAttach
            randomness="ALWAYS_DISPLAY"
            probability="1"
/>
         <Beacon
            type="CIVILIAN"
            baseType="AIRPORT"
/>
      </AttachedObject>
   </SceneryObject>
</FSData>


a.) Save the code listed immediately above as ex: "Pierrot_Default_Civilian_Rotating_Beacon.xml" into a 'work' folder with a copy of:

[FSX SDK install path]\Environment Kit\BGL Compiler SDK\BglComp.exe

...and:

[FSX SDK install path]\Environment Kit\BGL Compiler SDK\BglComp.xsd


NOTE
: In NotePad, be sure that "Save as type" is set to "All Files (*.*) to allow the XML extension rather than TXT.


b.) Drag-and-Drop the above "Pierrot_Default_Civilian_Rotating_Beacon.xml" onto BglComp.exe (CMD mode window opens & closes)

c.) Drag-and-Drop the resulting compiled "Pierrot_Default_Civilian_Rotating_Beacon.bgl" into an existing "active" nested scenery sub-folder ex:

[FSX install path]\Addon Scenery\Pierrot_Default_Civilian_Rotating_Beacon\Scenery
sub-folder


BTW: one can use other airport beacon 'types' on the above tower to implement a "rotating beacon"; 'types' are shown here:

http://lc0277.gratisim.fr/sceneobjects/airport_objects/index.html



To successfully use those other airport beacon types, follow these guides for proper placement and positioning of each object:

http://www.simforums.com/forums/rotating-beacon-whats-the-secret_topic27681.html

http://www.fsdeveloper.com/forum/threads/a-beacon-that-rotates.429373/#post-665417



In theory, one should be able to create a "custom" 3D model of a beacon light beam as a "SimObject" textured with a gradient for transparency within the Alpha channel, and having animated rotation ...which can be placed / controlled by various FSX SDK methods.

http://forum.avsim.net/topic/411452-semi-transparent-cone-extending-from-airport-beacon/

http://forum.avsim.net/topic/283119-how-to-remove-control-tower-rotating-light/


Some related info on this topic
:

http://www.fsdeveloper.com/forum/threads/custom-rotating-beacons.22829/

http://www.fsdeveloper.com/forum/threads/fsx-airport-rotating-beacon.15309/

http://www.fsdeveloper.com/forum/threads/airport-rotating-beacon.1385/

https://www.google.com/#q=fsdeveloper.com GaryGB rotating beacon site:www.fsdeveloper.com


Hope this info might prove helpful ! :)

GaryGB
 
Last edited:
Thanks guys for answering quickly and thoroughly.

Tom: I certainly did try to set as default transparent already but the result isn't satisfactory. Or maybe do I have other parameters set to stg that interferes with default transparent?
However, you can see my MDL and the texture settings attached: does that look good to you?

Gary: I want to make my own light beam because, for lighthouses, the FSX beacons are not convenient at all. One can't specify a speed (period) nor flashes groupings. That's why I have abandoned these rotating beacons.

I know my attempt is a flat object for now, once I'll have fixed my pitiful rendition I'll be able to add a perpendicular copy of the beam to make it visible in both V and H planes.
What is driving me crazy for now is my unability to render something looking like a light beam, stupid me. ;)

Oh and btw. it's supposed to work in FSX and/or P3D2, I tested in both sims.
 
Gary,
I think the solution may be in the Final Alpha Blend. Don't ask me what it's supposed to do though! :)
But in reading one of the posts you indicate, I came across a guy mentioning it without much further precision.
I tried a Final Alpha Multiply of 0.2 and Set At Render Time=True... and it does stg which looks furiously like what I want to achieve.
So I'll investigate further but I can tell that now the beam is transparent/translucid, additive, visible night and day (as desired) through rain and fog (as supposed to).
Well, you put me on the track. Thanks for your support.
I'll be back and report. ;)
 
Well guys, I worked it out and now I can get nice looking rotating beams.

But... hah, something comes up that I didn't anticipated: say you have an island of a decent size, with some hills etc. And a couple of lighthouses around the coast line. In the real world, the ones that are on the opposite coast can't be seen from the other one (because of the cliffs, hills, and whatever obstacles you can imagine).

And because my lightbeams are "solid" MDLs and not light FXs, they do cut through everything like a hot knife in butter. They ain't visible from above when the beam is under ground level but they re-appear when they "emerge" from the ground on the other side of the island.
This is definitely NOT good, grr...

And I really can't figure out how to solve that. Should have better thought beforehand.

Or does someone smarter than me have a brilliant idea?
 
So last night I had a brilliant idea: to mimic beam shading by obstacles, I could just let it hide under ground level at some part of its rotation, then suddenly pop-up at lighthouse lantern altitude to rotate in open air where there are no obstacles.
See image: the "beam" starts its rotation (red) under ground level, then when reaching orange position it suddenly pops-up at lantern's altitude to become visible (yellow) and rotates until it reaches another position (green) where obstacles are supposed to stop the beam. It then dives into the ground (blue) and keeps rotating hidden, and the cycle starts again.

Brilliant, huh?

Now my problem is in Gmax : I know how to combine 2 actions on a single keyframe, but I can't get rid of the "bounce" which occurs. There's something I don't understand, why is there this curve to smoothen the transition, I can't get rid of it...
Thus, my beam rotates OK and dives into the ground and pops up again, but in doing that it bounces around its pivot in the lantern instead of positioning itself frankly and all of a sudden. Looks weird and totally irrealistic.

Rotamove.jpg
 

Attachments

You need to use one of the other animation controllers in GMAX. When you go to the Animation tab (above the modifier stack at the right), you can click the + next to Animation Controllers. Then click on the Position line underneath. Finally click the little green arrow with the black arrow beside it above those three lines. Choose a controller there. I think I used either TCB or Linear when creating my animated signs and wanted them to jump instantly back and forth.

Hope this helps,
 
Thanks a lot Tom, your suggestion was pertinent and helped much!

I'm not familiar with Gmax (shame on me), and though I owe K. Murdock's Gmax Bible I am not fluent enough in neglish to catch all the subleties of his sometimes elliptic explanations ;)
I ignored that Gmax defaulted (or at least my installation) to 'Bezier position'... and with your help I turned that into 'linear' and now everything looks much better.

One thing is still weird: whatever the value I give to Z (to let the beam disappear into the ground/emerge again) when viewed in FSX/P3D2 the beam hickups some meters UP then dives, and when re-appearing "falls" from some meters back into place. That's strange because in Gmax and in MCX the movement is OK without this upper abnormality. I really can't figure out why this happens in the sim only...

This hickup lasts only some tenths of a sec, maybe 1 frame or 2, but is visually notiiceable (when close to the lighthouse).

And oh maybe this post would better belong to the Gmax forum? We're not talking of MCX anymore, since my problem move from texturing to animation... ;)
 
the rotation animation must be linear and keyframed . if a animation lenght of 150 frames you can divide this every 25 frames, giving a rotation of 60 degrees each, to get the 360 degrees in total rotation. and go ahead, this issue of lighthouses has been a topic always, have been much discussed before.
 
Yes, don't forget to change the rotation controller to linear too.

If that still causes problems, try choosing other controllers and test in the sim. Some work better for this than others.
 
Yes that's a matter of trial & error I guess...
Even if this "has been much discussed before" I'd be luckier with suggestions, however. ;)

Everything is set to linear, I fiddle about with the params but no joy.
What's weird is the difference of behaviour in Gmax and MCX where everything goes fine, and in the sims where the extraneous hickup is rendered.
The less my Z-axis displacement is, the less the unwanted jump is noticeable, though. Maybe will I live with that, we're not simmeng from the foot of a lighthouse, after all, but from a cockpit.

Something has caught my eye in the Gmax Bible, the "visibility track". Is it really possible to let the group/model be invisible during certain frames? That would be an elegant workaround. But even with the book I can't figure out how to use it.
And even more, if an invisibility feature would be taken into account by the gamepack, go through MCX, and be accepted and rendered by the sim in fine.
 
Well, I eventually understood how to add visibility keys and how to turn it off and then on again.
When I play the animation in Gmax I can see my beam rotating and being switched on and off at the desired angles.

BUT...
When I export my model including its animation and open it in MCX I see just the beam rotation but nothing for visibility (stays always on). And therefore, same thing in the sim : the beam rotates but stays always visible.

Conclusion:
1-I don't know how to export my MDL if there's a visibility control included (or I don't know what to do when I use the AnimationManager in the FStools menu) and this is almost certainly the reason of this fail
2-MCX and the sims (or the FSX gamepack in Gmax) can't manage visibilty as tweaked in Gmax?

What do you think?
 
Back
Top