Well, a lighting artist, it's fairly self-explanatory. It's in the title, but it's basically taking the environment that gets made by the environment artists and level designers and adding lighting to it in a way that represents the art director's visual target for the game, while also keeping in mind things like performance constraints, technical restraints, and also some gameplay considerations like leading the player, making sure that they have good visibility where we want them to have good visibility, that they know where they need to go if it's something like a linear level design.
TL;DRThe stream shows real-time work on relighting habs, including a new door button that dims lights into a relaxed nighttime state, which is the team's actual task that week.
Today, we're going to show the process of how we are relighting some of the habs around the PU. You may have noticed in Orison, currently on the PTU, we've got new habs there, and we've added a button by the door, which allows you to push it and basically turn down the lights. I hesitate to say turning off the lights because obviously there is still lighting there. But you basically put the hab into a state of a chill nighttime, either relaxation or sleep kind of state. What we're going to do is show how we do that process and our thoughts behind why we're picking certain moods or make certain decisions while doing that. It's something that we're doing right now. This is real-time game dev.
TL;DRThe habs aren't being redone; the aim is to add player interactivity through light groups tied to a player-usable switch, extending lighting states previously used mostly in ships.
As you say, we're not reinventing the habs. We're not changing them completely. But we've always had a desire to add more player interactivity from a lighting perspective. You've already got some things that you can interact with in your habs, and we wanted to add to that through lighting. The obvious way to do that is we've already got these tools called light groups, which allow us to basically change the state of a light based on whatever kind of logic. Traditionally, that's mostly been in the ships, like when you take damage or when you're powering up the ship for the first time, there's a low power state and a full powered state and an emergency state. And we've been, over the course of the last year or so, introducing some of those elements into locations where we feel it makes sense and where we can get the most bang for buck. And the next obvious thing was to do it in the habs, where we recently got some new gameplay entities that allow us to tie the light group into a switch which is player interactable, so that the player himself or herself can manually change the light state.
For the time being, for habitations, it's just going to be a low power state and a full power state. We're not adding too much complexity to it at the moment. We just want to get something in as a proof of concept and then see where we can expand it, where it makes sense to expand it.
TL;DRA hotkey spawns a playable character in the editor to quickly check interactions and how characters, and therefore NPCs, look under the lighting; the nauseating effect is thought to be a bug.
Z
ZachJunior Lighting Artist
We have a little hotkey, Ctrl+G, that spawns you a character and just gives you the interactions that you'd expect to have as a character. So it's just a quick way to verify how this interaction feels and how these characters are receiving light in these spaces. There are other ways that we can look at that. We have a client that we can run where you can actually have your own version of a server on your PC and do the whole process, spawn in a hab, move around, visit the entire PU. But this is just a quick way of doing it in the editor for these smaller spaces. And it looks a bit nauseating when you go, whoa.
I'm not sure what that nauseousness is when you jump into game mode. I think it's some bug which will no doubt be fixed. But as Zach was saying, the benefit of being able to jump in game like this is that we're trying to make the environment look good, but in the actual game itself, there's a lot of characters running around. And so we also have to verify that the player character looks good. And by doing that, we also make sure that any other NPCs or AI can theoretically also look their best under the same lighting circumstances. So that's something we're always keeping in mind when we light environments.
TL;DRShadows are among the most expensive parts of rendering, costing both GPU and CPU (draw calls) and growing rapidly with each shadow-casting light, so lighting is managed within an overall budget.
Everything has a cost. There's no free lunch in lighting. I don't think I even can get too technical into it because I don't really know. But every light has the option of being a shadow-casting light. And in computer graphics, shadows are generally extremely expensive, one of the more expensive parts of rendering a scene. And so whenever we use shadows, we have to keep in mind how many shadows we're using. The more that you have in the scene at one given time, it can exponentially get more expensive, and it adds a cost both to the GPU in terms of actually rendering the shadows themselves and then also a cost on the CPU for all the additional draw calls that get introduced by the CPU trying to calculate how many extra shadows have to be computed.
We generally get guidelines from the graphics department, again, mostly because lighting is almost purely a graphics side of the equation. So the graphics department gives us a set of budgets to stick within, and that's the number of overlapping shadows that you can have on screen at any given moment, like two shadow-casting lights next to each other, how many lights in general make up the overall scene that you can render on screen at one moment, and stuff like that. We basically just have to stay within those boundaries. And then we also have to allow for a certain amount of overhead for unknown light sources, basically. Because again, this is a big multiplayer game. Glow sticks, flashlights, ships, all of these things can, depending on the location, be introduced to the location. And then that just adds on top of that budget.
TL;DRConfined spaces like habs and shops allow a bigger lighting budget, while outdoor places like Orison need constant rebalancing because adding one light can duplicate across many identical platforms.
Yeah, exactly. These kinds of examples, we generally love working on habs and shops and stuff like that because not only are they very self-contained, so you can do a lot, but as you said, because they're very confined environments within a culling volume, we can spend a lot more lighting budget really making it look as good as we envisage it. Whereas something like Orison and outdoor environments in general, there's a lot more variables at play that always have to be rebalanced. So when it comes to lighting somewhere like Orison, there's just a constant process of iterating. You make a bunch of changes. Those get populated because there's so many different platforms which are duplicates of each other. So if you add one light, you could end up adding 500 lights to the overall scene of Orison. Then we have to balance using our various optimization methods to keep our numbers within a certain range.
Well, it can happen. Absolutely. And it's always pretty devastating because it's like you've got to hack away at your baby, take off some limbs and hope that it still is pretty. But sometimes that's just the cost of things. It all comes down to weighing up where we want the budgets to go. So in a small environment like this, where there's not so much VFX, for example, if we wanted to or if there was a decision made, you could push some more of the lighting budget in towards the VFX budget because they're not using it. The ultimate goal is always to get a certain frame rate, and every department has their own little budgets to fit within that. But if some departments don't exist in a location, then we can just creep in there a little bit.
No, I don't think so. I'm on good speaking terms with Mike, as far as I know. He may feel differently. But no, we work quite closely with the VFX team on some of the volumetric particles that they were adding onto the industrial platform. I think there were some improvements to the way that particles are lit and how they receive light and cast shadows that was added a little while ago. And so there was a bunch of VFX added to the industrial platform. And so we had to work together to make sure that their VFX looks really good, and also that we show off how nicely the shadows cast through and how we couldn't really do that before.
TL;DREach light needs its transition set individually, which gives fine, powerful control but takes a lot of iteration to make the transitions feel natural for the type of light.
Z
ZachJunior Lighting Artist
You do have to do it for each light. But it does mean that, like Chris was saying, you have a very fine control and it's quite powerful in terms of if you have a vision for exactly what you want to do and you know how to do it, you can get some quite interesting complex transitions. Not that I can do that right now.
It's a lot of iteration time figuring out what feels natural. It's a balance between what feels natural for how lights would behave, what type of light it is, if it's a compact fluorescent, which slowly flickers before the power comes on, something incandescent where it has to burn for a little while before it reaches its full brightness, that kind of stuff. It takes a bit of iteration to go back and forth, and you test the animation, you test the transition, you see if it feels right, you find what elements don't feel quite right, and you go and you tweak them a little bit.
Yeah, unfortunately, the light groups only handle technically four states, so off, default, auxiliary and emergency, because the feature was initially designed for ships specifically. So even though the nomenclature of auxiliary and emergency doesn't always match up to what we're doing with the light states, we're kind of bound by those four states for now.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.