-
Notifications
You must be signed in to change notification settings - Fork 3
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
windows 10 BUG: File queued for import, but can't be imported! #2
Comments
Hmm, it is just possible that this is a path issue, windows can have slightly different paths to linux (which I'm developing on). I'll try and take a look! 👍 Also is the final lightmap file created, i.e. can you see a png or exr file that has been made where you set the output files? (You need to set the filenames for the output files in the LLightmap inspector, I'm assuming it would error out earlier if these were not set). I'll also try and test this in WINE. |
there is an empty lightmap file |
Ok. I'll try and work out what might be happening. 👍 |
I will be grateful for your help because your addon is only way to have packed lightmaps in godot<4 (i dont want to have 1000 map files at my project :) ) |
Yup, I probably wouldn't have made it if the core lightmapper did all this. Necessity is the mother of invention! 😄 Don't worry we'll get it working for you! Also if you can attach a minimum reproduction project that will help me find out why it isn't working for you. |
Ok a simple test works for me creating a lightmap in WINE so it's probably something in the inspector settings / the level file that isn't set up right. This is not your fault as a beginner, it is something I need to make sure there are helpful error messages for at every stage to guide you. If you can zip up a small project that you are trying to lightmap this will enable me to pinpoint the problem, but the process should be roughly as follows: Level sceneCreate a scene for your level, call it 'Level.tscn', store it in a folder 'Level'. Just create a box mesh instance under a spatial for this scene, and make sure the box is set to 'use in baked' in the mesh instance -> geometry section of the inspector. Main scene
LLightmap inspector settingsSet up all the links to nodepaths and files that are needed in the LLightmap inspector.
Create a folder 'Lightmaps' to store your lightmaps in your project directory (this isn't necessary but should make things clearer).
In UVUnwrap section:
Unwrapping
Lightmapping
Examine to see if the Combined.png has been created. As well as creating the lightmaps you would need to set appropriate shaders to use the lightmap, but this should be all that is needed to create a first lightmap. |
ok, still don't works, grab that simple project: https://github.com/beetbeet/godot-llightmap-testscene.git also tehre is no way to set name for combained file (there is an error request: "Alert! Must use a valid extension." |
Ah maybe there is some usability issues there, or something peculiar to windows. The combined file should have a .png or .exr extension (probably .png as I haven't tested .exr in a while!). |
sure, but there is no problem with that name setting, please look at my minimal project |
i am trying to do every step as you with my scene and i have godot hangout after press bake lightmap (last step) |
There very probably is a bug and it might be windows only. I'll try your testscene. 😁 |
I keep my fingers crossed that you will help me, your extension would make it much easier for me to develop my game |
Getting there. There were a few things in the setup that weren't right, and there was a schoolboy error in my texture reading code (for reading the texture for the light bounces). Sorry you will have to bear with me as only the very first users are trying it and there will be some initial bugs. I'll fix it and see if I can get it working then put up the modified files and also a fixed build of titan. 👍 😄 |
if you manage to improve and create a new build under windows, I will be happy to drink beer with you via skype ;) |
There seemed to be 2 suspect things, first you were using the proxy scene. Don't worry about that file it is an intermediate for debugging, I should probably auto remove it. Your UVmap file was not set (this is far down in the inspector in the UVMap section for LLightmap). Perhaps I should add this to the files section to make it more obvious, yes I think I will do that. And also as you say your combined file had not been set, so it had nowhere to output. At the moment you have to manually add the extension (png or exr). I guess this is because in the godot selection box it can have either extension so maybe it can't add one for you automatically. I'll have a look and see if this can be made more user friendly. I'll see if I can upload the fixed project here. godot-llightmap-testscene-master-fixed.zip What I will try and do this afternoon is make a demo video showing the whole process step by step, that should make it easier. But these are great areas you have pointed out I can improve the user friendliness. 👍 |
great, it works but it also destroys scene structure (take a look at double collider nodes etc) in unwrapped scene and i need to manual add baked lightmap to every material |
in yours version of my project when i move a light somewhere and try to bake again lightmap i have in console error: "Saving EXR failed. Error: Cannot write a file", but it looks that lightmap is baked |
Yes it has to rebuild the meshes from scratch. I'll see if I can do this without affecting the scene structure that you have (this has not been a priority so far as it's just been at the getting it working phase! 😄 ). Yes the lightmap texture needs to be set on the materials, I've so far been only using a few materials (and it only needs to be done once, save the materials and they are used on all meshes that use those materials). This can be automatically assisted though if needed. |
Ah yes, I hadn't noticed that. I don't think it is a problem, it's just a historical thing, I'll remove the warning. It's probably because you are only baking a lightmap and not AO and the original version expected both to be baked at the same time in all cases. |
Yes, just to make clear, in order to add UV second layer mapping to all objects, they have to be made unique, i.e. any shared scenes in your original level file become separate meshes. This is common in most lightmapping solutions (and also happens with gridmap in the core lightmapper I believe). The UV mapping process (xatlas) doesn't just add UVs, it actually adds and deletes geometry in order to create the seams required for UV islands. So the number of vertices before and after mapping will not necessarily match. But hopefully what you see on screen should match. For this reason, you should be maintaining the original level file for editing, and only producing and lightmapping the uvmapped level at the final stage. There's no easy way around this in a module I don't think. For the material, all I had to do was double click the material in the project tree, and drag the lightmap texture into the parameter slot and save, and it was applied to all the meshes that used that material. Also I noticed there seemed to be some duplicate faces in the level, i.e.
Duplicate faces will be accepted but you'll tend to get rendering errors because the ray tracer can't decide between them. |
great, i will test it, thank you so much |
Turned out I'd simply made a mistake set the wrong filename in the LLightmap inspector, and that folder didn't exist hence why it wasn't writing the intermediate EXR file. This isn't a problem when just baking lightmap, but would be a problem when merging (as merging uses the previous intermediates rather than creating them each time). I'll try and put a more helpful error message just in case this happens again. 😃 |
Your add-on is an absolutely essential tool for someone who is currently creating a 3d godot game, like me. Only thanks to you you can have your lightmaps packed into atalases instead of a few thousand files. Thanks a lot and I keep my fingers crossed that you will develop your add-on. It will take a lot of time before the stable version of godot 4.0 comes out and I still don't know if it will support simpler devices, i.e. the current gles2 mode, which I just need to use. |
Your feedback has got me to add proper error checking now for wrong inspector settings for files and nodepaths. Now if the files cannot be written or loaded it will give a message box with the filename and a suggestion to check whether the folder is present. It should be in the next version. 👍 It also similarly checks the dimensions of loaded lights and AO intermediate files when merging, if they don't match it gives message box. Also I made a video tutorial for making the simplest lightmap to get started: It is not very amazing but hopefully better than nothing. I will try and make a better one in time with a voiceover. 😃 |
Hello,
I am trying to use your build godot_titat_editor_013_win64, after settin uvmaps and trying to bake lightmap i have these errors:
The text was updated successfully, but these errors were encountered: