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
Beat up Squidward (Add a button) [10] remix
by xmrrileyxx
Beat Up David Zaslav (BUT A LITTLE UPDATE)
by RealFire294
ClockVerse Rank Rework Build (Adds F & E Rank)
by Qwertyuiopasdfghjk37
IDK just artistic alphabet lol
by -_-BlockyFunnyTV-_-
Speedrun [BETA] v1.14
by Cosmoo_the_cow
Parkoor But faster
by 29schaney
ohio pt 3
by scratchgyrl
FnasMM Jumpscare Section Remaked 3.1
by Tyler-Time
The Mine Song but yes
by Phantomforest
Baldi Soundboard remix
by 97ajs19
Banned messages Soundboard (AYFFAIPX_Channel's Banned Messages)
by AYFFAIPX_Channel
The Scratch 3.0 Show: The Egg
by zvardin
Scratch's Elites EP1-2 [Initializing]
by Walle10-0
Beat up WeDo (Pico's evil twin) (added more buttons)
by sudden-error
Full Game- Fnaf 3
by -MythCrafter-
Fruit Ninja Ex 【Old & Probably Cancelled】
by Hugo20201
Playkids Band 13 (Remake)
by jboer95
New button!
by tatatino150
【修正】アニメ「開」第3話 決戦
by TEXT-01
call of the void
by yourself_q
Beat up Sonic (2)
by mavincraft34
beat up Sonic remix remix remix remix-2
by Lalajo3232
ベッドウォーズ
by sukurattimaikura
Super Smash Bros. 64 - Character Profiles
by impostorsussy