• 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.

Effect parameters using FSX attach tool

Messages
32
Country
turkey
Hello. I designed ramplights for illuminating the apron and tried to place fx_landing.fx effects in front of the lamps. Finally I succeeded. Briefly, after creating a small plane and modify as editable mesh then you have to position it precisely and rotate correctly, because the beam is coming from the pivot of the plane towards the top edge of the plane... Then you are attaching Effect and Visibility, effect is "fx_landing.fx", visibility is "General Light".

OK I succeeded but, the effect parameters do not work. I do not want the lights during the DAY.

So for effect parameters, I inserted DAY=0;NIGHT=1;DUSK=1;DAWN=1; but DID NOT WORK, instead lights are on entire day.

Later I tried only DAY=0; again lights are on entire day.

Later I read in the forum that there is a bug, and I have to seperate, DAY+NIGHT and DUSK+DAWN.

Then I cloned the plane, for the first plane I attached the effect with parameters only DAY=0;NIGHT=1; and for the second plane the same effect with parameters only DUSK=1;DAWN=1;
again lights are ON entire day.

Finally I tried this: I did not clone the plane (mesh), but I attached the effect first with first set of parameters (DAY=0;NIGHT=1), and later attached the effect with the second set of parameters (DUSK=1;DAWN=1); to the plane (in fact it had alreay became an attachpoint) again.

Guess what? Again they are ON entire day..

Any suggestions? Please help.
 
You need to attach the effect two times. You said you cloned the mesh, make sure that you used "copy" instead of "instance". If you use instance, they will change together when you do on one.
 
Yes I clonned the mesh. But I do not remember a dialogue box or setting when we are clonning an object, (select the object, Edit - Clone object and it's done.), if it was Plane01, a new plane Plane02 is created just on Plane01. I have done it this way.
Then I clicked Attach Tool, in the dialogue box, checked Effect and Visibility, selected fx.landing.fx, for the effect parameters, "DAY=0;NIGHT=1;" and left the "general light" under Visibility. Afterwards I selected Plane01 (which was mesh) and in the attach tool dialogue box clicked on "Attach to selected geometry",has seen that Plane01 became an attachpoint.

Then I modified the effect parameters on the dialogue box as "DUSK=1;DAWN=1;" and selected Plane02, then clicked on "Attach to selected geometry", Plane02 also became an attachpoint.

That'a what I did exactly. The result is the lights are on entire day. I am suspicious if something other is making it visible during the day, maybe my FSX configuration, other parts in my scenery, or some addon .. I don't know. But I tried many times, many things.:mad:

If you do not see a mistake in what I did above, I may upload the gmax file somewhere for you to examine.
 
What I've always done was select the geometry first and then start the attach tool, I apply the effect, params, etc. and then close the attach tool dialog. Select the second plane, box, or whatever and start the attach tool again, add the effect and the 2nd set of params. It's always worked.

I think you should delete your attachpoints completely, then go into File > File Properties and on the "Custom" tab you should see some attachpoints in the list. This is because when you delete the geometry you're not actually deleting the attachpoint entirely - I think these prior attachpoint attempts you've made are likely causing you the problems. If you select each one of those one by one and hit the delete button they will go away. Leave the GUID and Friendly name alone. Then go back and draw two boxes or planes or whatever and try attaching effects to them as I outlined above. With any luck at all your effects should show up :)

EDIT: Are you running DX10 by chance? I've been playing with this myself and I can't get the damn effect to turn off in the daytime either. I did a test where I used two different effects so I could tell which instance I'm seeing. Everything's fine if I load a flight in daytime, both effects are off. I set the sim time to Dusk, and everything seems fine, I see the effect I attached using DAWN=1;DUSK=1. I set the sim time to night and I see both of them. Then I set the sim to dawn and everything is fine once again, I see the DAWN=1;DUSK=1 effect alone again. Now when I go back to day I still see the DAWN=1;DUSK=1 effect. The kicker is I reverted to DX9 and under DX9 these effects behave as you would expect them to, at least according to my first test, I have another scenario saved to test out yet.

EDIT again: Yep, that's what I'm coming up with testing two completely different objects at two different airports. One is in the northwest US and the other in the deep southeast US. Effects behave normally under DX9 but from what I'm seeing the DAWN=1;DUSK=1 instance of the effect "sticks on" once it's been activated in DX10. I am still running v1.4 of the fixer, I'll update that and see if anything's changed.

Jim
 
Last edited:
Thank you so much JRobinson.

Oh this is too much for me. I do not in fact understand what really DX9 and D10 is, and also "fixer" :).

