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

Cloning test

by coinman

Project thumbnail
View Project

AY in the Dreadnought Fleet! [Players : 58 | Remix : 20 remix

by craig0005

Project thumbnail
View Project

Undertale Last Breath Phase 5 Fight Remastered

by nhathuysonlinh

Project thumbnail
View Project

Spamton Fight 1.0 remix

by Spamtnfanfworldlover

Project thumbnail
View Project

Lots Of Jumpscares: Random NBB Jumpscares

by Jason3424Maker-Newer

Project thumbnail
View Project

Undertale SANS FIGHT remix

by 18lord04

Project thumbnail
View Project

ep4 add1

by penglingonafridge

Project thumbnail
View Project

The free IDFB characters as dogs

by smartyworld3

Project thumbnail
View Project

ipa nickelodeon creatures my take pt4

by Haroofifan

Project thumbnail
View Project

tornado animation signup

by CirroCellus

Project thumbnail
View Project

YouTube Clicker!

by GarfieldGirl-330

Project thumbnail
View Project

Klasky Csupo & [Klasky Csupo Sings Gummy Bear Song

by SuperJamesWorld

Project thumbnail
View Project

FNF - (Vs Sonic)

by CaydenB08691

Project thumbnail
View Project

KyleWare: Ultimate Microgames! (v1.85) 8 bit stages

by CZ2746isbackscratch

Project thumbnail
View Project

I'm on a watcher duty

by Paulor94

Project thumbnail
View Project

Beat Up Scratch Cat v1.35 (13+) (UPDATE) remix-4

by sneakypete2012

Project thumbnail
View Project

UNDERTALE PLATFORMER ver.2.0 アンダーテールプラットフォーマー! 2

by HAKU-CHO

Project thumbnail
View Project

Beat up Sonic (3) remix

by baby_jaba1604

Project thumbnail
View Project

talking tom and ben news pre-release ver.0.5.1

by creator12121341

Project thumbnail
View Project

The Black Hole Add Round 0.5 remix

by kaa94

Project thumbnail
View Project

Beat up Sonic (2)

by mavincraft34

Project thumbnail
View Project

Stingy text to speech 2.0 remix remix

by gudfsijacxvuvjef

Project thumbnail
View Project

Kuba Kołodziejczak Csupo

by kubakolodziejczak007

Project thumbnail
View Project

Toopy And Binoo: Saves the Day (2025) DVD.

by travi2007