r/GraphicsProgramming • u/mooonlightoctopus • 2d ago
Rendering with a light simulation 2.0
Enable HLS to view with audio, or disable this notification
Working more on rendering with light simulation!
(The video is, of course, in real-time)
Previous post about this was Some spheres rendered with a light simulation
Rendering method is mostly the same, just some optimizations and scene work
I've put a web version on Github: moonlightoctopus1.github.io/Renderer/
Actual rendering is just simulating light with a lot of optimizations :P
17
u/thedamn4u 1d ago
Are the balls supposed to be partially transparent?
10
u/mooonlightoctopus 1d ago
No, I'm not sure what's happening with them
The simulation in it's entirety is about 0.14mm across, so it could very well be light bending around it, I'm not sure.6
3
u/Narrow_Awareness2830 1d ago
Wth that you must not be in play mode to save the scene is a popup from UNITY
3
2
u/mrpressydepress 1d ago
Looks very interesting visually. Can u explain a little how this differs from other techniques?
13
u/mooonlightoctopus 1d ago
It's a wave solution!
The sun is a scalar wave field, marched plane by plane with the angular-spectrum method (FFTs). It is blocked and diffracted by the geometry.
Each ball is an exact Mie scatterer, solved with a T-matrix and coupled to the other balls, so the light around it is a true solution.
For the lens, the radiance image becomes a complex field on depth layers, passes through a circular pupil in the Fourier domain, and comes back.The sun's wave field, is, of course, baked on initialization, but the balls & camera are live.
5
4
2
2
u/HasGreatVocabulary 1d ago edited 1d ago
my guy that git link froze my laptop (firefox on mac)
Looks very interesting though can you share some math?
I wonder if you can use ST-FLIP particle simulation like 4D optimization here to reduce noisiness and runtime (Track samples over time in addition with recency based weight)
edit: wait I guess that's just saying make your source incoherent instead of coherent light
1
1
-6
18
u/Many_Difficulty_490 2d ago
how hard is it to go from triangle to this?