-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Generated UV2s are not saved #32746
Comments
I have the same issue, also with .obj models. Did it work in other versions of Godot? This bug makes the generate-lightmap-uv function essential useless :( |
Same problem here in Godot 3.2.2 Beta #39134 (from 8 June 2020). Not using .OBJ files. OS/device including version: UV2 seem to be stored in memory only. They don't appear to be stored in the scene, which is why the tscn file is not marked as modified (no "*" appearing on title). Generating UV2 and reloading tscn; UV2 are there (save or no save). Restart Gogot; UV2 are gone. Maybe this is by design? The baking will still work but the user needs to remember to generate UV2s before every bake. |
Doh, I stumble on the same issue, thanks for writing this bug report. I noticed that something else also gets broken after generating UV2. Because the material is not loaded after generating UV2 and saving. Unfortunately this makes it impossible to use this feature currently. I wonder if this will change with Godot 4.0. As rumours tells me it will get a new light mapper. Does anybody use authored UV2s? Is that working better? |
This should already fixed in the The current lightmapper in 3.2.3 is pretty broken, I wouldn't rely on it in general. |
You can author UV2s in blender / other modelling packages. But you can't import them as obj, as it only supports 1 uv channel, you will have to use another format (e.g. dae). This can work if you are e.g. building a level in blender. But if you are constructing the level out of objects within godot, it might not work well. You can also do uv mapping with LLightmap if you are prepared to use a module, depending on what you are trying to do: |
So, should we wait for the new light-mapper? Or the new light mapper is 4.0 exclusive? What's the direction here? Is using authored UV2, final solution? |
At present you can write code (in c++ or gdscript etc) to manually copy the vertices, uvs etc to a new mesh, and save that. That's the approach I ended up using, I don't know if there is any easier way (perhaps some duplicate mesh command or something). |
Well, it's better to use 'gltf' then. I like to create nodes with obj cause they give me more control over hierarchy. Currently with gltf I have to create hierarchy PLUS copy the parameters for 'meshinstance' or other nodes. In any case, the bug is not major issue if other formats are working. |
Fixed by #44628. |
godot 3.5 bug is not fixed, I cannot bake gridmap because UV2 arent saved at all. |
If you're using OBJ meshes as tiles, see #52508. You need to import the OBJ meshes as scenes for it to work, or use glTF (or Collada) instead. Edit: @Favkis opened #64914, which turned out to be a configuration error. So this is indeed resolved in Godot 3.3 and later 🙂 |
Godot version:
Latest 3.2 Alpha aad4d86
OS/device including version:
Linux Mint 18.2
Issue description:
When you use the menu option Mesh->Unwrap UV2 for Lightmap/AO this successfully generates second set of UVs which can be viewed with Mesh->View UV2 and can be used for lightmapping.
The problem is that this is not registered as a change to the scene (the * does not appear on the scene tab) and it is not autosaved, as Godot thinks there have been no changes. Then next time you load the project, the lightmapping is gone, because the UV2 coords are not saved.
It took me a while to figure out what was going wrong here. When I was using a mesh stored in a tscn file, I could force it to save by explicitly choosing Scene->Save Scene from the menu. With an obj file I can't seem to get it to save UV2 at all.
Steps to reproduce:
Add a MeshInstance mesh that has no second set of UVs. Choose 'Unwrap UV2', verify they are there with 'View UV2'. Press Ctrl-S to save, then quit godot, and reopen the project. The UV2s are gone.
Minimal reproduction project:
UV2Bug.zip
The text was updated successfully, but these errors were encountered: