Back to search
Star Citizen Live ·
Published on this date.2020-09-04
· 16 Q&As

Star Citizen Live: Let There Be Light

A lighting artist explains how environment probes (cubemaps) provide ambient light in Lumberyard, and why ray tracing isn't used yet. They cover light budgets (under 280 lights on screen), shadow-casting lights, auto exposure and EV, and cinematic versus PU lighting.

Transmission log

Full answers

Let's talk a little bit about what a cubemap is, because a cubemap is incredibly important to lighting in the Lumberyard Engine. Just introduce us to the concept of cubemaps.

TL;DRA cubemap, or environment probe, captures the surrounding light as a texture from a point in all directions and reprojects it as ambient light, forming the fundamental base of interior lighting, which would otherwise be pitch black.

Chris CampbellLead Lighting Artist

The cubemap or the environment probe is the absolute fundamental part of our lighting workflow. Without it, we've just got basically a pitch black interior. It's pitch black because it's all interior and hidden away using vis areas and stuff, which basically means that you start from absolutely zero lighting. And what an environment probe does is you place kind of like an area of effect. In this case, these are all kind of cubes with a little bit of softness on them. And what they do is they capture what's called a cubemap, which is just a texture which is captured from, imagine that each one of these has a little camera pointed in all six directions of the cube. It takes a screenshot and then reprojects that ambient light into all four directions. So the more that you have, theoretically, the more detail you can get in your ambient lighting. These are generally approximations. So for example, on this side of this bed over here, it's actually receiving the light from this cubemap. So if I turn that one off, then it gets more lighting from this cubemap and vice versa.

Star Citizen Live·
Published on this date.4 Sep 2020
Art & graphics

That's what a cubemap is, but why do we need cubemaps? Why are cubemaps necessary?

TL;DRWithout ray tracing, cubemaps provide ambient lighting that accounts for occlusion from windows, ceilings and floors, giving interiors darker contrast against the exterior and letting outside brightness spill in, unlike a uniform ambient value.

Chris CampbellLead Lighting Artist

Well, without them, and unfortunately still not having any ray tracing or something like that, you need ambient lighting in the game. A long time ago, you would just have a consistent ambient value, which would be some kind of gray or blue or taken from the sky color, so I don't know, some kind of orange. And that would just be projected throughout the entire world in a uniform way. But cubemaps allow us to account for occlusion based on the window, for example, or the ceiling or the floor, which makes things then appear darker, which gives you more depth of contrast between the interior, which is nice and dark here, versus the exterior out there. And the brighter it gets outside, I'm not sure how easily some of this will pick up on stream, but the brighter it gets on the outside, the cubemaps will recapture. And then you'll get even more light spilling in. So if we don't have any lights at all, you get already this nice base ambient lighting look. And if you want to actually see the cubemaps, I can turn on this little debug mode and I'll turn off the screen space reflections. So this is basically all of the materials just turned into a glossy kind of chrome mirror, for example. And this shows you what each of the cubemaps' reflection maps are picking up. So obviously towards the windows, you're getting a lot of this exterior lighting. And that's getting reprojected into the room. So when I turn it back on, you can see these highlights coming in on the more reflective surfaces. And this is without any additional lighting whatsoever. So this is just the base kind of ambience.

Star Citizen Live·
Published on this date.4 Sep 2020
Art & graphics

We know the current hotness in video cards is ray tracing and stuff like that, but not everybody will have a card that's capable of doing ray tracing.

Chris CampbellLead Lighting Artist

No, exactly. It's an extremely intensive, graphically heavy process. And I think it's still a ways out for a lot of game development, but obviously something that we want to explore at some point for sure.

We'll have a couple of unique challenges. We'll have to figure out how it works with a 360 degree fully realized planet and all that stuff. So we'll have some challenges maybe some other folks may not, but it's definitely something that we intend to pursue. But in the meantime, environment probes.

Chris CampbellLead Lighting Artist

In the meantime, we've got cubemaps and environment probes, and that's good enough for 95 percent of cases.

Star Citizen Live·
Published on this date.4 Sep 2020

You mentioned performance very casually there, but there's always this ever-looming shadow over everything you do where you have to resist the urge to go hog wild, but at the same time one of the tenets of Star Citizen is always pushing the envelope as far as we can. How do you balance that?

Chris CampbellLead Lighting Artist

Exactly. I mean, as you say, we're certainly not shying away from expensive lighting setups and pushing the boundaries there. But at the same time, obviously, we want people to be able to run the game at a somewhat decent frame rate. So when we're building our lighting for environments, we always just try and keep in the back of our mind some rough guidelines of how many lights we can use, how many shadow casting lights we can use, and how many lights are overlapping in the scene at any given moment. And those are just things that you feel out as you work on the project a little bit more. I've got some numbers in my head, and it's more a habit at this point, so I just try and stick with it.

Star Citizen Live·
Published on this date.4 Sep 2020

You mentioned shadow casting lights. The existence of a shadow casting light implies the existence of lights that don't cast shadows?

