Skip to content
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

Add note about LightmapGI only baking nodes under its parent #99079

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

FlooferLand
Copy link
Contributor

@FlooferLand FlooferLand commented Nov 11, 2024

LightmapGI's documentation currently doesn't mention the fact it only bakes nodes under its parent.
This can make the user think there is something wrong with their scene setup or 3D models, as it refuses to bake when the user's models / world isn't under the same parent as the LightmapGI.

I personally encountered this issue because I tried adding a LightmapGI underneath a blank node called "Environment" under which a WorldEnvironment was also present, and the LightmapGI complained about having nothing to bake.

Made for the godotengine/godot-docs#9694 issue
Linked PR: godotengine/godot-docs#10247

`LightmapGI`'s documentation currently doesn't mention the fact it only bakes nodes under its parent.
This can make the user think there is something wrong with their scene setup or 3D models, as it refuses to bake when the user's models / world isn't under the same parent as the `LightmapGI`.
@FlooferLand FlooferLand requested a review from a team as a code owner November 11, 2024 16:46
@AThousandShips AThousandShips added enhancement documentation cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release labels Nov 11, 2024
@AThousandShips AThousandShips added this to the 4.4 milestone Nov 11, 2024
@AThousandShips AThousandShips requested a review from a team November 11, 2024 17:21
@jcostello
Copy link
Contributor

Meshes or its the same for lights?

@mhilbrunner
Copy link
Member

LGTM. Just merged the corresponding docs repo PR.

@FlooferLand
Copy link
Contributor Author

@jcostello Meshes or its the same for lights?

Sorry for the very late reply!
The LightmapGI node only looks at nodes underneath its parent, its the same for all types.
I believe this was done so you could have several separate lightmaps in the same scene (which is neat!)

For a more in-depth explanation:
The editor calls the bake function via _bake_select_file and provides either the LightmapGI or the LightmapGI's parent as the node to scan from. The bake function then calls _find_meshes_and_lights which is a recursive function that gets all the children of the node thats passed into it

@Repiteo Repiteo merged commit ed443cc into godotengine:master Nov 27, 2024
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Nov 27, 2024

Thanks! Congratulations on your first merged contribution! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release documentation enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants