UE3 - UT3 ...Lens Flare (Occlusion?)

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

sneh

-
Apr 11, 2008
225
0
0
www.grozmo.com
Lens Flare Occlusion... (Solved)

How do I prevent Lens Flares from showing through meshes?
Is this a setting in the LensFlare, or the Material, or something to do with the meshes? (or.. are lens flares completely useless!?)

Pic: Lensflare blatantly showing through a mesh. They do disappear behind meshes, but it seems random when it chooses to do so (mostly they show through)
lensflareocc.jpg
 
Last edited:

sneh

-
Apr 11, 2008
225
0
0
www.grozmo.com
Success!

Ok.. figured it out :D

Since there is so little information about lens flares, I'm going to write a tutorial (because now after trying to figure this out for so long, I'm pretty sure I know everything!!)
 

sneh

-
Apr 11, 2008
225
0
0
www.grozmo.com
Any quick hint on how you fixed this? I have been having the same issues. I am aware of the Lensflare occlusion material expression but it doesnt seem to work all too well to my experience.

Yes - I finally realized that it was the 'bounds' settings.

The values determine how large the center of the flare is, and determine when it is behind something (which controls the occlusion node on/off in the material).

Since I was always starting with the stock sun flare, the values were -512 and 512 (which is huge) so it basically never got occluded.

So - unless you designate a mesh, ensure bUseFixedRelativeBoundingBox = True
And generally, start with small numbers (eg between -4 to 4 and -16 to 16)
If your lensflare is inside a mesh (eg Lantern), you might need to bump the numbers up a little so it shows through for example.

I'm getting a lot of questions from many people, and there's virtually no information out there, so I'm going to make a Lensflare tutorial from A-Z and explain everything properly :)