Realistic Lens Flare

Realistic Lens Flare

by SpinningCube

👁 2,159 ❤️ 355 ⭐ 288 🔄 4
Created: Mar 27, 2022 Last modified: Nov 29, 2024 Shared: Apr 4, 2022

Description

A quick test project I made to generate lens flares, the kind of lens effect which would be visible when you point a camera at a bright light source like the sun. The end result is a quite nice-looking effect. The effect is composed of many individual lens flare elements. I made two of the lens flare textures using external image editing software, each one is a simple shape colored white with a radial gradient ranging from opaque at the edges to partially transparent at the center. More transparency is added by the project itself. This is a clone-based method, which means each lens element is a clone (A stamp-based version is perfectly doable, though). The clone is assigned a random size, position factor, shape, and transparency. There are 30 clones in total, though this can be changed in the code depending on how many lens elements are needed. The lens elements' positions are all multiples of the sun position. Everything is done in 2D, but this can be applied to a 3D project if Sun X and Sun Y are set to the projected coordinates of the sun. This project doesn't lag very much, but it does look smoother on TurboWarp with these settings: https://turbowarp.org/666704223?hqpen&fps=60&limitless Updated 16 April 2022 - Added exposure adjustment, where the background darkens when looking directly at the sun. Changed the sun streaks to make them fade in when looking directly at the sun. Released 3 April 2022 Anyway here's a bunch of tags: #Sun #Light #Sunlight #Day #Sky #Glare #Camera #Lens #Flare #Effect #2.5D #3D #Math #Clones #Mobile

Project Details

Visibility
Visible
Comments
Enabled

More Cool Projects

Project thumbnail
View Project

Entry - GalakU

by CitrinN

Project thumbnail
View Project

♡207☆200ありがとう!Stick war 棒人間戦争

by hosityan

Project thumbnail
View Project

青の塔15階

by sakaryuu

Project thumbnail
View Project

Splatoon (v1.5) ☁ (Specials!)

by Nate4893

Project thumbnail
View Project

Kirby Klash Healthbar Tech Demo

by SUPA61

Project thumbnail
View Project

ノリノリスクラッチキャット

by kei16pro

Project thumbnail
View Project

Truck Driving Challenge

by awesome-llama

Project thumbnail
View Project

[Note Blocks] New Super Mario Bros 1 Main Theme Note Block

by DwBros

Project thumbnail
View Project

☁️ Blocky ✦ Platformer maker online community - share levels online

by TimMcCool

Project thumbnail
View Project

☁ MMGISS Tower defense v4.6 ☁

by MMGISS

Project thumbnail
View Project

Lava lamp

by 3TheHedgehogCoder3

Project thumbnail
View Project

Numbers 0 to Beyond NEVER!!!! [1]

by Universe8

Project thumbnail
View Project

【マイクラアニメ】迷宮!ラビリンス!【敵を仲間にできるハードコア】

by Rozuki-masuhi

Project thumbnail
View Project

Super moose and zee (mobile friendly)

by Carterlion13

Project thumbnail
View Project

にゃんこ大戦争(完成途中)

by orahukun118

Project thumbnail
View Project

German Alphabet Lore PART 1: A-F

by TheScarfedStickman

Project thumbnail
View Project

Geometry Dash Wave || #games

by ASC-095

Project thumbnail
View Project

The No-Snake Hotel

by NinjaAbdy

Project thumbnail
View Project

RUN 3 3D NO LAG #games #fun #trending #all

by LovelyC4t11

Project thumbnail
View Project

PAINT and EXPORT

by buntfalke

Project thumbnail
View Project

Dino Battle Royale

by ColorlessWing_Studio

Project thumbnail
View Project

No Time To Stop 3D

by Hamboga123

Project thumbnail
View Project

Fantastic Phantasm | Meme Template

by -Space_Cookie-

Project thumbnail
View Project

Geometry Dash Silent Clubstep

by ccchow