Skip to content

Saving the scene after baking lightmaps or VoxelGI will save the lightmap/VoxelGI data as a built-in file, despite being prompted to save it to an external file beforehand #50029

Closed
@Calinou

Description

@Calinou

Godot version

3.3.2.stable, 4.0.dev (659178e)

System information

Fedora 34, GeForce GTX 1080 (NVIDIA 465.31)

Issue description

When you bake lightmaps with a BakedLightmap node for the first time, you're prompted to save a .lmbake file that will contain the BakedLightmapData. This file is correctly generated once, but once you save the scene, the BakedLightmapData will be saved built-in to the scene file, which makes it huge and slow to load/save (since binary data is converted to Base64).

This also happens with GIProbe/VoxelGI in my experieence.

Steps to reproduce

  • Create a BakedLightmap node.
  • Create a lightmapping setup.
  • Save your scene to a .tscn file.
  • Select the BakedLightmap node and click Bake. Accept the default save location for the .lmbake file.
  • Press Ctrl + S to save the scene.
  • Notice how the .tscn file becomes huge on disk (several megabytes or more). This is not as noticeable with a binary .scn file, but it'll still be pretty large.

Minimal reproduction project

https://github.com/Calinou/godot-demo-projects/tree/add-global-illumination-demo-2/3d/global_illumination

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions