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

Beat up vupsen (2024) DELETED SCENE (never before seen!)

by andrewfans-scratch

Project thumbnail
View Project

Antigua and Barbuda EAS Alarm Sparta Remix

by PlayerSuperFriends

Project thumbnail
View Project

MUGEN Bluiguini Mayro Cuddle and SM128 Yoshi

by robertchaz64

Project thumbnail
View Project

My taking Borna

by Luker0707

Project thumbnail
View Project

Pacman

by FranoSve

Project thumbnail
View Project

Beat Up WildBrain U Plus! (2)

by newmyles

Project thumbnail
View Project

Beat up Dog Man! (5)

by lukemanolopoulos8

Project thumbnail
View Project

Flashy Sonic

by JAD398

Project thumbnail
View Project

Add Yourself Singing Playtime remix

by ScratchCat1839

Project thumbnail
View Project

Minecraft remix

by korshun2305

Project thumbnail
View Project

3D Model

by Canthiar

Project thumbnail
View Project

青の塔15階

by sakaryuu

Project thumbnail
View Project

Platformer Creator 2.0!

by JungoJim

Project thumbnail
View Project

Dustswap, Scarlet Flare (PREVIEW)

by Chronical_Undertale

Project thumbnail
View Project

Beat up Nano TIMeS! Remix 6!

by christywifi

Project thumbnail
View Project

Run 3: Christmas Cow Edition

by Lord_Drakostar

Project thumbnail
View Project

Dateblocks Band 8 (Aidans Version We Are Going Back To 5 per band but it is 4 for this band)

by AidanScratchMaker

Project thumbnail
View Project

Numberblocks Band 256ths up to 0.5

by Casratch_coding

Project thumbnail
View Project

30 minute timer with ticking sound

by NguyenHenri

Project thumbnail
View Project

A dance of fire and ice Water EX

by CameronProjects

Project thumbnail
View Project

[レート対戦]大乱闘スマッシュブラザーズ8++ -[ スマプラ ]-  (スマブラ)(ハイクオリティー)(楽しい)(なんでも)(プラットフォーマー)(超進化)(最新)(ドット絵アート)(ゲーム)

by Nite-games

Project thumbnail
View Project

Undertale HELP FROM the void OST

by Twister056

Project thumbnail
View Project

Beat Up Scratch Cat (My First Beat Up Game)

by AugusTuber2013

Project thumbnail
View Project

Super Smash Bros. 64 Character Selection Screen remix

by lormoggia