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

(YTPMV) Windows BSOD Startup Sound Scan^2

by truthbaconALT

Project thumbnail
View Project

TSDON ARCHIVE v2

by MTVWorld

Project thumbnail
View Project

Beat up Mewtwo 0.1.2 #games

by 1superscratchcat

Project thumbnail
View Project

Numbers 1 to 500 In 500 Fonts (My Version) (FINAL PART) remix

by rizqiuwais

Project thumbnail
View Project

AY: In Four Corners Deluxe! Remastered (R10|P30) remix

by miguelhauck

Project thumbnail
View Project

(BACHIRA) Blue Lock Game

by UltraBroskiMan

Project thumbnail
View Project

Average car guys’ chat

by logicbrojx

Project thumbnail
View Project

Granny (fanmade)

by sanhit123

Project thumbnail
View Project

All Endless Numbers from 1 to 50! (WIP) remix-3

by ELPODEROSOPQ

Project thumbnail
View Project

Mouse-Pointer (game jam MUSICLOUNGE)

by Nelgamer123

Project thumbnail
View Project

FC 27 Pack Opener

by Aryenal7

Project thumbnail
View Project

The Studio Doors of Numbers I - Part I (Final!) remix

by Taterbot44

Project thumbnail
View Project

Roblox 2010

by ScottAnimates

Project thumbnail
View Project

Icy Checker (Fanmade DELTARUNE Battle)

by AgentX_

Project thumbnail
View Project

Trick-Or-Treat!

by wizznats

Project thumbnail
View Project

しょぼんのアクション アレンジ版 4面

by tonetotuto

Project thumbnail
View Project

Peppa Pig gets grounded 4.0 MY VERSION

by TheScarfedStickman

Project thumbnail
View Project

Make Your Own BFDI/BFB but Only Warm

by ZayaTheIncredible

Project thumbnail
View Project

Add a button to beat up Gobo! [3]

by newmyles

Project thumbnail
View Project

Beat Up Casey!

by newmyles

Project thumbnail
View Project

Beat Up Tennis Ball micro.bit version

by MewFactor_2011

Project thumbnail
View Project

Multiplayer Paper Minecraft

by elirules1232

Project thumbnail
View Project

Number blocks red zone

by 4ftwins

Project thumbnail
View Project

Beat up scratch cat but its a collection of new buttons (fixed) remix remix remix

by hyd3ns33k