How do i make a light get increasingly brighter when you look at it? (anamorphic lens flare, billboardgui)

The parts you layed out to portray 40 degrees are rotated 40° each meaning that the green angle is 80° in toal, if you rotated them 20° each I think it should align properly.

1 Like

The / 2 is supposed to be there since the angle is calculated from the center, meaning if you put 40 as the angle, it would actually be an angle of 80.

You’d probably use the values products returned by how much you are looking toward it and how much it is looking at you, sort of combine them, and calculate the transparency and size from there.

1 Like


Tested it out, the more you go down the center the more closer it gets to 0, the further you go, the more it starts to lean towards 0.6

What im tryna do is, when you get closer to the center the value becomes 6, the further you get away the value becomes 0.

For transparency just the center at 2, and edges at 0, for simplification.
Basically math oriented, if anyone could help that’d be nice.
image
Top line is a value that will multiply the size of the ui.

Bottom line is a value that will become the transparency, imagine like increments, i just need to find out how to convert that value of numbers into something like the opposite.

Bumping this, does anyone have a idea?

@VegetationBush Do you have a idea? I’ve saw you done some math related work and i pinged you because i dont know else to ping.

Whatever value you’re printing in the video earlier seems perfect for this. At its center the value should be exactly 0, the value at the corners depends on the angle. In the video its an 80 degree angle and around 0.6, I’m gonna assume its around 1 when you’re to the side of one of these lights.

To start off, you could do 1 - ThatValue, which would return 1 at the center, and around 0, when right beside it, at the angle you’ve set it, it would probably be around 0.3 at the edges or something. You can easily use this to calculate the strength of the lenseflare.

Incorperating distance from the light shouldn’t be to difficult, but its probably gonna be a bunch of trying out some stuff to get it to look right.

1 Like

I’m not really sure what your goal is as the intended result is quite confusing.

Are you:

  • increasing the size of the flare the more centered the light source is in the viewport?
  • decreasing the transparency as the player moves closer the the light source?

Increasing the size, increasing the transparency.

Well… do you know how to do math, cause i sure dont…