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 Black Hole (Add Round 6)

by earlham11

Project thumbnail
View Project

fidget spinner game

by LLloyd2024

Project thumbnail
View Project

One Night with The Powerpuff girls and rowdyruff boys

by IsaacContreras_GTOVD

Project thumbnail
View Project

KNG011’s Russian Alphabet Lore

by c00lk1dd_2014

Project thumbnail
View Project

Angry Birds Adventures Season 2 Episode 3 Summer Pignic

by charmxthe2nd

Project thumbnail
View Project

Number decimals band: Episode 3: 0.6’s part [Without the music]

by thezkids

Project thumbnail
View Project

asdf 7

by Oscarmayer6

Project thumbnail
View Project

星のカービィ<カービィ vs クラッコ>

by hime1130

Project thumbnail
View Project

Beat Up Squidward 2.0.4

by oceanboy06

Project thumbnail
View Project

huh msdos meme lot (hate)

by MuserNamerWindows

Project thumbnail
View Project

All BFDI Chase Running Sprites

by JJPMRises2020

Project thumbnail
View Project

Beat Up Red remix remix remix remix

by jshurden28

Project thumbnail
View Project

Retrospecter FNF test | 18+

by GamingSpanric1

Project thumbnail
View Project

[OverSave-Tale] Bad Time Trio HARD MODE by FDY バットタイムトリオ ハードモード 作fdy remix

by rinngodaisu

Project thumbnail
View Project

talking tom and ben news: The Arctic Base (ft. Mario) remix

by PSANANI

Project thumbnail
View Project

[NEW MAP] bbccs scratch edition!

by Traw2016

Project thumbnail
View Project

ScratchBlox

by gannongamescom

Project thumbnail
View Project

Destroy Scratch Cat DELUXE (demo)

by thyerdf

Project thumbnail
View Project

3D 小田急線運転シミュレータ

by laview_001

Project thumbnail
View Project

Beat up BookieBear725's 65 Supernova+DLC

by HomeWithKuya

Project thumbnail
View Project

flush test invasion

by Tv-_-Woman

Project thumbnail
View Project

kinemaster effects thingy without loud sounds remix-2 copy

by juliescott12

Project thumbnail
View Project

dementia v2.0

by iamscratchlol96

Project thumbnail
View Project

Beat up Edward Pro

by JojosWorld32