Tiago Gusmao and I were talking on IRC about doing light halos and the problem of having them intersect with body parts and show up even when the light is not in the line of sight. Look at the right landing light (a flash animation) and the tail light (a billboard animation): http://jrbabcock.home.comcast.net/flightgear/fgfs-screen-002.jpg One looks wrong, and the other should not be there. Out idea is to add another animation that works like this to solve these problems:
you give it: a) some point to be the light source b) the name of some object that you will be using as the halo And it does this: a) checks for line of sight to the point of origin and selects out the object if there is none b) causes the object to be rendered without z-buffer (an alternative solution is to translate the object along the line of sight by some user defined distance, and scale it so that it retains its angular size) Wins: You get a proper looking halo when you should, and not when you shouldn't Losses: Possibly slow to calculate LOS. Unsolved problems: - Transparent objects can't be considered when calculating line of site. - What do halos really look like? Are they created in the lens of the eye? If so rendering them without z-buffering will do the trick. If on the other hand they are created by forward scattering as they pass through the atmosphere, then nearby objects should obscure them, and objects halfway between the light and the point of view should partially obscure them. We will have to experiment to see what looks right. A quick experiment here at my desk looking at a light across the street shows that if I partially obscure the light with a card it obscures the outer parts of the halo, but the inner bright portion of the halo actually washes out a small bit of the edge of the card. Obscuring it with a tree halfway to the light makes the inner washed out part larger, but still obscures some of the outer halo, and trying to obscure the light with an object near it leaves a completely circular halo and just makes the light get dimmer and blink out as it is actually obscured. It seems to be pretty tricky but there may be a good looking compromise. Some optics research may be in order here. So, what does everyone think? Good idea? Good approach? Suggestions and graphics coders welcome. Josh ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel