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
Explore Scratch City (Old Version)
by SuperiorGamer901
Beat up Edward 7! <3
by kcatcoder
Beat up Sonic EVEN more! remix
by doheodjeoud
All Numbericons 1-4000 Different Styles remix remix
by kieffer244
Meggie And Lilla (Warm Like Fire + Dusty Like Air) Sprite remix
by ilove1234y
Goku TSB - First Model
by GriddyKidGames
BFDI 1a Art I Made :/
by NotdaBestUserAlt
Dragon Ball Z Xenoverse X
by amazingmario2011
Windows Rainbow
by codepig8211
Sprunki 2013 (Recreation) [DOING INTRO
by carterplays6
Бодо Бородо Приключения С Бубликами
by MisiRay
The Studio Door of Numbers X [ 114 Doors ]
by LiamCornRise
Talking Tom Band 31-32
by JLLeonScratchy
Backrooms
by joseblanco2025
rare wublin Island Remixer | Ghost ghost tympa
by elangepic
❶+❷=❸ | TᕼE ᔕTᑌᗪIO ᗪOOᖇᔕ Oᖴ ᑎᑌᗰᗷEᖇᔕ - ᑭᗩᖇT ❺ - 408 ᗪOOᖇᔕ | ❹=❺+❻
by Tran_Scratch
spinner
by ghssibee
30 minute timer
by TheSoccerDude16
FNF Bot Tester
by couscous1
EMOJI PARTY || ONLINE
by JloAu
Cuphead: The Cyclops in "Rugged Ridge Royale!" (W.I.P)
by NinjaBenM
Engine Maybe? — Fix This Please?
by BlueDude34
Numberblocks World
by MiguelHatScratch2
Incredibox S3 - Bronze || Teaser
by somerandomkidok