
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 baby wolf
by piolalina

Aladdin Disney Dress Up remix
by scratchjeu310

文字認識 (OCR) ver 4.0
by Jinenjo_000

Round 1 remix
by mavincraft34

5 SimpleCircuit
by bloodmonkey7

Beat up DtLegendz
by GooleSharty122

Super Scratch Smash Ultimate
by -_EsperAnimations_-

GU!ink!sans fight (demo) phase2 [UNDERTALE fun game]
by gau37

Super Smash Bros NES Beta 1.4.1
by popcornkid9

Beat Up Red Bally V0.13
by kysk219dhsaek102

↖︎( '-' )⤵︎
by gamepg

Beat up Oz
by jace1809

My version of Eflaqualish Alphabet Lore
by PidiAmo

Make Your Own Beat Up Project V0.1
by the_ssc_studios

Beat Up Purple USB
by dirtotheobjectrises

the fixies bfdi end credits on disney channel french
by dgapozdofficial

Talking tom and ben news in scratch edition
by sonicgamersspeed

That Level Again V1.1
by wiseguy1234

Nickelodeon Creatures Text Engine 8.0 remix remix
by duder_123

Untitled-3
by Maxim111

ADOFAI Custom - NH world(8-X but hell)
by nhochibiki

BEAT UP SCRATCH CAT ULTIMATE 9 ARENA
by hyd3ns33k

Beat Up Me! 1.1 (NO SOUND)
by -yellpixel2014-

Incredibox - Sprunki oc (real) V3 PART 1/3 remix
by randomgoofybrud