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

The Edamame Show S1EP3: Going On A Vacation!

by Francis1818

Project thumbnail
View Project

spiffy.exe buttons Noob

by coopstar_white3

Project thumbnail
View Project

Extraterrestre

by angelstud09

Project thumbnail
View Project

v0.4.3 [ARCHIVE] Minecraft 3D

by scratchfan321

Project thumbnail
View Project

Rai Hoops logo

by CB3029-X

Project thumbnail
View Project

Beat up TROCAMOS DE ELEMENTOS (2) V2

by lukemanolopoulos8

Project thumbnail
View Project

Warrior Cats Game Update (Schism)

by wolfburrito95

Project thumbnail
View Project

Nick Jr Dirty logo but Nick Betrays jr (Silent For Dirty when they come up and scare Jr)

by Nickelodeon93038Fan

Project thumbnail
View Project

Beat Up Stickman Extreme remix remix

by XXULOS59

Project thumbnail
View Project

AY In Color Loops Of Fate! (Fun Show Party) (8 Players) V0.08 remix remix

by maxileon15

Project thumbnail
View Project

Just Dance: Scratch Party 2 [Unfinished] remix

by JaKaeuper

Project thumbnail
View Project

Sonic the Hedgehog Maker

by Librarylady02

Project thumbnail
View Project

Wind Blowing Clouds

by dostrip

Project thumbnail
View Project

Climb to the Rhythm! #games #platformer #music

by S-1014

Project thumbnail
View Project

Cheating (FULLY PLAYABLE) VS Dave and Bambi

by darwiniscute

Project thumbnail
View Project

FDY TS!Underswap Papyrus Simulator

by PapyrusFan12321

Project thumbnail
View Project

MMO Platformer + Cheats v1.3

by lIlI-IlIl-IIII

Project thumbnail
View Project

add a button to beat up Giga [3]

by isaac-MCcreeper14

Project thumbnail
View Project

Windows 10 (21H1)

by Dair0702

Project thumbnail
View Project

Kochari full version

by Incredibox_player

Project thumbnail
View Project

Iyad Animation Band

by evp3ralta

Project thumbnail
View Project

Interactive Endless Letters (Spanish) remixed (extras)

by superJJbr

Project thumbnail
View Project

Cut the Rope Пример

by Inventor_24

Project thumbnail
View Project

BFDI. BFDIA. IDFB. And BFB Soundboard Update remix

by thehappypc2