Open sourcelocation opened 1 month ago
By the way, could it be used except the case for procedurally generated levels? Like the way to calculate rarely changing dynamic lighting for breakable light sources? E.g. Thief clone, but you have many lights that give indirect lighting, and when one of sources is broken, a lightmap for small part of level is rebaked. Basically raytracing, but at slow speeds.
@Capewearer I don't see a reason why not! I'm personally already using it for user generated content, and it works perfectly.
While we're at it, how hard would it be to add a way to overlay dynamic lights onto a lightmapGI'd surface? Specifically one that's been baked using the "all" bake mode? There are other engines that can mix static baked lighting with dynamic lights (mostly older ones from back when that was more necessary) so it would be nice to mix dynamic direct lighting and static baked lighting in godot as well. Currently I'm pretty sure you can only mix the two if no lights in the scene are set to bake all
Still no merge?
We've been a little busy with the rebranding and preparing a 4.3 release, while I would prefer to try sending PRs upstream to Godot first and see if it languishes or is rejected first, if you feel you don't want to submit anything to Godot in that case, then we'll see about implementing it and minimizing the chance of merge conflicts when we merge the master branch from Godot.
Awesome. The latter option sounds way better to me 👍
Hi ReDot community 👋
This PR implements
.bake()
for script usage on LightmapGI.Implementation notes:
module_lightmapper_rd_enabled
build parameter has to be enabled for runtime baking to workmodule_xatlas_unwrap_enabled
, build parameter has to be enabled for runtime unwrapping to workDemo video:
https://github.com/user-attachments/assets/542a1b5e-07b9-4b0d-a7df-668516359543
Project for testing: https://github.com/sourcelocation/lightmapruntimebakingtest/
Originally made for Godot, but their latest decision lead me to contribute to ReDot instead.