Light Scattering Demonstration - 2D Pathtracing
by SpinningCube
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
(YTPMV) Windows BSOD Startup Sound Scan^2
by truthbaconALT
TSDON ARCHIVE v2
by MTVWorld
Beat up Mewtwo 0.1.2 #games
by 1superscratchcat
Numbers 1 to 500 In 500 Fonts (My Version) (FINAL PART) remix
by rizqiuwais
AY: In Four Corners Deluxe! Remastered (R10|P30) remix
by miguelhauck
(BACHIRA) Blue Lock Game
by UltraBroskiMan
Average car guys’ chat
by logicbrojx
Granny (fanmade)
by sanhit123
All Endless Numbers from 1 to 50! (WIP) remix-3
by ELPODEROSOPQ
Mouse-Pointer (game jam MUSICLOUNGE)
by Nelgamer123
FC 27 Pack Opener
by Aryenal7
The Studio Doors of Numbers I - Part I (Final!) remix
by Taterbot44
Roblox 2010
by ScottAnimates
Icy Checker (Fanmade DELTARUNE Battle)
by AgentX_
Trick-Or-Treat!
by wizznats
しょぼんのアクション アレンジ版 4面
by tonetotuto
Peppa Pig gets grounded 4.0 MY VERSION
by TheScarfedStickman
Make Your Own BFDI/BFB but Only Warm
by ZayaTheIncredible
Add a button to beat up Gobo! [3]
by newmyles
Beat Up Casey!
by newmyles
Beat Up Tennis Ball micro.bit version
by MewFactor_2011
Multiplayer Paper Minecraft
by elirules1232
Number blocks red zone
by 4ftwins
Beat up scratch cat but its a collection of new buttons (fixed) remix remix remix
by hyd3ns33k