Skip to main content
All CollectionsHOW TOOPTIMIZE YOUR 3D ASSETS
How to Bake Lights and use Unlit Materials
How to Bake Lights and use Unlit Materials

To use Unlit materials without losing information, baking is a good solution

Quentin Veillas avatar
Written by Quentin Veillas
Updated over a year ago

We recommend you to read Wonda Best Practices about textures before jumping into this documentation.

OVERVIEW

Wonda is an online platform that is device-agnostic, meaning that some experiences need to be optimized to run smoothly on every device. One way to achieve this is by baking the textures of your 3D room and objects.

ABOUT BAKING

To sum up, there are two types of materials interpretable by the glTF format:

  • PBR (Physically-Based Rendering) materials, which are made of shaders that the hardware will calculate and render;

  • Unlit materials that are directly applied image textures, without any more computations, which means that they both do not react to light, and are the best option for optimisation and fluidity.

After a short introduction, you'll learn how to bake textures in Blender.


BLENDER: SET UP BAKING OPTIONS

You can only bake using the Cycles Render Engine. We recommend you to use your GPU if you have a powerful one. Otherwise, use CPU rendering.

To deal with the speed and the quality of render, change the “Max samples” settings.


HOW TO BAKE TEXTURES

  1. Get your model ready with all the materials you want.

  2. Go to the “UV Editing” workspace and enter in [Edit Mode]. After selecting the object you want to bake in the 3D Viewport, select all the vertices and edges by pressing A. Then, press U to open the “UV Mapping” panel, then select Smart UV Project to unwrap your object.

  3. Use these options to avoid overlapping with the unwrapped mesh.

  4. Create an image (1k resolution is enough for small objects) in the UV Editor window and rename it. Keep the color black.

  5. Add Texture image in the Shader Editor (Shift A → Search… → Image Texture) then select it. Load the image you just created in the Images Texture node.

  6. Bake by pressing the “Bake” button located in the Properties workspace → Render Properties → Bake.

    Note: if you don’t see the Bake section, your Render Engine may still be Eevee instead of Cycles

    Note 2: if you get the above error, you may need to exit the [Edit Mode]

  7. After the bake, save the image otherwise it will be discarded once Blender is closed (even if you save your Blender session).

  8. Add a UV Map node to your shader editor (Shift A → Search… → UV Map) and link UV to Vector. Select the correct UV Map that corresponds to your baked Texture, then replace your Material Output Surface connection by your new Baked “Color” texture.


Well done ! Your baking is now complete, now you can try it by displaying the Rendered textures in the 3D Viewport and by deleting or hiding all the lights in your scene.

You can now export your work. For instance, this article explains how to import a room you may juste have baked in Wonda.

Did this answer your question?