PDA

View Full Version : Lens Flares (Occlusion?)



sneh
02-28-2009, 06:00 PM
FIXED

Ok, I realized it will take some time to write an in-depth proper tutorial that covers and explains everything properly.. so for now, here is a really quick run-through from A-Z :


Creating a custom lens flare, in your map
(Note: starting a new lens flare crashes the editor!)

Open the stock lens flare package, open a lens flare in the lens flare editor and choose "save package" from it's menu.
Choose a name for the package. (eg "sneh_lensflares.upk")
From the new package, with your map open, duplicate a lens flare and a material to your map.

Open the lens flare from your map, and under "SOURCE" expand "Source Element" and in "LFMaterials" replace the material with the one in your map.
(You can duplicate and replace the material under "REFLECTIONS" too - but using the stock materials is fine, unless you want to customize them)

Under "Bounds", ensure bUseFixedRelativeBoundingBox = True
(Unless you designate a Mesh, this is used to determine the size of the lensflare for occlusion purposes.)
Generally, start with a small number (eg between -4 to 4 and -16 to 16)
If your lensflare is inside a mesh, you might need to bump the numbers up a little so it shows through.

Other basic settings are Size, and Color.

Open the material. Since you duplicated a stock material, it should already be set up correctly to work.
Note the LensFlareOcclusion, LensFlareIntensity, and LensFlareRadialDistance nodes. These are effected by settings in the lens flare. (for example, without the LensFlareOcclusion node it would never disappear behind objects - and the LensFlareOcclusion node value is determined by settings in the lens flare)

You might start with just replacing the textures in the material, and you can duplicate it to make different ones.

PrecRoy
02-28-2009, 08:48 PM
you know, I was wanting to use some lensflares, but haven't gotten there yet. All I know is that I believe DM-Sanctuary has 2 lensflares on top of the towers, and they are properly occluded throughout that map. Maybe look at some settings in there? I would hope it's something on the lensflare, and not on the meshes or bsp.

SynaGl0w
02-28-2009, 11:34 PM
Well from what I can tell it works pretty strange, the only way I have even been able to use lens flares is to duplicate epic ones into my map package. I then alter the texture or a couple other settings from that. If I try to make my own or modify the duplicated ones too much, it just crashes the editor.

I wish I knew though. Too bad the lens flare editor documentation seems to be rare...

sneh
03-01-2009, 01:25 AM
Success! :D

PrecRoy you got me thinking so I looked at the one in Sanctuary and compared mine line by line - it turned out to be the very last thing I looked at (Bounding Box)

Well, after a long time trying to get it to work and knowing what bounding box actually does now - I basically know everything about lens flares and how to make them behave exactly how I want them to :)

sneh
03-01-2009, 01:28 AM
Too bad the lens flare editor documentation seems to be rare...

Totally agree, there's just no information.. I had heaps of other problems at the start too such as the editor crashing etc..

I've decided I will write a tutorial (soon)

SynaGl0w
03-01-2009, 02:06 AM
I've decided I will write a tutorial (soon)

That would be good! :)


"Lens Flare Editor Guide - Part 1: Stuff you can click on without crashing the editor."

PrecRoy
03-01-2009, 03:52 PM
haha...good deal, sneh.

BTW, what does the "Bounding Box" thing do, or how does it work? I have not looked at it.

would love to see more info on lensflares. Just using the built-in ones (like from Sanctuary) are somewhat limiting. I liked the "corona" effect from lights in UT2004, but seems like lensflare is supposed to replace it. Now if we only knew how to use it, that would be swell.

do post back with more "How To..." info when you get a chance, either in this thread or start a new one.

sneh
03-03-2009, 07:29 AM
Ok, I realized it will take some time to write an in-depth proper tutorial that covers and explains everything properly.. so for now, here is a really quick run-through from A-Z :


Creating a custom lens flare, in your map
(Note: starting a new lens flare crashes the editor!)

Open the stock lens flare package, open a lens flare in the lens flare editor and choose "save package" from it's menu.
Choose a name for the package. (eg "sneh_lensflares.upk")
From the new package, with your map open, duplicate a lens flare and a material to your map.

Open the lens flare from your map, and under "SOURCE" expand "Source Element" and in "LFMaterials" replace the material with the one in your map.
(You can duplicate and replace the material under "REFLECTIONS" too - but using the stock materials is fine, unless you want to customize them)

Under "Bounds", ensure bUseFixedRelativeBoundingBox = True
(Unless you designate a Mesh, this is used to determine the size of the lensflare for occlusion purposes.)
Generally, start with a small number (eg between -4 to 4 and -16 to 16)
If your lensflare is inside a mesh, you might need to bump the numbers up a little so it shows through.

Other basic settings are Size, and Color.

Open the material. Since you duplicated a stock material, it should already be set up correctly to work.
Note the LensFlareOcclusion, LensFlareIntensity, and LensFlareRadialDistance nodes. These are effected by settings in the lens flare. (for example, without the LensFlareOcclusion node it would never disappear behind objects)

You might start with just replacing the textures in the material, and you can duplicate it to make different ones.

Kedhrin
03-07-2009, 01:59 AM
Sorry for bringing up an old thread (or sort of old)

sneh, i was wondering if you ran into a solution to the popping lens flares have when they appear. in Legendary, the lens flare scales its color up (from 0 to 1) when it becomes visible, rather than a snap 'turn on'. The snapping is rather fugly, so if you know a solution i'd love to hear it :)

sneh
03-07-2009, 11:25 PM
The snapping is rather fugly, so if you know a solution i'd love to hear it :)

Yes - you do it through the material.

I'm not home until tomorrow, so I'll get back to you soon..