I'm trying to figure why Baked light differ so much from realtime lightning (whose final result I like and prefer!)

Left one: baked light, right one: realtime.

I've placed a:

  • Directional light

  • 3 spot light

  • 1 Reflection probe

There is also post processing beahviour with bloom enabled.

Follow my light settings: enter image description here

enter image description here

enter image description here

I can't enable Realtime GI because is a webGl application.

  • \$\begingroup\$ I don't know Unity, but the first image makes me think your lightmap resolution is too low. \$\endgroup\$
    – user253751
    Feb 12 '20 at 14:47

Its all about performance.

Rendering soft light transport is harder than we presume.

When we need a light which renders/refreshes every frame we should be careful about how intense quality it should contain.More quality more FPS decrease. But when it comes to baked lights,theoretically you shouldnt care about how much time it consumes when its baking in the first place because real focus in here is game view right?.

That was the chit-chat lets look at what's so different about them systematically.

Real Time Lights

To utilize the parallel computing power of the GPU cores game developers created a way which considered one of the most effiecent real time light rendering solution.That is,think the light in your scene as another camera which does not contain COLOR values in it but only depth values. Each light renders the scene from another point view as depth values and stores them on a texture.

On your main camara's each pixel light calculations calculated as follows(PER LIGHT)->

  • Calculates the world position of your pixel.
  • Computes the distance between the pixel on your camera and the light position.
  • If the distance between your pixel and the light position is higher than light's depth texture's corresponding pixel's depth then its blocked by an object and couldnt reach the light source THUS this pixel receives no light from that light source.

These calculations leads to a HARD shadows,fake soft shadows achieved by tweaking some values and with some blur operations.

There is something worth to be mentioned here.Its the light bounce count.Well there is no light bounce in the above solution right ? Beacause it's considered a single light bounce.

There is no way to achieve multiple bounce without having a huge performance impact.They tried to make an hardware to carry out such a workload but it didnt perform quite efficiently(RTX).

Baked Lights

Baked lights are using totally different approach.Baked lights computation model is completely same with the programs such as Blender3D,Maya which the programs used in movie industry.

Instead of rendering scene from another point of view it shoots bunch of RANDOM rays to scene and traces them.(Monte Carlo)

  • Shoot random rays to scene
  • Trace them store their interaction
  • Compute ray's interaction and give final color for the pixel on the scene.
  • Avarage the result of many rays and create a final color

If you ask why shooting random rays instaed of fixed rays.Appearently it takes too much bounces to form a desireable image when tracing a single ray to end.However if you shoot bunch of random rays to the scene and shoot more random rays when a ray intersects leads a quicker and better image quality.(This is why you get noisy image at the beginning of your baking and noisy image at first when you render a image on blender3D or maya)

And thats why baked light gives you more soft and warm image where as realtime gives you fast and crispier image.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.