Welcome, Guest.
Username: Password: Remember me

TOPIC: Better lens flares?

Better lens flares? 1 year 8 months ago #1

If god rays could have one texture and be triggered by depth for only the sun.
and Lenz flare with a definable texture ( hopefully triggered by more than just the center of the screen)

Right now they are all using the same sprite texture

Maybe if there was a color spectrum threshold for the trigger would help to limit the lenz flares to Magic effects and torches or other fire.

K ENB is a good example of what I'm talking about.

Just putting it out there. Great work!!!!! Thanks so much.
The administrator has disabled public write access.

Better lens flares? 1 year 8 months ago #2

  • Marty McFly
  • Marty McFly's Avatar
  • Offline
  • We've tried nothing and we're all out of ideas!
  • Posts: 610
  • Thank you received: 720
K ENB runs on enbseries that can access HDR input so actually fire and torches are 10+ times as bright as pure white. There is no color threshold, just these things are uber bright. A red with the color value 1000 0 0 (yes HDR goes beyond 255) is more than 3 times brighter than a pure FFFFFF white. ENB HDR space goes from 0 to 65535 and for example the sun in GTA IV has a brightness value around 40000 which is about 150 times brighter than anything that is possible in LDR space which is the input of Reshade.
Last Edit: 1 year 8 months ago by Marty McFly.
The administrator has disabled public write access.
The following user(s) said Thank You: Ganossa, BrandonHortman

Better lens flares? 1 year 8 months ago #3

  • Ganossa
  • Ganossa's Avatar
  • Offline
  • 최정장군
  • Posts: 790
  • Thank you received: 838
Its your code Marty, so thanks for dropping in :lol:
BrandonHortman wrote:
If god rays could have one texture and be triggered by depth for only the sun.
and Lenz flare with a definable texture ( hopefully triggered by more than just the center of the screen)

God rays triggered by depth, is already implemented.
I have an algorithm to identify other light sources than the center but currently center makes most sense. We first have to find a smooth transition from one source to another, otherwise the lenz flare will bounce all over the screen.
BrandonHortman wrote:
Right now they are all using the same sprite texture

I do not see a problem with that? If they do not bug out, both effects look pretty good with it. (especially those strong god rays)
BrandonHortman wrote:
Maybe if there was a color spectrum threshold for the trigger would help to limit the lenz flares to Magic effects and torches or other fire.

K ENB is a good example of what I'm talking about.

Just putting it out there. Great work!!!!! Thanks so much.
As Marty already said, it is very hard to detect brightness for us and there is always scenes in which you detect it wrong. The only thing you can filter for is either colored light instead of pure white light or only some certain colored light. Of course that will increase the precision but it will also reduce the recall, as it is usual for those kind of problems.

What I definitely can do already, is detecting wide light in addition to bright light. This combine with detecting the brightest light source and some tricks might help to increase precision without reducing the spectrum. Let's see :side:
The administrator has disabled public write access.
The following user(s) said Thank You: BrandonHortman, jas01, Aelius Maximus

Better lens flares? 1 year 8 months ago #4

Thanks for the replies Marty and LuciferHawk. I am highly enthusiastic about the work that you guys do.

I am sure you understand what I mean, but just to clarify.


I notice that when I select pixels with depth only the sun is triggered in Dragonage: Inquisition.

So I built this little sun ray:
God Ray example for Marty and Luciferhawk by brandon.hortman, on Flickr

Then I built this for the Lens flares, not triggered by depth.

Trying so hard for some rad lensflares =D by brandon.hortman, on Flickr

I dont know what triggered by depth means honestly, I am enthusiast level, but I have a high level of comprehension; so maybe this is a stupid suggestion, but what if the lenz flares could ignore pixels with depth?

As it is, If I could have that separate texture for the Lens flares than the godrays, they could still look pretty rad together.

Hope you guys have a great day =D
The administrator has disabled public write access.

Better lens flares? 1 year 8 months ago #5

Also thank you for the very in depth answers :cheer:
The administrator has disabled public write access.

Better lens flares? 1 year 8 months ago #6

  • Ganossa
  • Ganossa's Avatar
  • Offline
  • 최정장군
  • Posts: 790
  • Thank you received: 838
"Triggered depth" is the term you used, so I though it would be more comfortable to use it again ;)
I would rather call it depth dependent. Depth is just another value to each pixel. If you say "what if the lenz flares could ignore pixels with depth", that basically means you apply them without using that information. This you can already do by deactivating depth check.
However, if "what if the lenz flares could ignore pixels with depth" means that you actually want to evaluate the depth value and apply it to either close or far pixels, then you do need the depth value.

Currently, using the depth value has the advantage that you can identify pixels that are part of the background (farthest pixels) which is where normally the sun/sky is drawn. That way, you can apply a very strong effect that is less likely triggered for false pixels. Not using the depth value for lens flares will therefore trigger it more often than you want for all kinds of false pixels cause we can currently not distinguish well between intended and not indented applications of those effects other than with that depth information. You can simply check on that by turning of the depth check for those effects :)
The administrator has disabled public write access.

Better lens flares? 1 year 7 months ago #7

  • jas01
  • jas01's Avatar
  • Offline
  • Posts: 79
  • Thank you received: 10
BrandonHortman wrote:

Then I built this for the Lens flares, not triggered by depth.

Trying so hard for some rad lensflares =D by brandon.hortman, on Flickr

Hello BrandonHortman :)

Can I ask you something? How I can get those radial lensflares? (from the second picture)
They are a part of the Framework?

Sorry for my poor grammar.

best wishes
The administrator has disabled public write access.
The following user(s) said Thank You: BrandonHortman

Better lens flares? 1 year 7 months ago #8

My plan was to have two different sprites. This sprite for the lenz flares ( or maybe another technique, but most likely lenz) and use it with
#define LENZ_DEPTH_CHECK 0

GFX_sprite3 by brandon.hortman, on Flickr

Then I was going to try to use this as the godray:
#define GODRAY_DEPTH_CHECK 1

GFX_sprite12 by brandon.hortman, on Flickr

I looked through the code for the last week, but I can't for the life of me figure out how to define a texture for two different techniques
I also wondered if the Gaussian anamorphic lens flare could make sharp X patterns like this....but probably not.

I ended up settling for this Sprite with just the Lenz.
GFX_sprite by brandon.hortman, on Flickr

Which can look like this in game
DA:I ReShade 4K by brandon.hortman, on Flickr

But under more intense lights like the sun the rays are more prominent, but the radial flare is still there of course.

I dunno, I'm trying to come up with some creative solutions.
I guess I need to get a book on HLSL :grin:
The administrator has disabled public write access.
The following user(s) said Thank You: crosire, jas01