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

Trying to compile "Fog's" floodlight effect

Messages
1,637
Country
unitedstates
Looking through the forums for lighting ideas I came across the thread by Fog about his lighting effect. Seems straightforward but I can't seem to compile or I should say it compiles but is not working.

Firstly, anybody using this method? How are the FPS as I plan to add about 50-60 lightpoles throughout the airport.

Here is the XML file I am using which I call FloodlightQuad.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="22.315939" lon="114.209092" alt="0" pitch="0" bank="0" heading="0" altitudeIsAgl="TRUE" imageComplexity="SPARSE">
<Effect effectName="fx_FloodlightQuad" effectParams="DAWN=1;DUSK=1;"/>
</SceneryObject>

<SceneryObject lat="22.315939" lon="114.209092" alt="0" pitch="0" bank="0" heading="0" altitudeIsAgl="TRUE" imageComplexity="SPARSE">
<Effect effectName="fx_FloodlightQuad" effectParams="DAY=0;NIGHT=1;" />

</SceneryObject>
</FSData>

I read on another thread about adding two instances of the scenery object so it works during day/night and dusk/dawn. I tried it with it and without it but still no go.


Here is the .fx file. All I did was copy/paste Fog's code. I call this file fx_FloodlightQuad.fx:

[Library Effect]
Lifetime=5
Version=2.00
Display Name=Floodlight
Radius=50
Priority=0


[Properties]
Cockpit=1
VirtualCockpit=1
Spot=1
Tower=1
Map=1

[Emitter.0]
Lifetime=0.50, 0.50
Delay=0.00, 0.00
Bounce=0.00
Rate=1.00, 1.00
X Emitter Velocity=0.00, 0.00
Y Emitter Velocity=0.00, 0.00
Z Emitter Velocity=0.00, 0.00
Drag=0.00, 0.00
X Particle Velocity=0.00, 0.00
Y Particle Velocity=0.00, 0.00
Z Particle Velocity=0.00, 0.00
X Rotation=0.00, 0.00
Y Rotation=0.00, 0.00
Z Rotation=0.00, 0.00
X Offset=0.00, 0.00
Y Offset=0.00, 0.00
Z Offset=0.00, 0.00
Pitch=0.00, 0.00
Bank=0.00, 0.00
Heading=0.00, 0.00

[Particle.0]
Lifetime=0.00, 0.00
Type=19
X Scale=550.00, 550.00
Y Scale=185.00, 185.00
Z Scale=00.00, 00.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
Ground Normal=1
Static=1
Face=0, 0, 1

[ParticleAttributes.0]
Blend Mode=2
Texture=fx_floodlightquad.bmp
Bounce=0.00
Color Start=152, 184, 184, 255
Color End=152, 184, 184, 255
Jitter Distance=0.00
Jitter Time=0.00
TempK=107.00
TempRate=0.00
uv1=0.00, 0.00
uv2=1.00, 1.00
X Scale Goal=0.5
Y Scale Goal=0.5
Z Scale Goal=0.5
Extrude Length=0.00
Extrude Pitch Max=0.00
Extrude Heading Max=0.00

Can anybody get this to compile and show up. Here's a little bmp attached too in case you wanna try. It shows up at VHHX, Kai Tak Airport down over at where the Government Flying Services buildings would be (south side of the airport).

Thanks,

Clutch
Project 9Dragons
 
Last edited:
Just want to add a screenshot of what I get after I compile. The addon scenery is hi-res 1.2m photoreal with AFCAD2 on top of it in case that should make any difference.
 
Last edited:
Hi, it appears that the problem is that your effect calls out for "fx_floodlightquad.bmp" when your .bmp is actually named "FloodlightQuad.bmp" (without the fx_ prefix). I tried this one myself and got the same blocky rectangurlar lighted area your screenshot shows, but then edited the fx file to correct the .bmp name and wound up with this (see attached).

That is one hugely big and bright floodlight! I'm wondering if you've seen Horst18519's apron light effect in the object market?

http://www.fsdeveloper.com/forum/showthread.php?t=1772

I was very pleased with them, the "fx_Lichtkegel.fx" appears to be the apron floodlight effect, "fx_Strahler.fx" is a bright globe "bulb glow" effect to be placed at the lamp itself, and "fx_spot_medium.fx" apparently lights up the aircraft, although I couldn't seem to get this one to work as a scenery object. It worked great however, when I placed it above the aircraft as one of the aircraft lights, so maybe I wasn't doing something right.

I modified these effects slightly, scaling them down a bit and giving them a slight bluish cast to simulate the mercury vapor lights around the airport I'm working on. I then attached them (which I later learned isn't a good idea) to a lightpost and light I made in Gmax. (see attached floodlight1.jpg)

Jim
 

Attachments

  • floodlight2.jpg
    floodlight2.jpg
    27.8 KB · Views: 707
  • floodlight1.jpg
    floodlight1.jpg
    33.6 KB · Views: 681
