
Godot 4.0 gets SDF based real-time global illumination - stephdin
https://godotengine.org/article/godot-40-gets-sdf-based-real-time-global-illumination
======
gh123man
This is super interesting. The first video on the page sheds some light on how
this actually works. It seems like they convert the scene into shapes that can
be represented via SDF's and smooth min
([https://www.iquilezles.org/www/articles/smin/smin.htm](https://www.iquilezles.org/www/articles/smin/smin.htm))
them to blend into an approximation of the actual scene. While also capturing
some general texture color data to apply and blend into the shapes. I assume
the shader ray marches the scene to compute the lighting reflections and
bounces. I am curious how the probes/nodes come into play and how they extract
the light data from the shader output to apply it to the scene geometry (is it
simply added in screen space?) I would be very interested in reading more
detail on how this is actually implemented!

~~~
hellofunk
They explicitly say in the article that it does not involve ray racing, of
which ray marching is a subset.

~~~
klodolph
It's possible that "it does not require ray tracing" means that it does not
require extensions like RTX. Perhaps it uses voxel cone tracing, which you may
say is technically not ray tracing, but if you called it ray tracing you
wouldn't exactly be _wrong_ either.

~~~
Rusky
The article contrasts this approach with voxel cone tracing, so it's not that
either.

~~~
dcanelhas
I would call it Sphere Tracing since that's what it's called in "Hart, John,
C; Sphere Tracing: A Geometric Method for the Antialiased Ray Tracing of
Implicit Surfaces; The Visual Computer-1995"

------
adanto6840
I get why Epic probably funds this, and I love to think how great Godot could
be in another year or so (and how they could surpass Unity, etc). What I _don
't_ really understand, though: Why wouldn't Unity just implement this now,
too?!

It's open-source & MIT-licensed; if it's better than Unity's GI -- and it _IS_
better, because Unity does not currently have _ANY_ realtime-GI solution in
their latest versions (they stopped licensing Enlighten for current/2020.x+
versions) -- so why wouldn't Unity just implement this, too?

There's nothing that appears to be stopping them from doing so, other than
pride perhaps; part of me really, really hope that they'll do exactly that,
though I've yet to dive into the code to see how viable it may or may not be
given Unity's current SRP situation(s).

~~~
kaoD
> I get why Epic probably funds this

Is it just to fuck over Unity?

~~~
dimgl
You're getting downvoted, but Epic is extremely anti-competitive. This is
likely the reason.

~~~
paulryanrogers
Epic's store offers a cheaper alternative to a near monopoly on digital game
distribution on PC. How are they anti-competitive?

~~~
jfkebwjsbx
Epic paid obscene amounts of money to studios to force them come to their
store and force exclusivity on them.

They basically exploited their Fortnite money-making machine to try to become
a monopoly on PC.

How is that not anti-competitive?

For reference, Steam has never forced exclusivity on partners to distribute
their games.

As for cheaper, Epic didn't become they couldn't charge the same. As simple as
that.

~~~
paulryanrogers
How is obscene amounts of money forcing anything?

This sounds good for developers all around, and a minor inconvenience for
gamers who are free to buy from as many stores as they like on PC. Yet could
benefit gamers long term as it motivates Steam to be more competitive.

Anti competitive would be buying up competing battle royale franchises to
reduce consumer choice.

~~~
mratsim
Intel vs AMD in the past is a typical example on how money + exclusive deal
could almost kill off a competitor.

Then Intel would enjoy a monopoly and instead of being stuck at Skylake for 4
years, we may have been stuck at Core 2 for 10 years.

Or maybe ARM, MIPS, Power or Itanium (!) would have had better opportunities
to catch up with x86 and would be the dominant CPU.

Who knows, but AMD dying would have not benefited anyone who was stuck on x86.

~~~
paulryanrogers
Except Intel was the behemoth in the case. Here Steam is the one with
marketshare, mindshare, and no serious competition before Epic. These
exclusives are also usually time limited. This isn't Facebook buying whole
studios and locking up content indefinitely.

------
reedlaw
Illumination Tutorial for Software 3D Rendering (2/2+) [c++20]
([https://www.youtube.com/watch?v=eXU-6_jmw7Q](https://www.youtube.com/watch?v=eXU-6_jmw7Q))
was just released by Bisqwit and it goes over a rather naive implementation of
real-time global illumination. The demo uses very basic geometry with a
Minecraft look and shows the progress of paths being traced on the CPU.
Compared to the Godot demo, the naive implementation is unworkably slow.
Nevertheless, Bisqwit's video explains the concepts and basic code
implementation admirably.

------
Fraterkes
This looks really cool and impressive of course, but I still feel the easiest
way for most indies (which Godot is aimed at) to stand out is to get away from
photo-realism.

~~~
m12k
Global illumination is orthogonal to photo realism. In fact, GI and lighting
in general can help indies get away with untextured and/or low-poly models and
still achieve a pleasant look (check out The Witness or Superhot for some
examples.

~~~
kgwxd
Superhot is the most innovative shooter I've played in years!

~~~
kroltan
Incredibly even more tangential but:

If you have the opportunity, do play Superhot VR.

It is to Superhot as Superhot is to a regular shooter. Absolutely fantastic
and one of the best fitting VR "ports" (it is more of a sequel, but I mean the
game mechanics got even better in VR than with a kb+m/gamepad)

------
anigbrowl
Re-upping this blog post (sadly overlooked when first posted to HN) which asks
the reasonable question 'why not just use Godot for general-purpose
applications?'

[https://medium.com/swlh/what-makes-godot-engine-great-for-
ad...](https://medium.com/swlh/what-makes-godot-engine-great-for-advance-gui-
applications-b1cfb941df3b)

~~~
Jasper_
There's a lot of functionality that a general purpose UI library has that
Godot will likely never approach, like support for input methods in text
editing.

Productive applications require _extremely_ robust text editing, something
that game engines don't spend a lot of time with. Stuff like selection, text
input for non-English keyboards, IME popups, that sort of thing. Even RTL text
display is usually minimally unsupported.

I also don't know of any game engine that supports multi-window display in any
coherent way.

~~~
robertely
The Godot editor has a pretty good IDE. It's not VScode/Atom levels of
functionality but it's improving steadily.

Looking at the github issues they seem to have made a lot of progress with
non-English inputs. Again, not perfect but improving.

Godot 4 is adding multi window support. I would hesitate to judge it until it
stabilizes but there's some hope there. It looks good from what we have seen
so far.

The rate this engine is improving is incredible, i'm finding a lot of reasons
to be optimistic.

~~~
benologist
The parent poster is referring to accessibility of the applications produced
with Godot, not the accessibility of the IDE. Edit: it's not .NET it's C++.

~~~
cdash
I don't understand, the IDE for Godot is created with Godot.

~~~
robertely
Thanks, that's the point I was trying to make. It's more clear when you have
read the article.

------
leetrout
> Tim Sweeney and Epic Games for their confidence in helping us finance our
> research via Epic Megagrant.

That’s interesting. Since this is all open source I guess Epic could
potentially benefit from this... It’s nice to see they funded another engine.

~~~
mhh__
From a business perspective, Unreal doesn't really do 2D as per se (Whereas
Godot is very simple to use) so improving Godot keeps people away from other
tools like Unity which do have features that compete with Unreal.

~~~
ngold
As a unity developer I'm drooling at godot. I can't wait to jump ship to open
source. Don't get me wrong unity is great, but godot is super compelling.

~~~
RMPR
There's one thing that make me reluctant to use Godot though and it's
GDScript.

Edit: Seems like it's not a problem anymore, can't wait to try again.

~~~
shmerl
Doesn't Godot allow binding with multiple languages? You can even use Rust for
that instead of GDScript.

~~~
krapp
The problem is few of those bindings are mature, nor can they be expected to
remain up to date. I don't know of any games in Godot using anything but
GDScript or C#.

This will probably change in the future (I hope it does, and I really wish
Godot just used WASM internally so any language that already compiled to it
would work) but as of now it seems there's no point to using anything but
GDScript or C#.

~~~
shmerl
You mean bindings aren't stable and require reworking all the time?

~~~
krapp
I mean that language support comes in the form of random third party projects
like perbone/luascript[0], so stability and completeness are entirely up to
the whims and capabilities of the owner.

It's open source, of course, so that's to be expected, but it also means
support for any language other than C# and GDScript is kind of a crapshoot.

[0][https://github.com/perbone/luascript](https://github.com/perbone/luascript)

------
arifmeticus
Is it possible to make a game that makes use of this new lighting system at
high graphical settings and regresses to something simpler for low end
computers?

------
rafaelvasco
Makes me realize that photo-realism is not the most important thing.
Illumination(and by consequence shadows) is. Bad looking 3D games look bad
because of two reasons: Aliasing (which is the worst thing in 3D imo, but
easily solved) and most importantly, because of bad illumination code. If the
lightning code is realistic, you don't even need textures.

------
mrfusion
So if I wanted to make a simple 2d game, should I go with godot, pygame, or a
JavaScript game engine?

~~~
krapp
Godot.

The sprite, tilemap and animation blending functionality alone are worth it,
just grit your teeth and put up with gdscript (edit - or use C#). And it
exports to the web anyway.

~~~
tomtheelder
You don't have to use GDScript, C# support is very strong at this point.

~~~
krapp
Fair point.

Unfortunately for me anyway, I'm using the Steam version which doesn't support
C#.

~~~
mrlala
Why can't you just download Godot yourself
[https://godotengine.org/download/windows](https://godotengine.org/download/windows)
and grab the 64-bit mono c# version?

~~~
krapp
I can, I just like using Steam to manage it. I'll probably change in the
future, though.

------
focus2020
I like the old plugin model for its one click development cycle. The new
plugin system forces to build the library which make the compile execute run
cycle much longer

------
cdbattags
Now someone please ELI5 how this compares to the algorithm Unreal Engine
employs?

------
MSmith123
Looks awesome! Might need to give godot a try :)

