Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
2D Global Illumination in Godot (2020) (samuelbigos.github.io)
126 points by nbaksalyar on Oct 24, 2022 | hide | past | favorite | 21 comments


It would have been nice to see even one example scene which would have demonstrated indirect lighting more clearly, something like this one (linked from the article) https://vimeo.com/214264003 where you can nicely see the blue/red tint on the white floor.

edit: oh, apparently bounce lights are bit of a kludge here, from github readme:

> To bounce light, the previous frame is referenced and emissive surfaces from that frame are added to the current frame. This means every frame, light bounces to one additional surface.


> apparently bounce lights are bit of a kludge here

I actually find it really cool. Normally we treat light in rendering as having infinite speed, but this somehow models the speed of light as being one-reflection-per-frame. I wonder if this could unlock some kind of physics changes with polarization as well and work this into the game mechanics.


I don't know about game mechanics but light travels far in 20ms, ca. 2km I reckon (in vacuum)


> https://vimeo.com/214264003

That's looks extremely cool!

Are there any (app) GUIs based on such techniques?


Randomly, I think I may have been the first person to do (or at least write about) 2D GI. I taught a bunch of people about it (and rendering / path tracing in general), some of whom became a lot more popular.

Here's the oooold and very cringy article I wrote as a teen in the 90s, there are some old crap images in the gallery: https://web.archive.org/web/20031207162649fw_/http://www.cfx...


Fun seeing that people were doing monte carlo integration for 2d lighting back in the 90s :) I assume this wasn't GPU accelerated at all at that point?

I did realtime 2D lighting with per pixel sprite normals and stuff like that, but I never got to the point of doing GI bounces - sophisticated direct lighting and shadows were already demanding enough without the use of programmable shader units. https://vimeo.com/1514095


I wrote the article around the time of the Nvidia Riva TNT1/TNT2, many years before the first decently programmable GPUs (and the introduction of the term "GPU", they were still called graphics accelerators). So yeah, CPU only :)

Unfortunately I can't view your video link without a Vimeo account to "prove my age" (hoover my data).


That's an idea I hold close for many years now.

I remember finding this: https://www.deviantart.com/greenhybrid/art/2d-Whitted-Style-... when searching for "2d path tracer".

I did a very simplistic foray in the subject: https://github.com/hadrianw/2d-pathtracer

I still hope for a full fledged 2d game with global illumination.


Greenhybrid was a former "student" of mine, I'm hopefully credited somewhere by him :) Edit: just looked, yep I'm the "lyc" mentioned in the comments.

I also had planned to make a game based on the tech but never got around to it / professional rendering engines were enough of a battle.

Some of my 2D path traced renders over the years on deviantArt (among much other junk/scraps sorry): https://www.deviantart.com/lyc/gallery/scraps

and a GIF: https://www.deviantart.com/lyc/art/saturday-night-livecoding...


>>> possible to calculate the direct lighting analytically ?

I don't think that is the trend the industry is following. I think all investment research is poured into neural methods and ai-enhanced sampling. Joy to be breakfasting over such illuminating (pun intended) discourse & fractal art. My interest in 2D texture synth is more toward creating the stunning graphics found in classic sega style cell shaded titles like jet set radio. So I'm into the oldskool deterministic fractal geometry techniques, and adding dynamic luminaires and guassian blur passes is enough to create cool tron glow type effects ;)


Read the article on desktop, have to say that at least there it's really nice: good color scheme, readable text, good writing, nicely chosen images and code snippets (also Godot is always fun to encounter).

Makes me wish that more of my own articles could be so pleasant. It's unfortunate that the same experience doesn't seem to carry over to mobile devices, but oh well.



The website isn't readable on mobile which is doubly sad because it's a very cool article.


Just pinch the screen a bit and it’ll zoom out to fit the text. Clearly the site wasn’t designed with mobile in mind but there’s no need to make a big deal out of it and say it isn’t readable. I just read the whole thing on my five-year-old phone.


I'd hardly call notifying the op who may not even be aware "making a big deal"...


When I do that the text is unreadably tiny.


It's unreadable for me at the scale where the entire width of text fits. Proper responsive design is an accessibility feature. It is a big deal.


It does nothing to stop accessibility at least. Doesn't prevent zoom nor break 'reader mode'. I much prefer when sites don't try at all to get mobile working and letting reader mode work than when they do something that breaks it. In reader mode I can customize the colors/fonts to make it readable for me and not be at the mercy of the designer.

I'm on Android, but I suspect iOS has something similar.


The page is readable using reader mode in Safari on iOS.


How about turning the smartphone sideways?


Firefox reader mode works wonders for those kind of issues




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: