Light Scattering Demonstration - 2D Pathtracing

Light Scattering Demonstration - 2D Pathtracing

by SpinningCube

👁 962 ❤️ 104 ⭐ 77 🔄 5
Created: Feb 25, 2022 Last modified: Jul 24, 2023 Shared: Feb 28, 2022

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

Project thumbnail
View Project

Explore Scratch City (Old Version)

by SuperiorGamer901

Project thumbnail
View Project

Beat up Edward 7! <3

by kcatcoder

Project thumbnail
View Project

Beat up Sonic EVEN more! remix

by doheodjeoud

Project thumbnail
View Project

All Numbericons 1-4000 Different Styles remix remix

by kieffer244

Project thumbnail
View Project

Meggie And Lilla (Warm Like Fire + Dusty Like Air) Sprite remix

by ilove1234y

Project thumbnail
View Project

Goku TSB - First Model

by GriddyKidGames

Project thumbnail
View Project

BFDI 1a Art I Made :/

by NotdaBestUserAlt

Project thumbnail
View Project

Dragon Ball Z Xenoverse X

by amazingmario2011

Project thumbnail
View Project

Windows Rainbow

by codepig8211

Project thumbnail
View Project

Sprunki 2013 (Recreation) [DOING INTRO

by carterplays6

Project thumbnail
View Project

Бодо Бородо Приключения С Бубликами

by MisiRay

Project thumbnail
View Project

The Studio Door of Numbers X [ 114 Doors ]

by LiamCornRise

Project thumbnail
View Project

Talking Tom Band 31-32

by JLLeonScratchy

Project thumbnail
View Project

Backrooms

by joseblanco2025

Project thumbnail
View Project

rare wublin Island Remixer | Ghost ghost tympa

by elangepic

Project thumbnail
View Project

❶+❷=❸ | TᕼE ᔕTᑌᗪIO ᗪOOᖇᔕ Oᖴ ᑎᑌᗰᗷEᖇᔕ - ᑭᗩᖇT ❺ - 408 ᗪOOᖇᔕ | ❹=❺+❻

by Tran_Scratch

Project thumbnail
View Project

spinner

by ghssibee

Project thumbnail
View Project

30 minute timer

by TheSoccerDude16

Project thumbnail
View Project

FNF Bot Tester

by couscous1

Project thumbnail
View Project

EMOJI PARTY || ONLINE

by JloAu

Project thumbnail
View Project

Cuphead: The Cyclops in "Rugged Ridge Royale!" (W.I.P)

by NinjaBenM

Project thumbnail
View Project

Engine Maybe? — Fix This Please?

by BlueDude34

Project thumbnail
View Project

Numberblocks World

by MiguelHatScratch2

Project thumbnail
View Project

Incredibox S3 - Bronze || Teaser

by somerandomkidok