Light Scattering Demonstration - 2D Pathtracing
by SpinningCube
Description
Thanks to @griffpatch for the "Find Normal" block. Check out @squirrelsRcool's similar project: https://scratch.mit.edu/projects/877109780/ This project is a 2D path tracer. Every frame, many samples are explored and accumulated. For each sample, a ray is sent in a random direction from the light source, after which it bounces several times off of the scene surfaces. This simulates the phenomenon of global illumination. For each bounce, it loses a bit of intensity, picks a random direction from the surface, and goes in that direction. I use the pen extension to trace the light paths and illuminate the scene. I designed various scenes for the light to travel through. Some look more like floor plans, others are more abstract. For the thumbnail, I ran the simulation in Scene 11 and took screenshots at different durations. The final image is a combination of all the images which I made using external software. It's kind of like merging multiple exposures to make an HDR image. #Math #Simulation #Light #Lighting #Ray #Raycaster #Raytracer #Raytracing #Raytrace #Global #Illumination #Reflections
Instructions
Use Turbo Mode by either: - shift-clicking the green flag - See inside > Edit > Turn on Turbo Mode If you want it to run even faster, use TurboWarp: https://turbowarp.org/650323522?hqpen&turbo Hover your mouse in the upper-right corner to reveal the "Scene" slider. You can also drag the light source to a different position.
Project Details
- Visibility
- Visible
- Comments
- Enabled
More Cool Projects
The Edamame Show S1EP3: Going On A Vacation!
by Francis1818
spiffy.exe buttons Noob
by coopstar_white3
Extraterrestre
by angelstud09
v0.4.3 [ARCHIVE] Minecraft 3D
by scratchfan321
Rai Hoops logo
by CB3029-X
Beat up TROCAMOS DE ELEMENTOS (2) V2
by lukemanolopoulos8
Warrior Cats Game Update (Schism)
by wolfburrito95
Nick Jr Dirty logo but Nick Betrays jr (Silent For Dirty when they come up and scare Jr)
by Nickelodeon93038Fan
Beat Up Stickman Extreme remix remix
by XXULOS59
AY In Color Loops Of Fate! (Fun Show Party) (8 Players) V0.08 remix remix
by maxileon15
Just Dance: Scratch Party 2 [Unfinished] remix
by JaKaeuper
Sonic the Hedgehog Maker
by Librarylady02
Wind Blowing Clouds
by dostrip
Climb to the Rhythm! #games #platformer #music
by S-1014
Cheating (FULLY PLAYABLE) VS Dave and Bambi
by darwiniscute
FDY TS!Underswap Papyrus Simulator
by PapyrusFan12321
MMO Platformer + Cheats v1.3
by lIlI-IlIl-IIII
add a button to beat up Giga [3]
by isaac-MCcreeper14
Windows 10 (21H1)
by Dair0702
Kochari full version
by Incredibox_player
Iyad Animation Band
by evp3ralta
Interactive Endless Letters (Spanish) remixed (extras)
by superJJbr
Cut the Rope Пример
by Inventor_24
BFDI. BFDIA. IDFB. And BFB Soundboard Update remix
by thehappypc2