well I always thought this is impossible but apparently a script that generates lens flares is possible, here is a request I made to M!M, he can't work on this but maybe someone else wants to give this a try?
Nighteyes:
Hi there
you guessed it, I have another script request, this time its LENS FLARES
I don't know if its even possible, but can a script create a lens flare at a specific point, say a ships engine, it will need to fade and grow in size according to the ships speed, and also act as a lens flare, meaning rendering on top of everything unless something is obscuring it(like how suns work)
let me know what you think, this can also be great for weapon impacts as well as capships explosions
M!M:
Hello Nighteyes,
Theoretically it would be possible but it would be very ineffective as you have to do a ray check for every ship and every ship engine meaning that you would need to do n * m (n: number of objects, m: number of thrusters) which will decrease FPS to an unplayable point. A better way would be to determine the position of the thruster on the screen, read the z-Value and compare it to the z-Value of the point. That way you have pixel-exact occlusion checking without the overhead of a ray check for every object out there and the flares would render on top of the other ships because you would do this after rendering all other objects. A problem would be that you could only check a thruster which is on the screen so a flare would just disappear when the center of the thruster isn't on the screen anymore.
Sadly, I won't be able to work on this as I'm pretty occupied with RL currently and I rarely find enough time to do something for FreeSpace.
Regards,
m!m
*to my knowledge this is how lens flares work no? only show up when on screen? I'm not sure if its a real problem...