-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose runtime baking functionality in LightmapGI #8
base: master
Are you sure you want to change the base?
Expose runtime baking functionality in LightmapGI #8
Conversation
42b4f43
to
c811399
Compare
Co-authored-by: Rising Thumb <[email protected]>
c811399
to
87469db
Compare
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. |
@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 |
Will have errors, but need to see it all pushed to identify the errors to fix.
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 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
#else | ||
SWAP(light_accum_tex, light_accum_tex2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should put a warning for if denoiser somehow equals 1 that the oidn denoiser can only be used in tool builds and that it will only use the JNLM denoiser.
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:
352137190-3a768b3d-a05e-4001-9207-d0ef824f93a7.mp4
Project for testing: https://github.com/sourcelocation/lightmapruntimebakingtest/
Originally made for Godot, but their latest decision lead me to contribute to ReDot instead.