PDA

View Full Version : Lights performance



DMarkwick
Jun 28 2009, 19:50
I'm considering an implementation for an addon I'm messing with that adds lights to many hundreds of locations. The thing is, the VAST majority of the lights will be set to brightness = 0 until a distance proximity is reached. So, out of the many hundreds of lights, maybe one or two at a time will be lit, although it could be as many as ten or twenty I guess.

The question is: do lights with a brightness of 0 have the same performance impact as lights > 0? Are lights processed as lights regardless of brightness?

Maddmatt
Jun 29 2009, 00:02
I think the best way to test that is to just spawn hundreds of them right in front of you.
I notice the carrier has a large number of lights on it, much larger than what ArmA could handle.

PhunkMaZ
Jun 29 2009, 18:58
The lights on the LHD could be fake lights. Maybe just some textured polygon points with a glowing material that is not affected by the daylight/environment-light. The lights itself doesn't illuminate surrounding objects.

To answer your question: I think it doesn't matters what brightness the lights have. They are there (as shader programm).

DMarkwick
Jun 30 2009, 21:26
I think the best way to test that is to just spawn hundreds of them right in front of you.
I notice the carrier has a large number of lights on it, much larger than what ArmA could handle.

I might do that, however it might now be academic :)

---------- Post added at 10:26 PM ---------- Previous post was at 10:25 PM ----------


The lights on the LHD could be fake lights. Maybe just some textured polygon points with a glowing material that is not affected by the daylight/environment-light. The lights itself doesn't illuminate surrounding objects.

To answer your question: I think it doesn't matters what brightness the lights have. They are there (as shader programm).

My tests show that you're probably right. Negative values are processed, so zero values most likely are too. I'd be interested in hearing more about glowing materials.

PhunkMaZ
Jul 1 2009, 00:33
The last time i did some modeling/texturing stuff ist back to ofp so i can't exactly describe the way you could do such a material. The idea of a fake light is to use the ambient channel of a rvmat. I'm sure an ambient color/texture is also used for taillights on vehicles or the nav lights on planes. The ambient color behaves like the hud in planes. They are always glow green, day and night. To show you the difference i did a small figure. The left sphere has a simple material with RGB 255 0 0 in the color channel, the right sphere has the same color but this time in the ambient channel.

http://img198.imageshack.us/img198/5729/colorvsambientcolor.jpg

I hope you can follow me, my english isn't the best :D