Home   Help Search Login Register  

Author Topic: Lampost light  (Read 8241 times)

0 Members and 1 Guest are viewing this topic.

Offline Tomb

  • Contributing Member
  • **
  • in2 Metal? Go 2 my sig
Re:Lampost light
« Reply #15 on: 23 Nov 2003, 21:52:11 »
 :D here are a few pics (nothing overwhelming though) :









Offline Colonel_Klink

  • Members
  • *
  • Independent Addon Creator
    • DC3D Game Modelling Zone
Re:Lampost light
« Reply #16 on: 24 Nov 2003, 01:07:12 »
Tomby! Yep I've got that runway pack in the deep recesses of my hard drive somewhere. I'll set up an archeology crew and start digging :).
BTW those pics look good. Thanks.
Rebel without a pause...D.I.L.L.I.G.A.F.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Lampost light
« Reply #17 on: 24 Nov 2003, 01:48:26 »
Got one or two references that might be useful, but then again........maybe not.

http://web.engr.oregonstate.edu/~hunterz/other/primer/ch4.html

http://www1.faa.gov/atpubs/FSS/fss1101.htm#11-1-1.%20AIRPORT%20LIGHTING

Will keep looking though

You might need to copy/paste that last link into your browser.


Planck
« Last Edit: 24 Nov 2003, 01:56:55 by Planck »
I know a little about a lot, and a lot about a little.

Offline Colonel_Klink

  • Members
  • *
  • Independent Addon Creator
    • DC3D Game Modelling Zone
Re:Lampost light
« Reply #18 on: 24 Nov 2003, 06:04:28 »
Thanks a heap Planck. These are good.
Rebel without a pause...D.I.L.L.I.G.A.F.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
« Last Edit: 25 Nov 2003, 00:31:52 by Planck »
I know a little about a lot, and a lot about a little.

Offline Tomb

  • Contributing Member
  • **
  • in2 Metal? Go 2 my sig
Re:Lampost light
« Reply #20 on: 25 Nov 2003, 00:46:00 »
 :o sheesh, planck! :wow:
someone admin-like should add a nicky to your username:  "über research maniac"  8) ;D

you really need a wife man! :noo:  ;D j/k

Offline Colonel_Klink

  • Members
  • *
  • Independent Addon Creator
    • DC3D Game Modelling Zone
Re:Lampost light
« Reply #21 on: 25 Nov 2003, 01:24:08 »
Progress.

NOTE: Sometimes the pic don't show.. blessed host :(
Center runway light:
(Disregard the yellow lights.. was experimenting.)


and day time (extrapolated from the drawings in one of Planck's posts)



Working on a script to do the time sequenced lights for the runway approach. I will probably use Everon for my experiemnts as my island texturing is a bit.. well poor.. to say the least.
Now these approach lights will be embedded in the wrp so the script will have to be able to turn these suckers on or off... ideas are more than welcome :)
« Last Edit: 25 Nov 2003, 11:40:04 by Colonel_Klink »
Rebel without a pause...D.I.L.L.I.G.A.F.

Offline Tomb

  • Contributing Member
  • **
  • in2 Metal? Go 2 my sig
Re:Lampost light
« Reply #22 on: 25 Nov 2003, 23:55:28 »

 ::) ...which brings us sadly close to THIS thread.

 :P  :) See, I tried this scripting stuff once but ran into some annoying prob's,
you should read the thread klinky, I think it relates to your own thougts & dreams
(yea dreams coz I'm afraid we have a problem with static map objects
 unless you use individual object ID #'s in ingame scripts).

the issue is how to find a global working command for non-identified objects of the same class.
sort of an "Object _x" spell, foreach MyClass... but I never found a way out  :(

Offline Colonel_Klink

  • Members
  • *
  • Independent Addon Creator
    • DC3D Game Modelling Zone
Re:Lampost light
« Reply #23 on: 27 Nov 2003, 09:43:15 »
Thanks Tomby.
What I've been playing around with is a script that would use the runway light ids (cos I know where all the damned lights are on my island I guess). What I intend doing is doing further experiments with the script being inside the addon that contains the lights and all the user of my island (if they ever get to use it, but may experiment on Everon) would have to do is enter a simple init command that would make the runway light switch work from within say the control tower or similar building.

As for the sequential lights at the ends of the runway would be controlled by a script as well. Pain in the derryere (bottom :))) to get all the light ids but I think it will work. Notice I said 'will', cos if I gonna spend a sh*tload of time on it the sucker will work :)