TL;DRYes, most lights (roughly 80%) don't cast shadows; key lights cast shadows while subtle fill and bounce lights don't need to, because performance limits force scaling back from the ideal of shadows everywhere.

Chris CampbellLead Lighting Artist

Yes, exactly. So for example, especially for demonstration purposes, we want it to look as good as possible. So I'm turning on shadows quite often. But probably, I guess, 80% of the lights that we're placing generally don't cast shadows. And the basic thought process there is that if it's some kind of ambient light or it's just acting as a fill for the environment, you don't always need to have shadows turned on. For example, let's say that this was quite bright. Let's make it a little bit brighter. This is again one of those things where, when you don't have ray tracing and the methods that offline renderers use, you have to fake a lot of things. In this example, there's no bounce light coming from this light here hitting the floor and then shining back up. If I turn it off and on, there's no difference in this part of the frame. What we'll do sometimes is we'll add a bounce light or a fill kind of light. And in this case, I'll just extend the bulb a little bit so it's a bit softer. I'm thinking that I want the light source to be about as big as the cone of this light hitting this pile of dirty laundry on the floor. So I'll bring that down to about there. And then lighting is pretty much all about ratios. So it's all about how bright is your key light and then how bright are the subsequent bounce and fill lights and that kind of stuff to create contrast in your scenes. So right now this fill light is just way too bright. So I'd bring that way down, and probably even more than that. And so now it's very subtle, but it just adds a little bit of that greenish light bouncing up into the ceiling and against these areas. And this light, because it's so subtle in the grand scheme of things, it doesn't need shadow casting, to go back to your initial point. Key lights, shadow casting. Fill lights, no shadow casting.

It's always a hard balance, because in an ideal situation, of course, every single light would be shadow casting and ray tracing would be on everything. You take it to the point of looking awesome, and then you often have to scale it back by degrees to get to the point where it's performant.

Chris CampbellLead Lighting Artist

Yeah, exactly. I mean, obviously, we try and replicate the real world as much as possible. And in the real world, I'm not sure I've heard of a light source that doesn't cast shadows. That would be interesting. So that's obviously the goal. But then the realities of computer graphics tend to get in the way of that sometimes.

Star Citizen Live·
Published on this date.4 Sep 2020
Art & graphics

You're talking about the recently updated runtime probes [when refreshing the cubemaps]?

Chris CampbellLead Lighting Artist

Yes, exactly. All of these probes are set to be runtime, so I'm not manually rebaking them. But sometimes I'll just select them all and hit refresh to force them to update in case they're not updating fast enough for my tastes.

Star Citizen Live·
Published on this date.4 Sep 2020
Art & graphics

What is the exposure control in a scene? If you brighten it up a few stops, does it change the scene much? Do we control exposure?

TL;DRArtists don't control exposure directly; they control it through lighting brightness while an auto-exposure system balances the range, and there is no per-room exposure control, which avoids extra tweaking time and bugs.

Chris CampbellLead Lighting Artist

From an artist's perspective, we don't control the exposure itself directly. We control the exposure through how bright we make our lighting. In the background, we have this auto exposure system, which has a maximum brightness range and a darkness range, and then it tries to strike a balance in between. So I've got these buttons up here which will let me force the exposure to a certain, almost like an f-stop, but it's actually an EV value, an exposure value. So this, for example, I've got it locked to an EV of 10, which works fine outside, and then once you get inside, the darker areas start getting really, really dark, almost pitch black. And so without it, the auto exposure can kick in and then lift those areas. That's how you get blown out outdoors. Then when you're outside looking in, you'd get darker looking interiors from a distance until you enter them. That's how we work with our dynamic range, but we don't actually have any individual control, like say if I wanted this room specifically to be a certain exposure brightness, I don't have that control. Which is fine because we have so many locations in our game. Having that extra level of control just means more time tweaking, more opportunities for bugs to appear, that kind of stuff.

Star Citizen Live·
Published on this date.4 Sep 2020
Art & graphics

I know Star Citizen and Lumberyard support HDR, like high dynamic range monitors. How does that affect your work? Does that play a factor in how you light a scene?

Chris CampbellLead Lighting Artist

Not so much, actually. The HDR system is a back-end graphics system which will... I mean, I don't know the technicals, so you'd have to ask someone like Ali. But basically, it's all behind the scenes. So it takes whatever we've lit, and then it pushes things in certain directions to work for HDR.

Star Citizen Live·
Published on this date.4 Sep 2020
Art & graphics

As you work, how many times do you have to go back to the environment artists or the prop artists and ask for a light here or there so that you can motivate your design decisions?

Chris CampbellLead Lighting Artist

Yeah, that's usually something that we try and do as early in the process as possible. So the environment art team will block out a location and then we'll come in and set up our cubemaps and all the technical basics. And at the same time, try and think about where we want our key lights to come from and if we need to request any changes to the geometry or the layout to accommodate that, then that's usually the best time to do it. Because later on when art starts getting final, it gets a little tight to request these kinds of changes.

Star Citizen Live·
Published on this date.4 Sep 2020

Do you know what albedo means?

Chris CampbellLead Lighting Artist

You're putting me on the spot there. I don't know what the origin of the word is. I assume it's Latin or something. I mean, the albedo itself is like an index for how much light a material reflects from its surface. But the word itself, I don't know.

Star Citizen Live·
Published on this date.4 Sep 2020
Art & graphics

Earlier in the show, you said you had some numbers in your head when we were talking about performance. Is there anything you can share? One of the questions from chat was asking if you had a percentage quotient that you aim for when doing something like this.

Chris CampbellLead Lighting Artist

Sure. I mean, in terms of lights that we have on screen, our general rule of thumb is to keep it, well, not around, but under 280 lights on screen at any given moment. And you may think that that's a lot, and how would you ever get to that kind of number? But especially in a sci-fi game, almost all light sources are man-made light sources. And you've got spaceships, which all have lights built into them, and you've got players running around with their flashlights, and all of these kinds of things add up to that total. So we actually hit that limit frequently, and we hit it hard.

Star Citizen Live·
Published on this date.4 Sep 2020

And when you said 280 lights, that's on screen at any one time? So that's not even in a scene, it's just wherever a person can look?

Chris CampbellLead Lighting Artist

No, exactly. That's just in this camera frame. So there could be another 280 lights behind me. But as long as it's only in the frame, then that's kind of good. So some environments, like big city locations and stuff, the total number of lights in that location could easily exceed 1,000 or 2,000 lights that we actually end up placing. And then we use as many tricks as we can to keep that number down per frame.

Star Citizen Live·
Published on this date.4 Sep 2020

We've had some questions about the aspect ratio you're working in. This looks like 21:9?

Chris CampbellLead Lighting Artist

Yeah, something like that. It's an ultra-wide Asus Predator.

Star Citizen Live·
Published on this date.4 Sep 2020
Art & graphics

Is there an advantage for your workflow to work in ultra-wide or is it just something you like?

Chris CampbellLead Lighting Artist

Initially, when I first got it, it took a little bit of time to get used to having such a wide screen, because I like having more vertical space as well, especially when you start having all these properties to adjust. You can never have enough vertical space. But the more that I've worked with it, it's definitely absolutely awesome for having just a massive viewport that you can work with. And at the same time, the more cinematic you want to get, obviously the wider the screen, and then it just makes it really easy to get those cinematic angles and wide letterbox moments. So that's good. But definitely what helps more is a second monitor, which is not being shared at the moment, where I've got just toolbars and other tool windows. It would be impossible without a second monitor for sure.

Star Citizen Live·
Published on this date.4 Sep 2020

As a follow-up to your 280 light source question, do VFX and other intermittent light sources like that count against that number?

Chris CampbellLead Lighting Artist

They would. [If VFX] was doing something like, for example, fireflies, and they had light sources that they were giving off, that would all count towards that limit. What I don't know, though, is if there's a difference between GPU particles, if they were casting lights, versus the light entities that we place, if that runs through a different system or not. But I would guess that they all follow the same budget.

Star Citizen Live·
Published on this date.4 Sep 2020

Now, as we demonstrated before, you're setting your lights now and getting the lights you want, and then you'll find fixtures?

TL;DRCinematic lighting differs from in-game lighting because players can view characters from any angle, so game lights must be motivated by the scene, and a cinematic rig would have to be redone, though sci-fi allows unusual light placement.

Chris CampbellLead Lighting Artist

Yeah, exactly. I mean, in this case, maybe I'm doing something for a cinematic. So the pipeline or workflow for lighting a cinematic is very different from what we would do in the PU. What we try and do is make our characters look as good as possible all the time, but the difference between a movie and a game, the primary difference obviously, is that you can move around, you can come at a character from any angle, and therefore the artist doesn't really have any true control over how the character looks. In a movie, everything is set up very, very specifically in every single shot, and lights don't generally make sense. They're just placed in space around, reflected, that kind of stuff. For lighting a game, if this was a game character that we were doing, this light rig probably wouldn't work, and I would have to unfortunately kill everything I've just done, weep a little bit and then start again. And in this case I would try and find a way to motivate that light from the scene, so I'd pick a direction, so maybe he's got some lights hanging off of his thing here, and then I'll try and see if I can make something like that work. This gives him a bit of a mysterious, don't-want-to-mess-with-him vibe. And then again, luckily, because it's a sci-fi game, we can justify having lights in places where most people wouldn't actually put lights. So if I put a light on the floor, like how I had in the original lighting setup, you can have something down here, and now, if this was in-game lighting, it would be a little bit closer to something like this. And then we can tweak things a little bit more. We just have a little bit less of that really fine control. Specifically with putting in an eye catch light for the specular highlights on his eyes, that's a lot harder to motivate in an actual level design sense of lighting.

Star Citizen Live·
Published on this date.4 Sep 2020