Street lights like Ultimate Terrain?

#1
I've not had much time to investigate so I thought i would ask instead.

Does anyone know how to implement street lights like Ultimate Terrain.

Are they a scenery object?

I was thinking of adding a feature whereby lights can be placed along a polyline thus giving the ability to easily create street lights.
 

HolgerSandmann

Resource contributor
#2
Hello Matthew,

as far as I know, in UT FS9 the street lights were objects (hence the issue with removing autogen near them) while in FSX they are light effects tied to the halo.bmp effects texture.

The issue with either is that too many of them will be hard on resources. In that regard the FS9 style object lights were easier on frames because larger groups of lights were coded as a single object. However, that also meant that elevation changes were more likely to lead to lights hovering high above the terrain.

Cheers, Holger
 
#4
that leads to an updated question, with the new generation of 1.5GB videocards with DDR5 RAM, would newer systems be able to handle increased numbers of FX based lights?

I'll run some tests :)
 
#6
Hi Dean:

Have you considered / tested options discussed in these threads ?

http://forum.avsim.net/topic/311168-fs9-autogen-issues/

http://forum.avsim.net/topic/296289-looking-for-some-light-balls/

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


BTW: How many street lights (and of what type) were "too many"... before performance suffered ? :confused:


Ex: "Light ball" or "light point" basic Effects only with Z offset... or was 3D geometry with a visual model / textures also involved ?

If a "basic" *.Fx file was used for a "light ball", was there more than 1 Particle and Emitter in the *.FX file ?



PS: Do you also have an "Effects.Cfg" file in the [FSX install path]\Effects sub-folder containing this code ? :

Code:
; These particle spite limits are applied based
; on the "Special Effect Detail" settings slider.

[Sprite Limit]
Medium=5000
High=9999999999
Low=1000

; These particle emit rate modifiers are applied based
; on the "Special Effect Detail" settings slider.

[Emit Rate]
Medium=0.700000
High=1.000000
Low=0.300000

; If an emitter has its LOD flag set and the viewpoint is
; further away than this at the time the effect is started
; then the emitter will be disabled.

[Detail]
Forced Distance=250

; The [Emitter Detail Distance] and [Emitter Detail Modifier]
; tables work together. If an emitter is further away than a
; distance specified in the distance table then the rate it
; emits particles at is scaled by the factor specified in the
; modifier table.

[Emitter Detail Distance]
Medium=20000
Far=25000
Very Far=30000

[Emitter Detail Modifer]
Medium=0.700000
Far=0.500000
Very Far=0.000000
[EDITED]

PS: Another pertinent consideration (...and caveat !) related to Effects and performance discussed by an ACES blogger:

http://blogs.technet.com/b/torgo3000/archive/2006/01/25/418037.aspx

[END_EDIT]

GaryGB
 
Last edited:
#7
Hi Gary,

I just did some rudimentary tests tonight, will dig into this again in the morning... I'll answer your questions more in depth in the morning after I catch up on sleep...

It seems the best approach is to use SCASM code, I've been avoiding like the plague since FS98, to call the Halo.bmp which seems may give better results?

I don't know though I just got done with island wide freeway traffic (and Guam doesn't really have many streetlights)...

Placement of effects were attempted on 45m and 100m on separate tests, both killed FPS very quickly... (3-4fps)... All lights were simple xml fx placement of the navwhite.fx (not it's real name)... (shoot I just looked at it and the fx all had 3 emitters ngeks!)

Basically there were no more lights than Allen has done with the Ultimate Terrain series... I remember he said there were two possible techniques...

I'll have a look at the links you gave once I've had some sleep... If I can nut that out and can track down my color temp RGB values for the different types of street lights then it'll all look very pretty...

Cheers,
Dean.

(edit) attached a screenshot, best viewed in a dark room... effects are not so bright... i still think that scasm code is the best option unless there is any other updated code that can replicate the effect... :( If I have to learn scasm then so be it, but a tool for scasm light placement would be very handy... Feed it a list of lat/lon then it generates the SCASM code...
 

Attachments

Last edited:
#10
Looking at UTX and comparing it with FX based lights, not to the same degree...

In UTX each light point is spaced at about 100m from each other, each light has 4 points each offset 1m from each other.

I'm up and about to do more tests, I think the main difference may be that instead of main roads I'm adding lights to residential areas. I'll do a test with light spacings at 250m, 500m and 1000m and see if that can give a somewhat pleasing result.

My theory is that even though the spacing may sound extreme, the GIS software will place at least 1 or 2 lights only per street rather than 10-25.

The reason I'm trying to get enough lights in there is because I have a plan to generate another raster dataset off the vector data. Hence if I place lights too far from each other then the effect won't be as satisfying. But I'll give it a shot and see what I come up with.

Gary I haven't played with SBuilder except maybe once or twice in the last 5 years and gave up in favor of GIS software and XML code lol. It may be worth seeing if it can accomplish the task.
 
#12
Hi Dick,

Thank you so much, I saw those last night when I was reading through threads and just tested them. I can definitely say that performance with the BGLC lights are way better than with FX placement...

My question now is can we develop something for everyone to use with different RGB values for High Pressure Sodium, Flourescent, Sodium Vapor, Mercury Vapor etc...

I have tracked down good RGB values that are pretty relative to each type of lighting system...

I have some tools I'll upload as well that can take google earth 4 KML files and massively place objects and effects quickly and easily, the program needs updating for GE5 and above though... Will attach it when I get a chance...

Cheers,
Dean.

(edit) I've looked at the code you provided at AVSIM and think I can figure out how to make each light type, if I have success then I'll compile and share all the various lighting types :)

Code:
    db  'R','I','F','F'                ; RIFF file identifier
    dd  bgl_data_end - $ - 4            ; size of RIFF data
    db  'M','D','L','9'                ; file identifier (FS9 model)

    db  'M','D','L','H'
    dd  visual_model_header_end - $ - 4
    dd  visual_model_header_end - $ - 4
    dd  0
    dd  0
    dd  1
    dd  0
    dd  0
    dd  156
    db  'F','S','8','0'
    dd  2304
visual_model_header_end  label dword

    db  'I','S','F','T'   
    dd  ver_end - $ - 4  
    db  "rhumbaflappy",0
ver_end label word       

bounding_box_riff_start    label    word
    db  'B','B','O','X'   
    dd  bounding_box_riff_end - $ - 4
    real4  -0.005, -0.005, -0.005  
    real4  0.005, 0.005, 0.005 
bounding_box_riff_end label word       

exterior_riff_start_0 label BGLCODE
    db  'E','X','T','E'   
    dd  exterior_riff_end_0 - $ - 4

    db    'B','G','L',' '
    dd    bgl_riff_end_Light - $ - 4

    IFIN1 nolight, tod, 2, 4
      BGL_LIGHT 0, 0.0, 0.0, 0.0, 0, 0.0, 0.0, 000[COLOR="Red"]FFFFFF[/COLOR]h, 0.0, 0.0, 0.0
    nolight       label BGLCODE
      BGL_RETURN    BGL_END
      BGL_RETURN

bgl_riff_end_Light    label    BGLCODE
exterior_riff_end_0    label    BGLCODE
bgl_data_end label     BGLCODE
Best place to get these HEX RGB values is http://www.javascripter.net/faq/rgbtohex.htm

If this works we can all make good night lighting systems ;-) BTW I did my test with 5000 lights is ok will have to reduce to 3000 lights I suspect for a region the size of Guam, but doing a stress test with 30,000+ lights on Guam just to see how it affects performance...
 
