Monday, July 21, 2014

A rant against light-linking

The title says it all : I don't like light-linking. I actually hate it.

I have banned them. Some artists were chocked when I've told them that.
You may think it's a weird idea, but let me explain why.

I've used them. A lot. At the beginning of my career, not only we used light-linking, but not only per object, but per shader.
It was a nightmare.

Unavoidable at that time to keep the render times manageable, but in the process, our artist time was going through the roof.
When you start spending more time fixing a scene or just understand it than lighting it, something is wrong.
When half the tools you are using on a daily basis are coded to ease that task instead of helping you create a better work, something is wrong.

It was a long time ago (10 years worth a hundred in VFX), but I still see the infamous light-linking used on production.

On top of all the problem light-linking can bring inside your application (Maya is a perfect example of a really bad implementation), it raises many other problems.

1. It makes the scene insanely complex.

Light linking is not obvious. It's not something you can realize when you see all the lights in the view-port.
It can also be tedious to check what is affecting who.

And if you are giving your lighting scene to another artist for a shot variation, or just because you are going on vacation, and assuming it doesn't brake in the process, how much time is required by that artist to understand the relations you have created?

2. It doesn't make sense.

A light not affecting a single object or only a group of object is not logical and goes against common sense.

3. It makes the lighting, and the lighting task, more complex.

Starting using light-linking makes you use more lights, and more lighting cheats. I will get to that.


So, I've said that it's not logical. Let me clarify.

There are several things than you can do with CG and lights that have no sense if you are considering how the light "works" in the "real world".
These are some examples of things I consider very bad practices when it comes to lighting. (This is not an exhaustive list)

1. Colored shadows.
A shadow is the absence of light.
A light doesn't cast shadow. An object "cast" a shadow on another object. It's probably more correct to say that an object is partially of fully occluded by another.
So unless that occluding object is translucent, the light is stopped and scattered when hitting it. It will never reach, at least not directly, that second object.

2. Sharp shadows.
What is creating soft shadow? The size of your light.
As long as your light has a size, it can't create any sharp shadow.
And unless you are lighting with lasers, any light has a size.

3. Light Decay.
All the software allows you to change that : Constant, linear, quadratic, you name it.
You often read that quadratic is the "right one". This is why : http://www.portraitlighting.net/inversesquare_law.htm
All the others are there because of early naive implementations, and kept for convenience.

4. Diffuse/Specular only.

A light is affecting both diffuse and specular. Because it's the same thing. It was split in two components a long time ago for computation purposes. Tweaking them separately will only bring weirdness in your image (and can even increase rendertimes in a modern engine)


I've often seen 1 being used to color the shadow in blue. Because on a sunny day, the shadows are blueish, right?
That was probably a good approximation 15 years ago.
Any renderer can do GI/sky-dome/whatever how you name it, and your blueish shadow tone will come from it.
And an image without GI will look dated and wrong.

Sharp shadows were also convenient, because soft shadows were "heavy" to compute. This is not true anymore. A sharp shadow will often look fake.

Light decay is still convenient these days. But now that GI is the norm, it doesn't make sense and breaks the continuity of your lighting (because your GI engine will consider quadratic decay when bouncing light).
It's often *not* more complicated to achieve the same effect with a quadratic light, as long as you understand how the intensity plays with the distance and the size of the light.
And the overall lighting will looks more consistent.

For 4, if you understand that the size of your light will affect the size of your specular highlights, there is not purpose to play with these parameters anymore. Like light-linking, using it makes your lighting rig less consistent and harder to understand.


"You seem to refer to "real-word" lighting a lot, but in CG, we have control over anything to achieve our goal, so let's use it!"

It is true, if your goal is to create a fake-looking image.

Now that I have shocked you, here is a fact that you can't deny : Our brain is trained to see and analyze the world since the day we are born.

You probably already heard the term "uncanny valley" when it comes to replicate a human figure (real or CG).
We are used to see and decipher human expressions.

And for the same reason, any cheat in lighting seems wrong. You probably won't even know why, but you feel it.

It doesn't really matters if you are doing CG integration or an animated movie.
Sure, it's less a problem for the later. You are more inclined to accept lighting errors if the whole universe is "unrealistic".

Still, "Monster University" is a recent example of how considering light in a physical way enhance the quality of the image.

For me, a good lighter will always want to raise the bar. "It's okay because nothing looks real in the first place" is not an excuse for laziness.


But the director has a vision requiring these cheats!

And as lighters, we are the Directors of photography who must fulfill that vision.

I'm quite sure that Tim Burton had a clear, artistic vision when he did "A nightmare before Christmas".
Still, the lighting is physically correct, because, well, they are real world lightings.
The DOP used his skill to match Burton vision, and the result is still astounding.


When a challenging shot is coming in my hands, I always think "what a DOP will do in a real set to achieve that goal?"

Let's take a simple example that I've seen solved with light-linking.

We have a shot with two spheres, close to each other, and the director really wants the shadows to be in the axis of the camera, while the right one has a rim on the left, and the left one has a rim of the right.

Using light-linking:


No light-linking :


In that case, I used a big grayish blocker near each light to avoid them to affect the object I wanted occluded.

But it didn't take me the same amount of time.
It took me slightly more time to put the blockers in the right position.

But now, notice how the lights are bleeding on the floor under each spheres in the light-linking image.
That's because the other sphere is not in the way anymore to block the light. Even without seeing the "non cheaty" one, you feel that it's wrong.

So I could obviously remove the floor for these lights using light linking to avoid the issue :


Ok, the issue with the bleeding is fixed, but now the image looks dull, and the shadows look weird (you see two parallels shadows while you clearly see two impacts going sideway)

So obviously I could solve it by adding one extra light for the floor, or play with the GI settings to avoid the initial bleeding... Maybe make some ray-traced groups for GI...
Or the infamous "it will be solved in compositing" (with, why not, an additional occlusion pass?)

Wait. Wasn't it supposed to be easier and faster to compute to use light-linking?


Of course it is an simple example. And it's only true in a ray-traced engine (but when Even PRMan goes full ray-tracing..)
But can't you solve your issues with layers?
Isn't it easier to see what lights are affecting the scene on a specific layer instead of manipulating an invisible light-linking?

In any case, the director may be happy with any of these images.

I've seen that way too often : As long as the main effect he wants is in place, any weird looking artifact is "okay".

He is not a DOP. You are.

And in my opinion, that's the problem.
Lighters are often considered as underlings. And even worst, some lighters are happy being just that.
You are an artist. Your role is important. You have a vision. You are hired because of that.

You might be happy producing an image that look "okay but not great". Lot of successful movies had these kind of lighting, right?

But once you realize the "easiest" solution is actually more complicated in the long run :

  • It makes your lighting more complex (because you will always ends up compensating an effect that should be there without it)
  • Makes shots variations,
  • Debugging,
  • Or even updating a shot (some new objects that you have to light link were introduced...) more complicated
  • While decreasing the overall quality of the image.

Is it still worth it?

And even my main gripe is against light-linking, it does apply to any lighting bad practice.

No comments:

Post a Comment