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
Beat Up Scratch Cat remix
by everton_trader
Numbericons 1-1000
by jayden2015paul
Omega Flowey Fight V1.2 (Infinity Health Mod)
by Jmason2023
Beat Up Scratch Cat 2.0 | #beat #up #2.0 #scratch #cat #all #games #caseoh
by zeroagite_scratch
Sonic Adventure Engine with name tags
by JosephTheHedgehog776
minecraft bedrock edition-survival mode (normal) acettes
by JeremiahM2024
Minecraft Multiplayer Hangout
by kitty-kirill-13
Unifon Alphabet Lore (Remastered)
by scratch_EMT
PVZ Vacation Almanac UPDATED again
by bruhman2010part2
Jayden's Nick Jr Logo Bloopers: Take 67
by JDCommunity2024
tornado art again
by ChiliPhili
Banned messages Soundboard (AYFFAIPX_Channel's Banned Messages)
by AYFFAIPX_Channel
Beat up Ghost Nano
by Klaskychoopo64
Star Wars Battlefront [1.3] The Rise of Skywalker Season
by Lennard_Gaming
Wiki OC Ship Generator 1.2
by Salmon-Fillet
Make Your Own BFDI(A),BFB Or TPOT
by ARandomGuyIDK
FDY TS!Underswap Papyrus Simulator
by PapyrusFan12321
Disney Channel: Introducing Disney XD!
by MyDisneyChannel
Lysek OS
by Lysek0707
Add a button to beat up pico [9]
by newmyles
New Wither Storm Model remix-3
by vincenzo6415
POCOYO RACING GX Edition V1.1
by Tunicogaems
Pucca & Friends Opening 2014
by PeppaDoesScratch
Beat up Sid phillip (2)
by GooleSharty122