-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
New UV Channel imports into a scene file #2266
Comments
See also #2192. |
I need this functionality right now, as I'm going to use additional UV channels in shaders. Since one channel (UV2 is reserved for lightmaps) is not enough for me. I want to store more information in the bag to greatly reduce the amount of materials. I need this functionality right now, as I'm going to use additional UV channels in shaders. Since one channel (UV2 is reserved for lightmaps) is not enough for me. I want to store more information in the mesh to greatly reduce the amount of materials. I also liked the idea expressed here that the last UV layer should be used for lighting. But I understand that this may cause some problems in other parts of the engine. I am currently working on a texture atlas (more precisely, a texture array) and would like to transmit the tile number using UV3, for example. This would solve a lot of problems for me, since I would be able to provide several other materials (from 16 to 64) on one material without unnecessary drawcalls. At the same time, without sacrificing mipmapping or repeating textures, that is, without overestimating the number of polygons. |
https://www.youtube.com/watch?v=Rw8UL2q6VYI |
Updated godotengine/godot#52504 (comment) with a video. 2021-09-08_23-05-35.mp4 |
@fire You are a real hero! I've already given up all hope of seeing this! Thanks! Thanks! Thanks! |
Describe the project you are working on
3d project
Describe the problem or limitation you are having in your project
We wanted to import more UV channels for use in Godot games.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
The GLTF2 importer will use the all-new extended mesh format to store UVs.
The GLTF2 exporter will store the UV channels from the mesh into the gltf2 file.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Discussed at the rendering meeting. https://gist.github.com/fire/878b71a2b69fcb47c1c685e96163e05d
New glTF importer will have a dropdown to select the lightmap channel:
We default to texcoord1.
This vec2 is to be stored into custom3 (vec4) and aligned to XY because it would waste two floats if not aligned.
The layout for UV:
The glTF importer will write
The PackedScene to glTF2 exporter will write:
If this enhancement will not be used often, can it be worked around with a few lines of script?
Adding new UV channels is not a script change. It is a gltf2 importer change.
Is there a reason why this should be core and not an add-on in the asset library?
Importing UV channels is a core change. It is unable to be integrated with the scene importer/exporters and still be a script.
The text was updated successfully, but these errors were encountered: