Realistic Lens Flare
by SpinningCube
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
Beat up vupsen (2024) DELETED SCENE (never before seen!)
by andrewfans-scratch
Antigua and Barbuda EAS Alarm Sparta Remix
by PlayerSuperFriends
MUGEN Bluiguini Mayro Cuddle and SM128 Yoshi
by robertchaz64
My taking Borna
by Luker0707
Pacman
by FranoSve
Beat Up WildBrain U Plus! (2)
by newmyles
Beat up Dog Man! (5)
by lukemanolopoulos8
Flashy Sonic
by JAD398
Add Yourself Singing Playtime remix
by ScratchCat1839
Minecraft remix
by korshun2305
3D Model
by Canthiar
青の塔15階
by sakaryuu
Platformer Creator 2.0!
by JungoJim
Dustswap, Scarlet Flare (PREVIEW)
by Chronical_Undertale
Beat up Nano TIMeS! Remix 6!
by christywifi
Run 3: Christmas Cow Edition
by Lord_Drakostar
Dateblocks Band 8 (Aidans Version We Are Going Back To 5 per band but it is 4 for this band)
by AidanScratchMaker
Numberblocks Band 256ths up to 0.5
by Casratch_coding
30 minute timer with ticking sound
by NguyenHenri
A dance of fire and ice Water EX
by CameronProjects
[レート対戦]大乱闘スマッシュブラザーズ8++ -[ スマプラ ]- (スマブラ)(ハイクオリティー)(楽しい)(なんでも)(プラットフォーマー)(超進化)(最新)(ドット絵アート)(ゲーム)
by Nite-games
Undertale HELP FROM the void OST
by Twister056
Beat Up Scratch Cat (My First Beat Up Game)
by AugusTuber2013
Super Smash Bros. 64 Character Selection Screen remix
by lormoggia