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
Cloning test
by coinman
AY in the Dreadnought Fleet! [Players : 58 | Remix : 20 remix
by craig0005
Undertale Last Breath Phase 5 Fight Remastered
by nhathuysonlinh
Spamton Fight 1.0 remix
by Spamtnfanfworldlover
Lots Of Jumpscares: Random NBB Jumpscares
by Jason3424Maker-Newer
Undertale SANS FIGHT remix
by 18lord04
ep4 add1
by penglingonafridge
The free IDFB characters as dogs
by smartyworld3
ipa nickelodeon creatures my take pt4
by Haroofifan
tornado animation signup
by CirroCellus
YouTube Clicker!
by GarfieldGirl-330
Klasky Csupo & [Klasky Csupo Sings Gummy Bear Song
by SuperJamesWorld
FNF - (Vs Sonic)
by CaydenB08691
KyleWare: Ultimate Microgames! (v1.85) 8 bit stages
by CZ2746isbackscratch
I'm on a watcher duty
by Paulor94
Beat Up Scratch Cat v1.35 (13+) (UPDATE) remix-4
by sneakypete2012
UNDERTALE PLATFORMER ver.2.0 アンダーテールプラットフォーマー! 2
by HAKU-CHO
Beat up Sonic (3) remix
by baby_jaba1604
talking tom and ben news pre-release ver.0.5.1
by creator12121341
The Black Hole Add Round 0.5 remix
by kaa94
Beat up Sonic (2)
by mavincraft34
Stingy text to speech 2.0 remix remix
by gudfsijacxvuvjef
Kuba Kołodziejczak Csupo
by kubakolodziejczak007
Toopy And Binoo: Saves the Day (2025) DVD.
by travi2007