Skip to main content

Setting up lighting.

Intro

In this page we will be covering 2 important things about lights, The lights themselves and skyboxes

But before that you must know a few things.

  1. ULTRAKILL shaders are vertexlit, meaning that lighting is spread by faces, thus the more vertices your object has, the more smoother the lighting will be, at the cost of performance.
  2. Due to the previous point, what you see in the editor will never be the same in the game, you must see for yourself.
  3. Due to how the shaders were coded, If a object is affected by more than 8 lights it will begin to flicker.

Heres how lighting looks like the in editor (left) vs in game (right)

Lighting in game
note

Do note that when creating custom materials or textures, always set their shader ULTRAKILL/Master! If you use the standard Unity shader it will look bad.

Creating light sources and their different use cases

To create a light source right click in the scene menu, hit light and choose what you need.

Creating light
  1. Point light
Point light
This object speads light around itself in a certain radius. This is the usual way of creating lighting in ULTRAKILL.

  1. Spot light
Spot light
Lights up an area its directed into, just like its real counterpart.

  1. Directional light
Directional light
Simliar to the sun, it casts its light globally across the entire level, it can be used to light an entire level (might make it look bad) or a simulate a very strong light in one direction.

Lighting up the level

As it has been said above, ULTRAKILL uses vertexlit shaders. Thus for a high quality lighing, it is recommended to subdivide walls and floor one time. However, depending on the enviroment and atmosphere that you are creating, more or less subdivisions are needed to be made. For example, if there is a single light source in a dark room, you can subdivide the lit floor 2 times, and not subdivide the walls at all.

[IMAGE PLACEHOLDER]

warning

Excessive amount of subdivisions will cause poor performance in your level. Even if it runs fine on your PC, it may lag on lower-end computers.

Skybox

To add a skybox from the orginal game, go into ULTRAKILL Assets/Materials/Skyboxes and simply drag a material into the scene.

[IMAGE PLACEHOLDER]

In case you want to add a custom skybox, in the project explorer, right lick, click on Create and select Material. Set the shader of the material to Skybox/Panoramic. Then simply drag the material into the scene.

Shaders for skyboxesShaders for skyboxes
tip

You can change how the skybox affects the lighting in the level via Intensity Multiplier, setting to 0 disables the skybox from effecting the lighting, This field can be also used to create Fog in your level.