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

Support for static lightmaps #11

Closed
degradka opened this issue Nov 2, 2023 · 4 comments
Closed

Support for static lightmaps #11

degradka opened this issue Nov 2, 2023 · 4 comments

Comments

@degradka
Copy link

degradka commented Nov 2, 2023

Currently, there is no way to set up static lightmaps with this importer, I thought adding lightmaps for a .bsp or .map is impossible, but Qodot has this feature implemented. Are you planning on adding this feature?

@jitspoe
Copy link
Owner

jitspoe commented Nov 2, 2023

I just added support for omni lights, but I don't have lightmap support, yet. Not sure when I'll get around to it. I'm really curious how Qodot handles it, as .map files just have the brushes. The lightmap is baked into the .bsp file, so it should be possible to extract that for this importer, but not a .map importer. Maybe it just imports the lights and bakes them with Qodot's lightmap baker?

@degradka
Copy link
Author

degradka commented Nov 2, 2023

Maybe it just imports the lights and bakes them with Qodot's lightmap baker?

I don't think so. The only thing that interrupts the lightmap baking process with your importer in Godot is that you can't unwrap the mesh for uv2. For me, on Godot 4.2beta4, I get the error message "the normals are required for uv2 unwrapping" or something similar to this error. However, if I import the BSP into Blender and then import the .blend file with the "static lightmap" checkbox checked, everything bakes flawlessly. Qodot doesn't handle lightmap baking from Trenchbroom; it simply allows the user to enable baking by unwrapping brushes in uv2, and then the user can add lightmap GI in Godot and bake. So something similar to how Godot handles importing .blend files with the "static lightmap" checkbox would be ideal.
Edit: I'm not talking about importing lightmap from the .bsp, but generating a static lightmap within Godot by using lightmap GI.
Edit 2: That might help https://github.com/QodotPlugin/Qodot/blob/main/addons/qodot/src/qodot_plugin.gd#L195

@Yagich
Copy link
Contributor

Yagich commented Nov 5, 2023

this is a 4.2beta 4 issue that will be fixed in the next 4.2 prerelease: godotengine/godot#84374

@jitspoe
Copy link
Owner

jitspoe commented Nov 5, 2023

OK, now I generate UV2's on import (but this probably won't work on 4.2 until the next beta comes out). 716fb12

@jitspoe jitspoe closed this as completed Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants