Lighting in Godot – Complete Tutorial

Unleash the full potential of your game’s visuals with our in-depth guide on mastering Godot light techniques!

Lighting is an important part of games – not just allowing players to see the game world, but changing the entire feel of the game. In this tutorial, we are going to learn about Godot lights by setting up a player character lamp. Enhancing the game’s look and feel, the lamp will project light — switching a boring floating light to a more attractive and immersive detail. We particularly delve into utilizing a 3D lantern model and implementing bloom or glow effects for a realistic play scenario.

You are expected to know the basics of the Godot engine for this tutorial. If you’d like to learn more about the application of lighting, you can also explore our full course, Create a Horror Game in Godot 4 which in-depth covers how lighting can be effectively used while building a horror game.

Let’s get started with our Godot light example!

Project Files

While you can create your own assets in this project, we have included the 3D model for the lantern used in this Godot light tutorial for you to download below (along with some bonus assets).

Download Project Files Here

CTA Small Image

Player Lantern

As mentioned, in this tutorial, we will be setting up a lamp for the player’s character in the Godot game engine. The lamp will be an object held by the player’s character to emit light. The process involves creating a 3D model of the lantern, adjusting its position and size, and making it appear as if it’s emitting light through the use of glow or bloom effects.

So let’s get started with this simple way to learn how to work with the Godot light system.

Setting up the Lamp

First, we need to open up our player scene. This can be done by clicking on the player in the main scene and clicking on the icon where it says “Open in editor”.

Player node in Godot with Open in Editor button hovered over

With our Player node open, we can start editing it for our lamp. Right-click on our camera, add a child node, and create a node 3D.

Node3D node being added to Godot camera as a child node

Rename this node to “lantern”.

Lantern as seen in the Godot Scene Hierarchy

Make our omni light 3D a child of ” lantern” and set its position to zero. This will be our main Godot light.

OmniLight3D as a child of Lantern in the Godot Scene Hierarchy

OmniLight3D node in Godot with transform set to the 0, 0, 0 position

Select ” lantern” and move it forward (so our first-person player can slightly see the lantern).

Lantern moved slightly forward from player within Godot

Add a 3D model as a child of ” lantern”. This model will be our lantern, and you can find it in the models folder as “Lantern.obj”.

Lantern object added to the Godot scene from the object in the FileSystem

Set the lantern model’s position to be 0, 0, 0. Adjust its scale down to around 0.15 to make it appear smaller.

Lantern Node3D inspector properties with Transform and Scale circled

Apply the “lantern glass” material to the lantern model.

Lantern Glass material as seen in the Godot FileSystem

This can be done by going to the inspector, selecting “surface material override”, and dragging the material onto the middle slot.

Lantern's Surface Material Override as seen in the Godot inspector

Adjusting the Lamp Position

Once the lamp is set up, we need to adjust its position relative to our player’s view. This can be done by repeatedly pressing play, observing the lamp’s position, and tweaking it until it’s in a satisfactory position. There is no right or wrong, as our Godot light will work wherever you decide to put it. Position your Godot light for the aesthetics you want.

Lantern positioning as seen from the first-person player perspective in Godot

Making the Lamp Emit Light

To make it appear as if the lamp is emitting light, we need to adjust a few settings. Select the lamp, go to its geometry settings, and set “cast shadow” to off. This will prevent the lamp from casting any shadows. This can also give your Godot light a slight performance boost if you’re on a lower end machine.

Godot Inspector for the Lantern with Cast Shadow property turned off

Select our omni light 3D, go to the inspector, and under the light dropdown, increase the size property (we used 0.228). This will increase the minimum range of the Godot light.

Light3D properties in Godot with Size value increased and circled

To make the Godot light seem to glow, we need to enable the glow effect. In our main scene, select our world environment, find the glow dropdown in the properties, and enable it. Change the blend mode from “soft light” to “additive”. This will make the light appear brighter. Adjust the strength of the glow effect as needed. In this tutorial, a strength of 0.7 was used.

WorldEnvironment Node in Godot with Glow, Strength, and Blende Mode properties circled

You can also adjust the brightness of the Omni light for a more moody effect. In this tutorial, the brightness/energy was set to 2.

OmniLight3D properties in Godot with the Energy value circled

And there you have it! With these steps, you should be able to set up a lamp for your player’s character in Godot.

Final lantern in Godot project after previous steps

Godot Light Techniques Wrap-Up

This brings us to the end of our Godot light techniques tutorial! You have now gained knowledge on creating an appealing lantern for a player’s character in Godot to make your lighting more dynamic. Furthermore, you learned how to adjust the lamp’s position and size, and how to apply a glow or bloom effect for a realistic light emission. This exercise not only contributes to your technical skillset but aids in boosting the appeal and in-game atmosphere through more intricate details.

For those with broader interests, Zenva also offers a comprehensive list of diverse courses covering different aspects of game development – from FPS and RPG game constructions to cross-platform programming.

Hope this tutorial served you well, and blossomed your intrigue in the gaming development ecosystem. Eagerly waiting to see where these new skills take your future projects!

Curious to dive deeper? Enroll in our comprehensive Create a Horror Game in Godot 4 course now.

Did you come across any errors in this tutorial? Please let us know by completing this form and we’ll look into it!

Python Blog Image

FINAL DAYS: Unlock coding courses in Unity, Godot, Unreal, Python and more.