
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

Tom and ben news HD mod
by tomybenluis12

Endless Reader Animations: Water (Letter W)
by kingdman1013

sprunki banana porridge official + lily and more remix
by no-sprunki_348

Florr.io (UNFINISHED)
by Yubbzy2

プリキュア完全勝利の瞬間
by mujin11

IK!Humantale koutaros fight!
by I-Koutaros

Beat Up Squidward: Ultimate Edition remix
by sigmaguy5

Sonic The Hedgehog Maker (100 Project Special) remix if ya want
by supersonicmario10

Tiny Time Travel x Odd Squad!
by Cheetah2105Z

マイクラスマホ版
by sou24sou2

Beat Up Nickel (fun games)
by BeatUpGame

talking roby Ultimate 2
by cocoandco560

☁In the dark
by uk-400

Mortal Kombat X
by donovan101

Chirpy the Penguin Deluxe
by The_Updator

My New Buttons (7)
by BradBartley31506

Glowing-floating Cat Effect.
by NPro5

Ejercicio3: Activar con un Clic
by Ditter123

Beat Up Spiffy Pictures remix
by siddharth1717

Narajar Artistic Alphabet remixed
by jinhuy

Beat up 0.03125!
by sethwhis

Google Chrome 100%Pen!! #art
by LetsBurger

Colourblocks: Pastelblocks Official With More remix
by lord_gideon

日本語版 3D プラットフォーマー
by Pikurin