May 28th, 2021

May 28th, 2021 Dev Vlog: How Lights work in Satisfactory

Q&A: Can you give a quick explanation of how the system for Lights works right now?



like a quick
uh explanation of like how light this
like the system for lights works right
i haven't anything set up to show so i'm
first gonna
show problems with light
i'm totally not using our first of april
so here we have a beautiful statue and
these are like 50 lights overlapping
so if we show our performance
it's uh it's kind of that we're running
at less than 30 fps
even though not much is going on here
that looks great so the
yeah i know i love the floating floating
peeps uh
so the first thing we did an engine
upgrade to 25
i think which gave us a nice future
which is
the rendering threat the rhi threat
which gives us tons of performance back
already the rhi
stands for rendering hardware interface
which is epic
solution for different rendering apis
and with the engine upgrade we are
allowed to use in separate fret for this
so partially the work is offloaded to a
separate threat instead of
only on one fret so this is acceptable
so now we can go to stage two of the
explanation so the second thing we did
with light is
normally you would use inverse square
which makes the light look pretty
but the problem is they lose a lot of
intensity so instead of that we
are using no falloff so the light is
the same strength as the beginning as
the end which allows us to have the
right distance for the light so they are
way less performance impactful
and they need to overlap way less to get
intensity that you would desire
right so they're not like realistic in
the sense that most other lighting in
the game
is but they kind of need to to make
sense for the users
yes and here we see the example how it
works with a
ceiling light so we slap a cookie cutter
on it
uh called a light function and then we
cut out the square so it's technically
this light but we just cut out the other
right and then the biggest issue with
the light is shadows
so let's go to the shadow part so we
have three options
uh no shadow casting which looks
there's absolutely no shadows from
anything the second option is
cascaded shadow mapping um this is the
classic way of doing it
we have been doing that ever since i
don't know
2005 probably
it's it's expensive because just imagine
the light being a camera
it looks what is visible and then makes
a depth map
and projected shadows on the world that
way so the more
objects the light is hitting the more
expensive the shadows will get
which is absolutely not ideal in an
infinite builder game
so and then we have the last option
which is distance field based lights
uh shadows uh it has some downsides our
conveyor belts are not shadowed
unlike in this case there there is
shadows from the conveyor belt
that's why we use the mix solution for
the directional light
and as you can see some shadow artifacts
will pop up
and that's because distance fields are
technically a 3d
rep 3d texture
of the mesh itself so if i quickly eject
this is the distance fields for those
they look a bit of funky
but it's easier for the gpu to calculate
it because it's just
direct information there it doesn't
really need to do much curling because
it's it's gpu to gpu data but
it's like 25 to 50 faster especially
with the rendering
uh the error hia threat
uh that made it even more fast uh so