I have got an Nvidia GTX660Ti video vard, I feel as if I remember a "DX11" written on the package of it, I don't know,but I always use the updated driver of it. I use win7 64 bit, and FSX Acc. Pack.

But on my system I am going to make the same test which you did today, in a couple of hours later.

I am looking forward to hearing from you.
 
The DX10 choice is a checkbox in the FSX Settings menu structure. Make sure it is unchecked to use DX9.
 
Dear JRobinson and tgibson,

In FSX Display Settings Preview DX10 is unchecked in mine.

I made the test.

I started from scratch. I created two objects, next to each other. I attached the effect to the left one with parameters DAY=0;NIGHT=1; and attached to the right one with parameters DUSK=1;DAWN=1;

The result is,

THEY ARE ON ALL THE TIME. I started with DAY, both of them are lighting.. Switched to DUSK, NIGHT AND DAWN.... All the time both are ON.

I understand that in my system, the effect parameters do not have any effect :D on the effects.

What I should do after this time, I don't know. I did not understand too much about DX9 and DX10, if you find the solution please let us know...
 
DX10 mode is kind of a fad now (and one that's here to stay), a guy named Steve Parsons has been working on the shader programming for a couple years now and has basically finished up what MS left undone with DX10 mode. There is a freeware version of his updated files available at Avsim or he has also made a commercial version with some additional fixes and an interface that installs them and configures your system automatically. Most notable improvement is probably cockpit shadows in the VC but IMHO the overall graphics are much better and also smoother.

Your graphics card is capable of DX11, which means you could run Prepare3D v2 if you wanted to, but it's also backwards compatible so you can run DX9 and DX10 programs as well such as FSX, FS9, etc.

If you select the geometry that you've attached your effect to and do right click > "Properties" you should see a User Defined tab, check this and see if your parameters are making it into the embedded code of the .mdl. You should see effectParams="DAY=0;NIGHT=1" somewhere in that line of code, if it's missing maybe there's something wrong with the way you're specifying the parameters when you're attaching your effect. If it's there and correct for both instances of the effect it must be something to do with the way the sim is handling it for some reason. In my case the effect would load "off" if I loaded a flight in daytime and only "stuck on" after it had been turned on by switching the sim time. You must have something different going on. You can upload your gmax file and I'll have a look or I can test out your finished model here and see if I get the same result if you like.

BTW I tested the same model I used for FSX in P3D2 and the effects behave as you would expect them to for anyone that may be wondering.

Jim
 
Hi. I do not really know whether I am running DX10 or else. I just set up FSX Acc+REX+FTX Global etc.. But I feel it is DX10.

Now I am at work, but last night when I made the test objects I checked the Object Properties, there was no problem, I sure had seen the effectParams="DAY=0;NIGHT=1" and visibility="general light" etc. and for the other object effectParams="DUSK=1;DAWN=1" and visibility="general light".

When I go home tonight I will upload the test gmax file (Just an untextured box and over it two plane-attachpoints) somewhere and give you the URL.

But let me give you another clue right now.

In FS9 times, I had used some bgl lights. I mean I had used to technique of bglc_9 compiler. With that tool I had created mdl files which are in fact lights. You can position them via xml code. Before positioning I tweak them using MDL Tweaker tool, to make the lights DAY=0, NIGHT=1, DUSK=1, DAWN=1. Now I make bgl files with those MDLs using FS9 xml format and FS9 bglcomp and use them in FSX.... They work correctly. Yes, they work correctly. Daytime OFF, other times ON..

Does this help ?
 
You are running DX9, DX10, *and* DX11. Which one which will be used at the moment all depends on which *program* you are running. If you are using FSX without the DX10 box checked, then you are running DX9 *at that moment*.
 
This problem seems connected with the particular effect you're using. I had the same problem as you in DX10, DX9, and also P3D2. All I did was open your gmax file and do Properties on your attachpoints. In the User defined I replaced effectName="fx_landing" with effectName="fx_obslight" on the DAY=0;NIGHT=1 instance and and effectName="fx_obslight2" on the DAWN=1;DUSK=1 instance. (fx_obslight flashes, fx_obslight2 is steady) I exported the model and it worked fine in the sim (still the same quirkiness I described above in FSX DX10 even after upgrading to v2.0 of the fixer BTW but that seems to be a given.)


Jim
 
Hmm. Thank you.

However bad news.

But I was using fx_landing to illuminate the apron. Which other effect can I use for apron illumination? Why does the damned landing effect do this ?
 
Perhaps because fx_landing is a hard coded effect, not one that is in XML format.

You can use MDL Tweaker II to fix this problem for FS2004 files; I'm not aware of a similar fix for FSX. But that uses a polygon with a special material applied, not an attached effect.

Sidney Schwartz's tutorial is available here:

http://www.fsdeveloper.com/forum/threads/light-with-projection.77873/

My current technique:

1. Create the object in GMAX, following Sidney's tutorial. Note that all non-light objects must be linked to the light object so those objects will not be flipped in FS.

2. Export the file as an FS2004 Scenery MDL file.

3. Load the MDL file into MDL Tweaker II.

4. Click the Fix BGL_LIGHT problem button.

5. Choose the Window/Statistics menu item.

6. In the resulting dialog box in the Bounding Box section, type -100 in the upper 3 boxes, and 100 in the lower 3 boxes. Close this box once you are sure you have it right (you will have to reload your MDL file to get it back, since the menu item is now grayed out).

7. Choose File/Save, and save it with the name you want.

8. Put the tweaked MDL file into a library and place it into FS. I used EZ Scenery for this.

I used Bill's values for the Light_Land material (RGB = 134, 134, 109, 60% opacity).

My light_land_01 polygon (a triangle) in the pole pictured above is raised 65 feet above the ground and is tilted 55 deg. up from straight down. light_land_02 is the same.

PS. These FS2004 lights work fine in FSX, but I doubt they would in P3D2.

Hope this helps,
 
Thank you so much tgibson.

Indeed in my two previous post I was saying a similar thing, I feel they are indeed same. In FS9 times, I searched for a solution, with some text codes (asm codes I remember) I was compiling and with bglc_9 compiler I used to create some mdl lights. I can position them via xml and sure they work fine in FSX, too. So I will opt to use them again. But the biggest disadvantage is that if you cannot attach the light to an object, in our case to the light pole, for each light pole (maybe for each pole more than one light) you have to find the coordinates, nevertheless worth to spend time. But it will be difficult when positioning onto many street lights..:) They are 10s maybe.. If it was possible to attach, no such a need would be.
 
Last edited:
You can attach a BGL light to an object just the same as an effect, you need to know the GUID of the BGL light and convert it to an FSX style GUID, then you attach it as a library object using that GUID.

Jim
 
Yes I know.. You can attach another object to an object via its GUID, not itself.
I tried to do it, but could not. The only problem is that the mdl that bglc_9 produces is a fs9 model, and cannot be converted to a fsx model. I tried to do it with model converterx, it crashed.

Moreover I tried to library this fs9 mdl with fsx xml by giving a fsx type guid.. again gave errors.
 
You don't convert the model to an FSX model, you convert the FS9 style GUID to an FSX style GUID and attach it with that.

1. Make your BGL light in the .asm, compile to .MDL with bglc_9
2. Write an FS9 style library XML (where the model's GUID is specified in the XML)
3. Compile the light library with the FS9 version of bglcomp.exe and put the finished light library .bgl in your scenery folder
4. take the FS9 style GUID from the library XML and use the MCX converter to make it an FSX style GUID (Special Tools > GUID converter)
5. Attach the light to your light pole with the converted GUID and compile the light model into an FSX library as you did when attaching effects
6. Place the light pole objects with IS2 or similar

EDIT: Here's an example FS9 library XML, the FS9 BGLComp SDK is available in the downloads section which contains the FS9 bglcomp you'll need to compile this. The GUID can be any 32 character alpha-numeric string, there are GUID generators available to generate a random one if needed or you can just use the one below which I just randomly generated.

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">

   <ModelData
    name="5e2b23a9e301f32ff9f294166674d049"
    sourceFile="bgl_light_whi.mdl" />

</FSData>

The above GUID converts to 5e2b23a9-f32f-e301-1694-f2f949d07466 for FSX so you would use that to attach it in Gmax.

Jim
 
Last edited:
It would be still little how much I thank you. It worked fine MR. JRobinson. I made the spotlights. They are really good. On one pole, there are 6 lamps which have different headings and under ones more banked.. I have put a plane in front of each.

Only it was a problem discover where does the beam come. Again first I made test lamps and discovered. When attaching this type of light, beam comes from the pivot of the plane, to the back of the plane...

One more comment, I could not find A GUID Converter on Special Tools menu of Model Converter X (MCX Converter you typed exacly, I thought you've meant it). But I have a tool GUID Processor, it worked fine, I think it did the same thing.

Thank you for every thing. Oh I forgot, in the day they are OFF. ;)

Edit: They are off, because I had tweaked the mdl with MDL Tweaker before using.
 
Last edited:
Back
Top