Last edited:
#13
Hi Dick,

I've had a tremendous day today having fully tested and implemented the street lighting system...

Attached is a copy of a new LightPointLibrary with full RGB/CIE/Kelvin color temperatures for various types of street lights...

Included are:

Code:
The FS9 library names would be:

A8D77AC54CE990F5FCC28E9996FCA2B6 40wtungsten
9311D81A47EE13107F76788E404019D7 100wtungsten
76D36C8843015A53989704AB15A1ECBF blacklightflourescent
107A682243D2F35A61B63CB233B56F76 candle
85827FA44F8AD3CC52AA16AB8577832D carbonarc
3CEF50064C87BB9A4A83FBA94FF78632 clearbluesky
FC699AAB4D7B479466BAF4A1B8C2E711 coolwhiteflourescent
B411602D4CE51E305DB96C80DBBDCC0C directsunlight
C16446FC4AC5B8E06512F6AA2E1A2688 fullspectrumflourescent
2D61FF6C4F34CF8C82221DAECFF3C67C growlightflourescent
302CA82D495AF2774AB6618F68AEA7E4 halogen
99D3555C4EF0935AE1F89E95C06329FF highnoonsun
0E560E6945DAEC76F55158AFD52BF1B7 highpressuresodium
19CA3FB94407CF8C8C3FEA8D265D6E51 mercuryvapor
EBF0DAD24BB71BD4B76C278D6BBDFA3A metalhalide
BB96D0554344FC20C0B2058122950925 overcastsky
AF4A10F5457ED3A66F56B28B0B81B528 sodiumvapor
D7D5464F47F0CD90DA199186B4157F25 standardflourescent
82569FCF4C2B64EEF483299E2C345922 warmflourescent

The FS9 library names would be:

{A8D77AC5-90F5-4CE9-998E-C2FCB6A2FC96} 40wtungsten
{9311D81A-1310-47EE-8E78-767FD7194040} 100wtungsten
{76D36C88-5A53-4301-AB04-9798BFECA115} blacklightflourescent
{107A6822-F35A-43D2-B23C-B661766FB533} candle
{85827FA4-D3CC-4F8A-AB16-AA522D837785} carbonarc
{3CEF5006-BB9A-4C87-A9FB-834A3286F74F} clearbluesky
{FC699AAB-4794-4D7B-A1F4-BA6611E7C2B8} coolwhiteflourescent
{B411602D-1E30-4CE5-806C-B95D0CCCBDDB} directsunlight
{C16446FC-B8E0-4AC5-AAF6-126588261A2E} fullspectrumflourescent
{2D61FF6C-CF8C-4F34-AE1D-22827CC6F3CF} growlightflourescent
{302CA82D-F277-495A-8F61-B64AE4A7AE68} halogen
{99D3555C-935A-4EF0-959E-F8E1FF2963C0} highnoonsun
{0E560E69-EC76-45DA-AF58-51F5B7F12BD5} highpressuresodium
{19CA3FB9-CF8C-4407-8DEA-3F8C516E5D26} mercuryvapor
{EBF0DAD2-1BD4-4BB7-8D27-6CB73AFABD6B} metalhalide
{BB96D055-FC20-4344-8105-B2C025099522} overcastsky
{AF4A10F5-D3A6-457E-8BB2-566F28B5810B} sodiumvapor
{D7D5464F-CD90-47F0-8691-19DA257F15B4} standardflourescent
{82569FCF-64EE-4C2B-9E29-83F42259342C} warmflourescent
I added a few extras in there in case anyone ever needed them, but the main ones for streetlighting are the flourescents for countries like australia, as well as sodium, metal halide and mercury vapor lighting systems...

I've attached a sample screenshot of my final result...

It's such a shame FSX can't handle massive amounts of lights, I do have a concept for how to do it and avoid the limitations of FX or BGLC light calls... I'll need to do further tests when I have time...
 

Attachments

Top