Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Dragon on July 27, 2011, 06:53:05 am

Title: Feature Request: "Flak" without strange effects
Post by: Dragon on July 27, 2011, 06:53:05 am
I've recently discovered another oddity in flak rendering, namely the way muzzle flashes work. For some reason, muzzleflash doesn't always appears, on my test (3 barrel MP turret) I seen it every 3 or 4 shots. With retail, long flash it's not very visible, but with much shorter flash I'm using, this is noticable and doesn't look good. It also happened on fighter mounted flaks.
First, I wanted to report it as a bug, but later, I thought that it's most likely another thing "flak" flag did (and was always supposed to), and thus, retail behavior.
Because of that, I'd like to request a new version of "flak" flag, which would neither disable projectile rendering nor make muzzleflash act strangely, but still make use of proximity detonator and "spray and pray" targeting method. Is that possible to do?
Title: Re: Feature Request: "Flak" without strange effects
Post by: Spoon on July 27, 2011, 08:39:49 am
More importantly, is anyone going to use this for anything and should any of the coders waste their time on this?
Title: Re: Feature Request: "Flak" without strange effects
Post by: Commander Zane on July 27, 2011, 08:52:46 am
I tried looking on Retail FS2, but it's pretty hard to notice if there's a flak muzzle flash or not since the flak just explodes in your face in Retail, but as far as I can see there isn't any muzzle flash on Retail flak.

Edit: If I use FSOpen without MVPs there's no muzzle flash on fighters but a muzzle flash from the Hecate after every four - six shots.
I guess I have to make a mission for Retail with a Hecate and check again Mission tested.

Edit 2: Flak acts the same way on Retail.
Title: Re: Feature Request: "Flak" without strange effects
Post by: Dragon on July 27, 2011, 09:25:00 am
More importantly, is anyone going to use this for anything and should any of the coders waste their time on this?
It could allow future mediavps to have much more interesting flak effects, as well as any mod that would like to have custom flak cannons with visible main bitmap.
Title: Re: Feature Request: "Flak" without strange effects
Post by: Iss Mneur on July 27, 2011, 10:49:27 am
Without looking at the code and assuming I am understanding what you are getting at (screen caps or a video would be very helpful) I would say the current behaviour is probably intended, likely for "performance" reasons.  The same reason that not every beam and laser gets a light.
Title: Re: Feature Request: "Flak" without strange effects
Post by: Dragon on July 28, 2011, 10:04:44 am
I thought that beam and laser lights work like they do, is because OpenGL doesn't allow more than 8 lights.
Performance drop due to muzzleflashes could have been significant on retail, but nowdays, it's much less of a problem and the effect looks ugly.
I'll post the screenshot if I'll catch it, the flashes I use are quite short.
Title: Re: Feature Request: "Flak" without strange effects
Post by: Iss Mneur on July 28, 2011, 11:21:38 am
I thought that beam and laser lights work like they do, is because OpenGL doesn't allow more than 8 lights.
Performance drop due to muzzleflashes could have been significant on retail, but nowdays, it's much less of a problem and the effect looks ugly.
I'll post the screenshot if I'll catch it, the flashes I use are quite short.

Even though OpenGL only allows 8 lights, FSO still has to track all lights so that it can pick the 8 "best" lights and this tracking still has performance problems which is why there are only (IIRC) about 200 lights actually tracked.

Every animation still has a performance cost (and especially a memory cost) which is probably most apparent for video cards that have low memory and/or made by Intel.

Title: Re: Feature Request: "Flak" without strange effects
Post by: Dragon on July 28, 2011, 11:30:59 am
Note, I get no performance issues with the same animation, downscaled via table, playing on 6 other rapid fire AA guns (think ZU-23-2).
There are 4 flak guns on the ship in question, quite slow firing compared to FS ones (think 8.8cm FlaK), so I'd say performance is not a concern with them.