I heard a couple of years ago that only certain types of lens caused flare to appear, something related with the material and/or quality of the lens. Is this true? Which material/quality caused flare? Thanks in advance.
Uncontrolled light causes lens flare. This can be light that's reflected from internal lens surfaces, or that's scattered by imperfections in the glass.
If the flare is badly controlled, it will produce the dramatic lens flare artifacts which you've probably seen. More controlled flare will be diffused over the entire image, reducing contrast but not producing other visible artifacts.
Flare can be controlled in several different ways. A simple way is just to prevent non-image light from hitting the front element in the first place. Avoid putting bright lights (the sun, for example) directly in the frame, and prevent out-of-frame light from shining onto the lens. This is what a lens hood does — or, simply shading with your hand, in a pinch.
If there is a bright light source (the sun, for example again) that you want to have in your photograph, that's not going to help. That's a reason wide angle lenses are more susceptible to flare (and for the same reason, a lens hood can't be as useful, as a deep one would block the actual image).
On almost all modern lenses, special optical coatings are applied to the lens to help control the stray light. These are made of various metallic and mineral compounds which alter the way the lens transmits light, and they're specially chosen to reduce the unwanted scattering of light. More expensive lenses use more expensive coatings, and more expensive optical elements which have less of a problem in the first place. Lenses also have internal baffles designed to reduce bouncing light.
Cheap filters often have cheap coatings, and since they're often more exposed than the front element was, they're more prone to catching stray light. That's why adding a UV filter for lens protection can reduce image quality.
So, to answer your question directly: yes, it's true. Flare is caused by stray light, not by lens materials directly, but cheap lens materials can make it worse and high-quality ones can mitigate it. Even with a cheap lens, you can make things much better simply by using a lens hood or standing in the shade, and keeping the sun out of the frame.
Lens flare is caused by a bright light source (such as the sun) shining into the lens (whether in the image or not) that has its light reflected and scattered inside the lens causing a wash out or a flare artifact. All lenses will be subject to this to a greater or lesser degree, but this most commonly manifests with wider angles.
There are mitigation steps taken with the lenses themselves and these include:
- Special lens coatings.
- Lens hoods. Always use one designed for your lens and, well, use it!
- Gobos (go betweens that block the light at the side of the lens).
In any case, higher quality lenses often have better coatings and more defense against lens flare. Also, it's sometimes desirable and can be used for artistic purposes, so it's not always a bad thing if you do it consciously.
Basically, it's reflections.
Inside a lens, you want the light to travel from the front of the front element, to the back of the rear element, without bouncing off any surfaces.
There are two main surfaces, however, that light may bounce off.
The glass itself. Glass is reflective, obviously. Glass is shiny. So some light bounces off the glass elements instead of going through. Unfortunately if it bounces back again, toward the film or sensor, that reflection will become "flare".
For decades now most proper camera lenses have had special coatings to reduce the amount of light that bounces off the lens elements, ensuring most of it just travels straight through. Lens coatings work because the thickness of the coating is half the wavelength of the light hitting it, so it creates two reflections half a wavelength apart that cancel each other out - due to the interesting wave-like properties of light this pretty much prevents it from reflecting. Unfortunately a coating only prevents reflections of one single wavelength of light, and light is made up of many wavelengths. So lens elements that use two or three layers of coating, called "multi-coated", can prevent reflections of a number of colours at once. When you look at a multicoated lens you'll see some dulled colours - maybe blue-green. Those colours are just the wavelengths that the coating cannot stop reflecting. There's no such thing as perfect coatings but they work very well.
When light bounces off lens elements you get the characteristic ghosting of points of light, particularly the sun. To effectively reduce this type of flare, all surfaces between lens elements and air must be multi-coated. This is typical in modern lenses except for really low budget ones. When pointing your lens directly at the sun then you're likely to have a bit of flare regardless, because no coating is perfect.
Note that lens filters that you stick in front of the lens will greatly increase your chance of flare, especially - but not only - if the filter is not multicoated, simply because it adds two more surfaces that can cause reflections back into the lens (glass can create a reflection as light enters and exits). This is also true of filters or teleconverter glass that you drop in behind your lens - it'll add to flare.
Surfaces inside the lens assembly. To minimise haze, the surfaces inside a lens assembly should not only be as black as possible, but should be matte textured. Reflections off these surfaces reduce in an overall haze or reduction in contrast.
A decent lens design will ensure these surfaces are black and non-reflective anyway, but as with anything there is no such thing as perfect.
Also, if you are using, for example, lens adapters, teleconverters, bellows or other things in between your lens and the camera, the inside coatings of these can add flare depending on their design.
Whether or not your lens' flare is noticeable depends not only on the lens assembly, coatings and filters, but also on the subject material you are shooting. Where you are shooting near bright lights or direct sun, you're more likely to notice the flare. This is particularly true if you point your camera towards light sources or the sun - even if they're not actually in the frame (you can use a hood to help reduce that particular problem). If the lighting around you is more soft and diffused without direct sun, then you're less likely to see any noticeable flare simply because it won't be well defined compared to the rest of the image.