Thanks Jim for the quick reply. Good eye... that is definately a no-no on my part. Funny, changed the bmp name but still got the big block of blue. :( I'll keep trying.

I can see my light IS huge. I set the radius at 50 metres in the .fx file. I thought that is what controls how big of a light pool you would see? Guess not. Also I am using a 128x128 bmp to test with but I can see it is showing pixelization compared to yours. What is the size of your bmp? Did you use DXT1 with no Alpha?

Clutch
Project 9Dragons


As an update - I tried Horst but instead of a big blue rectangle all I get is a big blue square? I'm lost as to what I am doing wrong?
 
Last edited:
Hi Clutch,

the Radius value sets the max visibility distance of an effect (though I haven't ever got this to work myself). The maximum size of the effect texture is defined with the XScale and YScale values of the Particle.

Cheers, Holger

P.S.: I tried using those flood light effects before but removed them again because they can look funny due to Z-sorting issues during cloudy weather. Maybe this effect doesn't have that issue?
 
Last edited:
Thanks Holger as I was about to lose it here :o

Ok, Adjusted the XScale and YScale to 10 metres. Sure enough it did finally make the square smaller. (I see in Fog's template it is 550 by 185?!?! - is he trying to light up a small town! :p ) Still a solid white square but smaller. So it must be my bmp? I even did a test and removed my texture and the 10x10 square was still there? How can that be.

What the heck... Ok, back to the SDK.
 
Clutch, I used the .bmp you posted in the .zip file and copied the effect straight out of your first post and it seemed to work fine once I changed the filename callout in the fx file. You do have the .bmp in your Effects\texture folder, correct?

Jim
 
That's what I couldn't understand. How could you get it to work and I couldn't?

"You do have the .bmp in your Effects\texture folder, correct?"

Of course I don't! What a buffoon :banghead: I tried it in every texture folder I could find except that one. However, I did finially see that texture folder at the very end. I tried it with another bmp thinking mine was somehow bad and it doesn't even show there.

Ok,... time to take a break... cool down.... say a little simming mantra to myself. I'll start over again later tonight.
 
Well another day... still no luck. Well some. I now am able to see the texture by having it in the effects/texture folder but I get no transparency. I the 50x50 metre big white box I can make out the white "light" circle I created and just in the corners I see it turing a little bluish, like the beginning of something transparent.

I tried the exact same bmp that I loaded up here Jim, the one you show working fine on yours (albeit a bit big), but still no. Are you sure you didn't change any the parameters in the .fx file?

I guess I am still confuse at what to save the bmp as? DXT1, DXT1 no alpha, 16bit, 32bit?
 
Well this is so far the best I can get (which is horrible). It's using a 32bit 888 with a solid black square as an alpha. I can now at least make out the light glow a little on the ground.:confused:

Alright as an update, I made the bmp a 32bit 888 with a white alpha. I started up FS9 and low and behold I could see the proper effect!!!.... for about one second. Then the blue box would pop in. What the?....
 
Last edited:
ok.... I have finally cracked it. Almost too embarrassed to say.

But for those who have been following my little escapade here, I kept creating an .fx file, trying some different parameters, editing a little, and each time I created the new .fx I would put in in the effects file WITHOUT deleting the old .fx file. So I was putting a good .fx on top of a few bad .fx files exactly at the same location.

That is why I would see a good effect for a split second taken over by one of the bad fx files. Wholy-moly.... that only took four days to crack...

thank you guys for your help and patience.

Clutch
 
Whew! Been playing with display settings, image formats, alpha channels, etc and I couldn't get it to not work, so I'm glad to hear that you've got it sorted out.

This is off-topic, but I have to show somebody my light again. I completely rebuilt it in Gmax last night and added a night texture. I know I could have added the night texture without rebuilding it, but it had some other geometry issues as well. The night textures really made a difference I thought; they light up the lamp lens, front side of the pole, and I also mapped all sides of the concrete base to a different part of the texture so I could shade them differently, i.e. the rear side is darker than the front, and the pole now casts a shadow on the top and rear parts of the base. Still have some fine tuning to do with the mapping and the gradients on the night texture, but being a newbie to this Gmax stuff I was pretty pleased with the result :) .

Glad you got that effect sorted out, Clutch.

Jim
 

Attachments

  • floodlight3a.jpg
    floodlight3a.jpg
    34.3 KB · Views: 2,027
WoW! That looks great Jim. I'm also at the beginner stages of Gmax and pretty much all that has to do with flightsim modeling. Luv it but sometimes it can test your patience when you hit a brick wall.

We did some lightpoles with the light bulb at the top too. Looks good for smaller sceneries but if you need to add a lot it can really lower your FPS from what we saw. And we have to add 50-60 lightpoles for our aprons. Were hoping this way will be the most effective.
 
Hey Jim,

Was just looking again at your streetlight there. How did you get the pole to light up as if the light beam was hitting it on the way down. Nice effect, I see FS( default poles do this too. Is the pole made with a Lm?

thx

Clutch
 
Back
Top