Jump to content

Recommended Posts

Hey all,

I am currently running a X Files crossed with Special Forces themed event server and I was wanting to use ambient light source to give the below affect in a forest.

purple_forest_by_ninjatic-d7e4dsp.jpg

Can I use the setLightAmbient syntax for this affect? I have had a look at the setLightAmbient wiki page, but have not figured it out.  Is anyone able to give us hand or have any ideas?

Regards,

TPM

  • Like 1

Share this post


Link to post
Share on other sites

what does your code look like at the moment? would be great to have something to work with.

Share this post


Link to post
Share on other sites

setLightAmbient simply sets the color/brightness of a lightpoint's ambient glow. You can create a bunch of lightpoints above the canopy with the desired mix of ambient settings.

HKgeBOx.jpg

 

The first problem is that you can't (as far as I can tell) create a lightpoint that ONLY emits ambient light, so if your light point is near any object, the reflection of the direct light will make it clear that there is a lightpoint there. In my pic, I hid this "evidence" just out of frame at the top, where the upper trunk/canopy of the tree is brightly lit. Basically, every lightpoint would need to be hand-placed to avoid this.

 

Second problem is that lightpoints can only be so bright, so you'll need to create a lot of them to get what I imagine your desired result to be.

Share this post


Link to post
Share on other sites
3 hours ago, bad benson said:

what does your code look like at the moment? would be great to have something to work with.

I really don't have a code atm, still very much a noob when it comes to this stuff.
 

3 hours ago, Harzach said:

setLightAmbient simply sets the color/brightness of a lightpoint's ambient glow. You can create a bunch of lightpoints above the canopy with the desired mix of ambient settings.

HKgeBOx.jpg

 

The first problem is that you can't (as far as I can tell) create a lightpoint that ONLY emits ambient light, so if your light point is near any object, the reflection of the direct light will make it clear that there is a lightpoint there. In my pic, I hid this "evidence" just out of frame at the top, where the upper trunk/canopy of the tree is brightly lit. Basically, every lightpoint would need to be hand-placed to avoid this.

 

Second problem is that lightpoints can only be so bright, so you'll need to create a lot of them to get what I imagine your desired result to be.


I can not view your image, are you able to repost from a different source and maybe show me what you did do to create the affect you are trying to show me.

If the light causes reflection, that is fine.  I can turn this into a fire flies with floating objects that can move at different speeds, directions, rotations etc.  But I would like to find out if it is possible to give a different ambient glow to a location.

Also, thank you for taking the time to help me out.

Share this post


Link to post
Share on other sites

BTW, I added three lightpoints spread out over @30 meters, 25 meters ATL, one each of red, blue, and magenta. Closer to the ground (and player) they will appear brighter and more vibrant.

Share this post


Link to post
Share on other sites
_light = "#lightpoint" createVehicleLocal getpos player;
_light setLightBrightness 1.0;
_light setLightAmbient [1, 0, 1];
_light setLightColor [1, 0, 1];
_light setLightDayLight true;
_light setLightUseFlare false;
_light setLightFlareSize 5;
_light setLightFlareMaxDistance 500;
_light setLightAttenuation [2,4,4,0,9,10];

as you can see the flare is disabled. that is the actual light point visualised. if you want that you can enable it and play with the related parameters. i tried to add all related commands that i could find (might've missed some...check wiki for cross links).

 

you could also try adding some particles to make it more of a haze than just basically coloring the surroundings.

 

EDIT: for tweaking i would suggest making the _light variable global (like TPM_light). then you can run everythign except for the first line over and over with some tweaks until you hit the sweet spot.

  • Like 4

Share this post


Link to post
Share on other sites

bb's stuff plus this would make an awesome effect

  • Like 1

Share this post


Link to post
Share on other sites

i'm working on some ground fog atm. will drop something in here later. it's mind blowingly hard to make a lingering particle that doesn't sink or rise. i'm probably just being stupid but i can't get it quite right yet. close though

Share this post


Link to post
Share on other sites

Thank you very much everyone, I will have a look when I get home from work.
 

23 minutes ago, bad benson said:

i'm working on some ground fog atm. will drop something in here later. it's mind blowingly hard to make a lingering particle that doesn't sink or rise. i'm probably just being stupid but i can't get it quite right yet. close though

I ran a ground fog script in my last Black Division OP (Video below - you will see it around the 57 second mark of the video) I used the script from here

https://www.youtube.com/watch?v=zMGg0AmMvdA

Share this post


Link to post
Share on other sites

441B19337B88E6EA38F79AC5330035596D1D4823

 

this is just a quick test. trying to make it look a bit more dynamic than the scripts i've seen. more like dark alleyway manhole steam.

  • Like 11

Share this post


Link to post
Share on other sites
7 hours ago, pierremgi said:

That's Arma or Polly pocket cartoon?

 

Why so narrow minded?

What's making arma great is the sheer endless variety of scenarios/mods/playstyles.

 

Wanna play mil sim and knock your trackIR off your hat while saluting your commanding officer? No problem.

Enjoy driving around? Play a cab driver on altis life.

Do you miss call of duty/battlefield? Join any 20+ players wasteland/domination/koth server.


 

Spoiler

 

Also, what's wrong with polly pocket?

:yay:

 

 

Cheers

  • Like 6
  • Haha 1

Share this post


Link to post
Share on other sites

Any chance you guys can explain exactly where you placed the below parameters?
 

12 hours ago, bad benson said:

_light = "#lightpoint" createVehicleLocal getpos player;
_light setLightBrightness 1.0;
_light setLightAmbient [1, 0, 1];
_light setLightColor [1, 0, 1];
_light setLightDayLight true;
_light setLightUseFlare false;
_light setLightFlareSize 5;
_light setLightFlareMaxDistance 500;
_light setLightAttenuation [2,4,4,0,9,10];

as you can see the flare is disabled. that is the actual light point visualised. if you want that you can enable it and play with the related parameters. i tried to add all related commands that i could find (might've missed some...check wiki for cross links).

 

you could also try adding some particles to make it more of a haze than just basically coloring the surroundings.

 

EDIT: for tweaking i would suggest making the _light variable global (like TPM_light). then you can run everythign except for the first line over and over with some tweaks until you hit the sweet spot.

 

Share this post


Link to post
Share on other sites

@Harzach @bad benson They look awesome, that is what I am going for.  As I asked above, if you could explain to me as a complete noob how you did that I would be very happy.  Or if you have a link to the mission pbo that you quickly made, that would also be helpful so that I can go through it and fully understand.

Share this post


Link to post
Share on other sites

The X-Files is my favorite show of all time!

  • Like 1

Share this post


Link to post
Share on other sites
3 hours ago, Grumpy Old Man said:

Wanna play mil sim and knock your trackIR off your hat while saluting your commanding officer? No problem.

 

It's always good to start the day with a belly laugh!

 

3 hours ago, TPM_Aus said:

Any chance you guys can explain exactly where you placed the below parameters?

 

I was just using the debug console, but you could place it almost anywhere depending on how you want to use it. Also, you may want to use createVehicle instead of createVehicleLocal, again depending on the situation. Abstractions are great for explaining basic concepts/functionality, but this is where we need to get specific. How exactly do you want to implement this?

  • Like 1

Share this post


Link to post
Share on other sites

@TPM_Aus I'd usually call the lights from a trigger.

Copy the code into a sqf (I use ARMA Edit), copy it to the mission folder, then call it  _name execVM "lights.sqf";  in the on activation field of the trigger..

 

Share this post


Link to post
Share on other sites
4 hours ago, Grumpy Old Man said:

 

Why so narrow minded?

What's making arma great is the sheer endless variety of scenarios/mods/playstyles.

 

Wanna play mil sim and knock your trackIR off your hat while saluting your commanding officer? No problem.

Enjoy driving around? Play a cab driver on altis life.

Do you miss call of duty/battlefield? Join any 20+ players wasteland/domination/koth server.


 

  Reveal hidden contents

 

Also, what's wrong with polly pocket?

:yay:

 

 

Cheers

Narrow minded yourself if you're not able to recognize humour. I have no problem with mods, Altis life, zombies. Just remarked with humour, that these colors would please my daughter.

 

Spoiler

 

  • Like 3

Share this post


Link to post
Share on other sites

@Harzach i could be wrong here but i think light points are always local objects like particle emitters no matter what command you use to create them. atleast that is how i remember it. but it was a while back i used this stuff.

 

@TPM_Aus you should be way more specific about what exactly you need, if you are looking for concrete examples. the fog in that picture for example is location based and not around the player. it would need a rewrite, if it would be a constant effect that takes movement into account. but i'm assuming you already have the fog you need.

 

as for the light. i simply put red and blue to 100% in the RGB array since your example picture had a lot of purple in it. one way to have the light exist for everyone would be putting that exact code in a trigger with its condition set to true (literally type the word true into the condition field) or the init line of a dummy object like an invis helipad. nothing special required.

 

i'd be interested what you are trying to depict though (unless you need to keep it spoiler free :f:). because you can do some crazy stuff with post process screen effects, which you could increase moving into a certain area much like a geiger counter would work with audio. that would be a bit more trippy than lighting and stuff. or do it all at the same time. depends on what you need.

  • Like 3

Share this post


Link to post
Share on other sites

haha, I am glad your daughter would like it (this comment is not to strange in anyway, I am a dad myself).  Unsure if I will go with that colour, but the first picture I posted just gave the lighting affect I was after..

 

5 hours ago, pierremgi said:

Narrow minded yourself if you're not able to recognize humour. I have no problem with mods, Altis life, zombies. Just remarked with humour, that these colors would please my daughter.

 

  Reveal hidden contents

 

 

Share this post


Link to post
Share on other sites

Ok I will try and explain what I am doing and what I am trying to achieve.


As I mentioned earlier, I am working on events/missions for my gaming group that have a X Files/Special Forces feel.  Our group is called SORD (Special Operation Recon. Detachment), however our Event group is called SORD Black Division.  I will run these missions as a mini series, so like 2-4 mission per series.  So this means that there wont be hundreds of enemies, but rather strange enemies or anomalies that my group will come across.  I also want to to give more immersion then then what you normally see in Arma, so lighting, background music, sounds, visual affects etc.

Here is an example of 2 enemies/anomalies that my group have come across so far.

The Twins:   As you will be able to see in this video, this OP is based in the Cambodian Jungle with a light mist/fog and if you listen you can hear birds chirping in the background and their are fogs croaking in different areas etc.


The Meat Grinder:


So why am I asking the question about Ambient Light? What I am trying to achieve for my next mini series is kinda like an enchanted forest or haunted forest, where certain locations (unsure on size) are lit with a particular colour (unsure of the colour yet) and scary forest sounds, visuals etc.  Along with with floating lights that may or may not move in the distance or around the player.  I might even run a mission that has the Avatar forest feel with aliens.

I want the lighting to be visible by everyone at the same time, so if I simply make a trigger with  _name execVM "lights.sqf" (as section mentioned) in the activation field and have:
 

 

22 hours ago, bad benson said:

_light = "#lightpoint" createVehicleLocal getpos player;
_light setLightBrightness 1.0;
_light setLightAmbient [1, 0, 1];
_light setLightColor [1, 0, 1];
_light setLightDayLight true;
_light setLightUseFlare false;
_light setLightFlareSize 5;
_light setLightFlareMaxDistance 500;
_light setLightAttenuation [2,4,4,0,9,10];

 


in the lights.sqf along with true in the conditions field, will this work?
And if I didnt want to use a trigger, but have the lighting there all the time, would I simple place the above code into a dummy object as Bad benson suggested?

I hope this kinda explains what I am trying to achieve.  Thanks again everyone for taking the time to help me out, greatly appreciate it.

Peace

TPM
 

  • Like 4

Share this post


Link to post
Share on other sites

I booted up a mission I'd used the ambient light stuff in using an objects init box..

This was just for a single low output white light.

 

Light.sqf

_point = _this select 0;

_light1 = "#lightpoint" createVehicle position _point;
_light1 setLightBrightness 0.2;
_light1 setLightAmbient[0.5, 0.5, 0.5];
_light1 setLightColor[0.5, 0.5, 0.5];
_light1 lightAttachObject [_point, [0,0,0]]; 

I used a lightbulb object and in the objects init box, I called the script with null = [this] execVM "light.sqf";

 

Worked in SP not sure on MP though.

 

 

Share this post


Link to post
Share on other sites
2 hours ago, TPM_Aus said:

will this work


Yes, but it will only be one lightpoint. If you want a larger area with a more complex color palette (like in your reference pic and my test shots) you'll need to spawn many lightpoints with different RGB values. I can picture an example script in my head, but I just got hit with a mountain of work as I started typing this, so I probably won't be able to work up a good example for a few days. I'm sure someone else will have helped you by then, though.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×