As the runway and streetlamp addon has to be included with the island I dont see that a simple command to start the script will be too much of a pain to most OFP'ers.

oh the runway lights above can be turned off and on using nearestobject and the switchlight commands, and there is no flickering although the lights play havoc with the 50 meter grid in OFP, but then thats a an ingame problem and not necessarily ours.
Rebel without a pause...D.I.L.L.I.G.A.F.

Navy Captain

  • Guest
Re:Lampost light
« Reply #24 on: 28 Nov 2003, 01:02:19 »
Klink, I had an idea about making physical runway and taxiway lights too mate, I got with Cpt. Moore and was begining to work on em, but i've had no luck so i've given up...... Would be grat to have in OFP though so i'll send you some ref URLS

find some FAA .PDF's about runway and txiway light FAA requirements... useful for spacing and color/design

http://www.adb-air.com/en/productcenter/catalogue/index.shtml http://

Different physical designs and uses for runway lighting, and as a plus there's heliport lighting and military lighting...

**NOTE** Just click on the different area's on the diagram to be taken to that specific area of lighting. Also I tried to get Cpt. Moore to make a working PAPI and VASI system, but alas I have not scripting or addon making experiance but alot of ideas  ;)

BTW: could you make there actually be a degree field of visibility for maybe having 2 lights back to back....
for instance, the runway begining lights would have green facing the aircraft that is landing, and any aircraft that is trying to take off would see several red lights behind it as it was taking off, and several red lights in the front as well.... If you look at that site carefully you'll see that the way the lights are physically designed with their cone of vision.. IE: what color you would see if you look at it at a certain direction. Like if you look at the bottom 180 degrees you would see a green light if the direction that you're looking at is behind the aircraft that is landing..... and then if you look at the top 180 degrees you would be looking at the front of the aircraft that is landing and the light at that direction would be red..... If you have any questions feel free to MSN, ICQ, AIM or whatever me. Basically  whenever you're looking down the runway the lights at the end should be red when you're taking off...... And if you're landing then the runway lights that you should see is the green lights marking the begining of the runway on the bottom, and then the red lights signaling the end of the runway over those green lights some mile or mile and a half down the runway.....
« Last Edit: 28 Nov 2003, 01:51:46 by CPT. Bazikian[5thSFG] »

Leone

  • Guest
Re:Lampost light
« Reply #25 on: 28 Nov 2003, 17:47:46 »
I hardly ever visit these forums....I missed most of this discussion. Anyway it so happens I've been working on all of this stuff for a while, and can offer some solutions/ideas for you all. Here we go:

Quote
   class OPGWC_HASGlowSubtle: OPGWC_ObjGlow
   {
      vehicleClass="OPGWC FX";
      displayName="HAS Glow (Direct)";
      model="empty";
      audible=1;
      simulation="fire";
      sound="empty";         
      class smoke
      {
         interval=0;
         timetolive=0;
         cloudletDuration=10;
         cloudletAnimPeriod=0;
         cloudletSize=0;
         cloudletAlpha=0;
         cloudletGrowUp=0;
         cloudletFadeIn=0;
         cloudletFadeOut=0;
         cloudletAccY=0;
         cloudletMinYSpeed=0;
         cloudletMaxYSpeed=0;
         cloudletShape=koulesvetlo;
         cl_basic=0;
         cloudletColor[]={0,0,0,0};
         initT=0;
         deltaT=0;
         maxT=0;
         class table{};
         density=0;
         size=0;
         in=0;
         out=0;
         initYSpeed=0;
      };
      class Light
      {
         Shape="koulesvetlo";
         color[] = {1.0, 1.0, 1.0, 1.0};
         ambient[] = {0.1, 0.1, 0.1, 1.0};
         position = "";
         size = 0.0;
         brightness = 0.018;
      };   
   };

   class OPGWC_HASGlowSoft: OPGWC_ObjGlow
   {
      vehicleClass="OPGWC FX";
      displayName="HAS Glow (Ambient)";
      model="empty";
      audible=1;
      simulation="fire";
      sound="empty";         
      class smoke
      {
         interval=0;
         timetolive=0;
         cloudletDuration=10;
         cloudletAnimPeriod=0;
         cloudletSize=0;
         cloudletAlpha=0;
         cloudletGrowUp=0;
         cloudletFadeIn=0;
         cloudletFadeOut=0;
         cloudletAccY=0;
         cloudletMinYSpeed=0;
         cloudletMaxYSpeed=0;
         cloudletShape=koulesvetlo;
         cl_basic=0;
         cloudletColor[]={0,0,0,0};
         initT=0;
         deltaT=0;
         maxT=0;
         class table{};
         density=0;
         size=0;
         in=0;
         out=0;
         initYSpeed=0;
      };
         class Light
      {
         Shape="koulesvetlo";
         color[] = {0.1, 0.1, 0.1, 1.0};
         ambient[] = {0.5, 0.5, 0.5, 1.0};
         position = "";
         size = 0.0;
         brightness = 0.1;
      };
   };

To start off with, the whole classSmoke section I think is required only because of the "simulation=fire" line. Basically it doesn't do anything other than fulfill an OFP engine requirement (unless you want smoke of course).

Next "model=empty". Obviously this is where you stick in your model, if you are choosing to go this route. I personally am not (I'll explain later on why), and as such am using the good ol' "empty" model.

"audible=1" and "sound=empty" are relics...I've been trying to get a custom sound working....with no success yet. But haven't given it much of a go. However it is worth noting that using other BIS sounds from the Sounds.pbo will work. Audible is self-explanatory.

"simulation=fire" This seems to be the only one that is really customisable and accessable to addon makers. "simulation=streetlamp" is a very limiting class.

So onto the fun stuff! ClassLight!  ;D

"shape=koulesvetlo" This is the model OFP will use by default. I haven't been able to get custom models to work with this....only BIS model. It seems to work a lot like using a space object in the drop array....in that you get the model, but a white box around it, or a soldier with a flag on their back. There are some models in the game that do not have a geometry LOD (like ejected shell casings), and some of these might be worth a go for the more adventurous amongst you. Koulesvetlo was in the demo of OFP, so you can see what it looks like if you wish.

"position=?" If you have a memory point on your model where you want the light to be....this is the place to stick it! For example a memory point called "pos1" would be called like "position=pos1". I don't have a position, because there is no model....this object (OPGWC_HASLight_XXXX) exists only in the config....there's no model.

"size=?" Obvious I guess, but it is worth noting that it refers to the size of the model used (koulesvetlo in this case). "size=0" as far as I can tell eliminates the "Put Fire Out"/"Light Fire" actions. Ask one of the BAS guys to confirm that (look at the Blackhawk red cabin light), but I'm 99% sure this is the case.

Now the really fun stuff! After much experimentation, here is what is going on with "color" and "ambient". Bottom line is:

color - only lights faces/vertices that are facing the light source
ambient - lights all faces/verticies regardless of direction.

Also the light must have a color value greater than 0.0 otherwise you won't see anything.

As for the numbers , it is Red, Green and Blue.....but they work not as "amounts" but as ratios to each other. To explain a bit better:

A value of 1.0, 1.0, 1.0 will give white.
A value of 0.1, 0.1, 0.1 will give white of the same brightness as 1.0, 1.0, 1.0

Now when it comes to making coloured lights, you have to change the values of course, but you are changing a ratio, not an amount. The reason it is important to think of it this way is when you are playing around with colour vs ambient....and that's another ratio of course  :P

The last number is (as far as I can tell) the amount of "flicker", but when using "simulation=fire" changing this number does nothing.

So using my config from above:
      class Light
      {
         Shape="koulesvetlo";
         color[] = {1.0, 1.0, 1.0, 1.0};
         ambient[] = {0.1, 0.1, 0.1, 1.0};
         position = "";
         size = 0.0;
         brightness = 0.018;
      };
....gives a small, highly directional white light. Example here:
http://www.roughnecks.org/opgwc/news/news1124_4.jpg

      class Light
      {
         Shape="koulesvetlo";
         color[] = {0.1, 0.1, 0.1, 1.0};
         ambient[] = {0.5, 0.5, 0.5, 1.0};
         position = "";
         size = 0.0;
         brightness = 0.1;
      };
....gives a larger white "floodlight" if you will. Example here:
http://www.roughnecks.org/opgwc/news/news1124_3.jpg

Any questions?  :o ;D Seriously though... ofpeditor@yahoo.com is where you can contact me.

And goddammit I need a ciggy after that post!  :o ;)
« Last Edit: 28 Nov 2003, 17:53:15 by Leone »

Leone

  • Guest
Re:Lampost light
« Reply #26 on: 28 Nov 2003, 18:18:37 »
Ok...had a ciggy, re-read my post, and realised I missed a couple of things. So here we go...Part 2 (this is turning into a tute... ::) )

First of all one of the things I did for OPGWC is to blank out the flare texture. It's the texture that is giving the lines of light coming out of the centre and part of the "halo" in the pic the Col. posted. Blanking this texture out is one of the single biggest improvements in OPGWC IMO. It's shit, looks shit, and ruins a whole bunch of things. If you are in a mod....get rid of it....now! It opens up a lot of doors. I'm pointing this out because my results will be slightly different.

Now again, as far as I have tested these things, the "switchlight" command will add a cone shaped object to your light.....the same one on all BIS streetlights. I have tried with the same model, and turned it on using "inflame" which produces the circlular model (koulsvetlo) and with "switchlight" which produces the cone object (can't remember object name).

As pointed out earlier...objects in the wrp file can be turned on using the "switchlight" command, but as far as I know this will result in the cone shaped object being produced.....not a desirable result on many occasions. This is partly why I'm not using a model for the lights.....sticking with "empty" instead. The other reasons are that they simply don't require a model....and that attaching them to the "special model" (see below) would decrease flexability in placement.

So it might be worth explaining the two pics I gave links to. The building is a HAS (Hardened Aircraft Shelter). The lights are part of the model and have "Always In Shadow" applied to their verticies. Now when the lighting script is activated it creates a special model which consists of the same lights (but slightly larger) with their verticies set to "Shining" over the light that are part of the HAS. Also part of this model is the "glow" around the lights....a simple texturing job.

At the same time a number of custom light objects are created.....the two in the above config. Two in the middle of the HAS and three on each side. It gets very very difficult to have any more than this in a small area....and about a third of the HAS's will have side-only lighting. Too many light objects in a small area produces a lot of flickering, and some ground lighting errors.

There are a LOT of advantages in doing things this way....and hopefully they will be apparent in the full OPGWC mod.

Phew......I need a drink now!  ;D
« Last Edit: 28 Nov 2003, 18:23:19 by Leone »

Leone

  • Guest
Re:Lampost light
« Reply #27 on: 28 Nov 2003, 18:20:32 »
Oh...last thing. The lights CPT. Bazikian was talking about will be in the OPGWC mod. I've done a bit on them....but they are on the back-burner at the moment while I do other things.  :)

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Lampost light
« Reply #28 on: 29 Nov 2003, 00:27:33 »
Interesting post Leone.

Most of this I agree with, however, I think think that the fourth parameter in the color and ambient statements refer to alpha.

Try removing the fourth parameter from the statements and you will be left with a white light, regardless of what colour you have selected.


On another, but similar note:

The colordiffuse and colorambient statements as used in the 'streetlamp' simulation on the other hand, don't have the fourth parameter and this is why the colour is always white.

Adding the fourth parameter to colordiffuse and colorambient will allow the colour of the lights to be changed.



Planck
« Last Edit: 29 Nov 2003, 00:28:40 by Planck »
I know a little about a lot, and a lot about a little.

Leone

  • Guest
Re:Lampost light
« Reply #29 on: 29 Nov 2003, 04:20:49 »
Ah I see....I had only played around with it using simulation=fire. Ta Planck  :)