[Music] all right uh hello everyone welcome to my talk lesons and lens Lis uh apologies for the brief technical difficulties there but before we start just a brief introduction so uh my name is anoop I'm a real-time VFX artist at fville and I've been a hobbyist photographer filmmaker and animator for over 20 years I'm also a lens flare Enthusiast so before we get right into it uh I just wanted to give a brief overview of what this presentation is all about there's a lot to talk about and limited time so I'll be focusing more on discussing the key behaviors of different lens flares and how to create your own than giving a technical presentation on creating lens flares in any specific game engine as with many things in game development I found that there isn't
really a one siiz fits-all solution for lens flares and game enges so in this talk I'm going to be focusing more on explaining the key behaviors of lens flares and my process for creating them the reason this is relevant is essentially because as Hardware improves and visual Fidelity increases lens flares are becoming an increasingly common task for real-time VFX artists whereas they may have previously been considered more of a technical art task so today I'll begin by by uh talking about the interaction between light and the camera lens before discussing some of the differences between spherical and anamorphic lenses using reference footage of shot after that I'll discuss some general rules and rules of thumb to help you all through your own lens flares supplemented by more footage and then finally I'll show you my process for making a custom lens flare in After Effects and uh we'll open it up to a quick Q&A after that if time
permits all right so uh let's begin with a simplification of how light interacts with the camera in a modern camera lens there is generally a bunch of Glass Lens elements that make up what we refer to as the lens so before light can reach the image sensor it's uh reflected and refracted as it passes through these lens elements when I'm creating a lens flare I like to think about the Journey of light from the front element to the rear element and how that might affect the shapes colors and behaviors of my flare I also look at reference footage and think about which lens elements correspond to which flare elements it's worth noting uh lens manufacturers usually apply an anti-reflective coating to these that tends to influence the color of flare elements as well as the overall intensity and uh certain other factors but we'll get into that later
to help create lens flares in any instance here's a list of important Concepts and rules I've compiled we'll be discussing each of these in depth but I wanted to run them up on the screen here first so that we can reference this slide later knowing these Concepts as well as the context in which a flare will exist can make it a lot easier to implement a visually compelling lens flare that truly complements the overall composition of the frame while also respecting the physical nature of a real camera so first on our list the two major types of lenses we typically use are spherical and anamorphic lenses both produce uh vastly different lens flares image artifacts and out of focus bokeh effects so understanding the difference between these is important when creating a flare of your own so let's start with the far more common spherical lens when shooting with a spherical lens we generally expect to see radial Rays around the light source where the number of rays will usually
correspond to the number of diaphragm blades for those who may not know aperture blades or diaphragm blades are the swiveling uh mechanical blades that control the size of the aperture which essentially dictates how much light is led into the image sensor and there's a stock image of what those look like with spherical lenses we also expect to see circular or polygonal bokeh and ghosts which we haven't talked about just yet but we'll be getting into that soon similarly we we see the the number of sides of polygonal bokeh correspond to the number of apperture blades and while it's perhaps not the most relevant to us in our real-time VFX context it is important to note that we usually expect a 16x9 aspect ratio when shooting with a spherical lens which is great because 16x9 is the most typical aspect ratio for our computer monitors TVs smartphones and other displays
so generally uh the framing and aspect ratio you see when shooting with a spherical lens is what you ultimately get in the final image before any post or editing cropping uh work has been done and so here's some reference footage I shot on a spherical lens uh what you can see is that I have 14 apture blades here so we get 14 radial Rays coming off the light source and moving right along uh to my favorite anamorphic lenses so in general anamorphic lenses tend to make things look and feel a lot more cinematic they can also create a more painterly look than spherical lenses which is due in part to their unique bokeh or out of focus effects uh as well as their Distortion with an anamorphic lens we tend to get horizontal streaks as our primary flare element and and depending
on the lens radial Rays may also be present in an anamorphic flare as we'll see here in a moment they tend to have slightly different visuals and behaviors than the radial rays that we'd see or associate with spherical lenses But A good rule of thumb is that they have more asymmetry anamorphic lenses also produce vertically stretched oval shaped boocha for anything that's out of focus however the ghost that we see in anamorphic flares can be vertically or horizontally stretched oval shapes and another Quirk of anamorphic lenses is that they produce an aspect ratio of 2.39 by1 which is standardized as 21 by9 for the digital format there's a lot to talk about in this regard so I'm going to keep it brief but essentially when we're shooting with an anamorphic lens we're actually shooting on a square so the original footage needs to be deseed
uh in an editing or compositing software so that we ultimately get that 21 by9 widescreen aspect ratio with the signature cinematic black bars on the top and bottom of the screen and here's some reference footage I shot on my anamorphic lens you can see we get that primary our primary element is uh those horizontal streaks and uh we get boxy shape shapes especially when we're shooting into the sun it's very common with anamorphic lenses and just to contrast that here's uh some more reference of my phone's flashlight so you can see the flare elements are quite different and then here's what that original footage would have looked like before the D squeeze so we've got a completely Square aspect ratio and everything is sort of uh squashed
horizontally all right so we've already touched on the radial rays and horizontal streaks associated with spherical and anamorphic lenses respectively but perhaps the most common flare element is glare generally speaking glare appears as a large soft element around the light source that reduces the contrast of the image in the areas that it occupies and next up let's talk about ghosts so ghosts are boka likee elements that rotate around the center of the screen appearing stuck to a line that is an invisible line but one that's drawn between the center of the screen and the light source ghosts often appear as copies or inverted copies of the light source and tend to show the light source shape although that's another sort of rule of
thumb and next up we have Halos which tend to be pretty weird these are usually circular or elliptical shaped elements that radially warp the light source Halos tend to be especially visible when light is when the light source is outside the screen edges but again that depends on the lens it's also worth noting that Halos can manifest in many different ways but something they usually have in common is chromatic aeration and finally my absolute favorite element uh lens dirt so if we can imagine a car windshield or something similar that accumulates dirt and grime from being exposed to the outdoors lens dirt is very similar in concept essentially these are small bits of dust and dirt uh that may be caked onto the lens or may just be sitting on top of the front element
that appears out of focus focus shapes uh when the front element is illuminated usually uh front element reflection is visible simultaneously with lens dirt but as with everything else we've covered it always depends on the lens being used and every lens is different and moving right along to wide angle versus telephoto uh for our focal length so so whenever I'm explaining the difference between these two uh I use the example of zooming in and zooming out on a digital camera so shooting with a wide angle lens we might expect to see lots of smaller uh ghosts and other flare elements whereas when shooting with a telephoto lens we generally expect to see fewer larger ghosts and other flare elements this was perhaps not the greatest uh reference footage that we're about to see but
you can maybe see when we zoom in uh we generally see fewer yet larger flare elements so moving right along uh the main difference between a glancing and direct light source in this context is really just the subtlety of the flare a light source that's at a glancing angle to the lens will usually result in a more subtle flare that's barely visible if at all whereas a light source that's shining directly into the lens will produce a much clearer and sharper flare with more visible elements I'm not going to spend too much time on this next one but I thought it was worth uh mentioning just because it's something that I find very interesting um uh light source that's outside the screen edges will generally produce a really unique unque element uh
and there's no official name for this that i' I've been able to find but I generally refer to it as an outside edge flare so uh light source that's right outside the screen edges but still shining directly into the lens uh will produce this strange element and we can think of this sort of like an anticipatory flare just before the light source comes on screen and so here's some reference of uh a light source that's at a glancing angle and then just more reference so when it comes to the inclusion of the light source ghosts tend to have the most erratic Behavior their internal shape and color may
change and they may olude in a staggered manner as the light source is occluded as far as the other elements are concerned they generally tend to become increasingly more subtle or Fade Out entirely and so we'll see that here as I swing over to the left and back again you can see those ghosts just sort of it's not a linear fashion they're just they fade out uh in a strange order unpredictable and moving right along uh something that I consider one of the most important Concepts depth of field or blur so essentially depending on whether or not the light source is in Focus flare elements will blur accordingly with the light source that is in Focus
we'd expect to see sharper clearer flare elements than an outof focus light source it's also worth noting that flare elements might change their shape and size while racking focus and similarly anamorphic flare elements tend to squash and stretch so as I rack Focus here we'll see that these flare elements enlarge and become a lot softer and then everything goes back to being somewhat squashed or stretched depending on which way I'm racking Focus
and finally chromatic aberration to quote Hannah Montana nobody's perfect and that includes lenses so chromatic aberration is probably familiar to many of us artists especially in the post spiderverse era but for those who may not know chromatic aberration or color fringing is the failure of lens to converge or Focus all colors to the same point this results in color fringing as we get closer to the edges of the image so flare elements uh like ghosts and Halos can be affected by this phenomenon but again it's worth noting that all lenses are different and these flare elements can manifest themselves very differently depending on the lens and moving right along to light source color and the lens element coating which we briefly touched on but uh just some notes that I'm going
to bring up on the screen certain flare elements there's no good rule of thumb here it's you just got to look at reference but some flare elements will pick up uh the light source color whereas some flare elements are going to pick up the color that's sort of uh given from that flare that uh lens element coating and this is something that lens manufacturers work really hard to ensure that flers aren't too intense or uh intrusive or overwhelming and so here's some reference I shot of uh a prism and you can see that the flare elements that we're getting from that white light source from my phone uh were not colored at all uh or not picking up any uh other
color other than what the the lens elements were coated in but when I run that through the prism it's picking up a lot of that color and now it's time to put it all together so to help conceptualize how we might create a lens flare in a game engine I'll now demonstrate my process for creating a custom lens flare and after effects before we begin I'm going to show a list of effects and expressions that I'm using and uh as I mentioned previously I'll be doing my best to keep this a little bit less Technical and more artistic but for the technically minded folks out there I will say that the most important thing to know when creating a lens flare in a game engine is knowing the screen space position of the light source you can use this as well as the distance between the light source and the center of the screen to dve the majority of your flare elements behaviors
so before we get into it I've got a couple Expressions that I want to run up on the screen here uh this first one is uh offsetting the exposition of your element opposite to whichever way the the light source is moving so it'll maintain its y position but it'll move in like Negative X and then similarly I have a scale X by distance and I have a couple of these so I also have a scale opacity by distance and really it's just this kind of thing with any variation of or anything you could potentially want to drive any Behavior it's always going to be uh driven by the distance between the center of the screen and the light source in screen space
and I didn't really use this one but it's worth running up here uh rotate uh flare element based on the light source's position all right so here's how I start the setup and create the primary streak first I create a new composition and I start making my light source shape and if I were doing this as a postprocess effect or to composite over footage I'd actually do this a little bit differently as we'll see here in a moment but I'd actually start by applying a threshold to the scene and isolating my highlights that way and you'll see an example of that momentarily right here and so that's what I'm talking about deriving your light source shape from whatever you have the the highlights in the scene and then I go go ahead and I apply some effects and just start roughing in
my shape once I get something that's working I tend to duplicate it and just keep building out the shape that way and I always mask out my edges especially when working in After Effects cool so glare this is generally uh something I consider to be one of the easier elements it follows the position of the light source and it's you can duplicate your light source shape uh scale it up and blur it out a bunch and that should get you something pretty good and then of course mask out the edges
all right so for the radial Rays there's a number of different ways to do this but uh in this instance what I ended up doing is I scaled my light source shape uh horizontally I moved it up and I applied a polar coordinates which we'll see in a moment here I also apply a wave warp to get uh some shape breakup and sort of like a star kind of shape and I do some adjustment and then we'll see the polar coordinates right here and then after that point you can apply a radial fast blur or something to radially blur those uh bits out you can also pinch the center using the Bulge effect whatever floats your boat
and it's worth noting that I always use the add blend mode when uh compositing these flare elements together in After Effects although if I were compositing this over footage I'd use the screen blending mode however if I compositing this in a game engine uh I'd probably want to use an additive material and here you can see me uh rough roughing in some ghosts so the key here is to tie the Anchor Point to the position which gets that ghost element rotating around the center of the screen um and I also apply a radial fast blur to this and set the mode to darkest which gets some of that occlusion uh Behavior so similar to ghosts we have Street ghosts which are the animal morphic uh streak
elements and the way I set these up is uh a little bit different but this is where that expression uh from the start comes in handy and so you can see I'm getting the basic behavior and once I get something that works I just duplicate it and I just keep building it out that way cool so moving right along to our chromatic elements I generally uh do this by creating a rainbow blending it together
and once I get something that's working I just sort of duplicate and adjust as needed and I just copy paste those expressions from earlier and get the same kind of look you can also apply VR glow and certain other effects to sort of get whatever kind of look you want and I do believe we're out of time here unfortunately so thank you all for watching listening and attending I'm just going to uh get this process time lapse up and so here's the whole roughly hour and a half process condensed into like a minute and you can see I made my
radial Ray slightly differently here and there you have it right so thank you guys so much [Music]
Auto-generated captions from YouTube — names and numbers may be misheard.
Distilling the key insights…
Game Developers Conference · 2026
Game Developers Conference · 2026
Deconstructor of Fun · 2026
Comments