-
Notifications
You must be signed in to change notification settings - Fork 137
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
Automate channel packing for faster texture authoring #473
Comments
I assume you've already seen #471. Some of these comments could have been made there.
What part of the process is slow? Drag 4 textures in or select them, check the boxes, click the pack button, save the two files one after the other. All of those need to happen per texture set.
All of these inputs are there, then processing occurs when the pack button is pressed and the files are named and saved. I'm not sure what you don't like. Do you not want the file dialogs mid process and want output file path selectable on the first screen?
If you're describing a UI layout, a picture would help. If not I don't understand. Keeping values across opening the packer window is the only thing I understand so far. If we do that, we also need a clear all button.
When the user selects different texture files to pack next, what specifically will be auto updated?
You mean upon saving the packed files, you want them to be inserted into the asset dock as a TextureAsset? hmmm for someone who knows what they're doing, yes. For a new person, this will break their terrain as they mix and match sizes and formats. It's better to not break it as a secondary result from saving a file. Better to break it as a primary result from dragging the texture file into the dock, or normal slot. I'm sorry, I do not understand your requests, except persistent values in the packer. Please try and clarify your points. cc: @Xtarsia |
I've seen #471, good stuff. In short I would like to automate channel packing after the first setup when the textures change. The ideal case: The slow part: Clarification:
For case 3. I've further divided it into This would then produce the packed textures that the users would manually assign into Hope this portrays it better now. |
A different solution to this would be to hook up a check_flat_alpha type function to signals sent from set_albedo and set_normal. So in the editor, whenever albedo or normal are set, a check occurs to determine if the textures are packed, and if not we can invoke a popup with a message such as "Texture Alpha Channel is white, do you want to open the channel packer?" and proceed from there. (load the image into the packer, set resize resolution & import setings, have it auto load the new image into the TextureAsset etc) Definitley seperate PR for that tho. |
That would help with the 1. case, to bring the packer to attention of new users, but the main point is the continuous auto repacking. For example after Texture set packed_albedo_height is assigned and I update either the original albedo or the original height texture, I don't want to need to repack it, I want it to repack itself automatically. The trigger for it is detecting when Godot reimports a texture, and the data for packing is the content of the Channel Packer tab. Anyways, apologies for being unable to explain it better. I'm working on implementing the 3. case which will demonstrate a solution. |
The only use case I see for this is if someone is a texture artist working in something like substance designer (which can already saved packed textures) and are continuously modifying and saving their textures and want to see it on the terrain. I assume this is you, Op. Most users are downloading a texture, setting it up once, then not touching the files again. I'd accept a PR on this if it is laid out in a way that is very clearly and understandable what it's for. I don't want to merge or maintain code that one person is going to use. Given the rare need, my personal efforts are better spent on the many priorities most people need. This prototype screenshot conveys the functionality, but it takes some thinking to figure out what is going on. Instead, how it should probably work is an alternate screen in the current packer, where tracked textures can be registered and modified. Ultimately, I want to have a single tools panel where all tools are integrated together. #81, and this would be two of those screens. |
Description
Texture authoring is a bit slow as channel packing is required in Terrain3D (unless using only albedo/normal rgb) so my suggestion is to automate it.
Ideally for each Texture in the edit inspector there would be inputs for separate albedo/height/normal/roughness and all of the Texture Packer tab checkboxes, then the rest would be handled in the background.
Another way of automating it could be to convert the Channel Packer tab content into a list, one item for each Texture that would be setup once and persist the values, then have the option to auto update when the textures change and the output textures would be assigned to Terrain3D Texture inputs (or elsewhere in custom shaders with the same expected packing).
Third could be a tool that would call the Channel Packer API:
The text was updated successfully, but these errors were encountered: