Atlas fix #6
No reviewers
Labels
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kkbp-dev/KKBP_Importer!6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "AnalogKnight/KKBP_Importer:pr-837-branch"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
It works well on the current few textures. I haven't included all texture types yet because I'm not entirely sure what they're for.
The exported light and dark textures still seem to be overlaid with textures like detail; this might need to be avoided if you want to separate them?
Also, this seems to be a default behavior, rather than a switch?
I modified .gitignore, which is unrelated to this fix. However, I believe that copilot prompt files should be excluded if contributors use copilot to assist with development.
Thanks! I'll check this out.
Though you're correct, I hadn't thought of that... In the V8 version of kkbp, the detail could be separated from the main textures because the materials hadn't been finalized yet, but in V9 the detail is always baked into the texture. At the moment, I'm not sure if there's an easy way to separate them...
I think perhaps we don't need to consider separating them, but can directly obtain the original textures from the folder exported by the exporter?
I tried it and it works!
I would think not because you have to saturate the original textures. The textures you want are likely the MT_CT.png textures, which are not saturated. The texture files in the "pre_light" and "pre_dark" folders are already saturated, but they have the detail baked in. The MT_CT textures would have to be saturated, then loaded into the _light.png image node and I think that would work.
Sorry, I don't know much about this.
When the plugin saturates a texture, do we actually separate the original texture into light and dark?
If I understand correctly, the light and dark textures are used for the surfaces exposed to light and shadow surfaces, respectively, right?
If this is the case, we may no longer need light and dark textures, as third-party application shaders can handle these perfectly well. Separating light and dark materials might also increase management costs.
If you want to avoid certain textures (e.g. detail maps) being baked into the light/dark textures, you can explicitly exclude them in the ExportLightDark function in the exporter, as shown below.
The reason for introducing light/dark textures is that some cards rely on some third-party shaders which the previous approach could not reliably support. This approach provides a fallback in those cases.
For users who don’t require very fine-grained material control, the light/dark texture workflow is usually sufficient. For developers, it offers a relatively straightforward way to avoid a broad class of “incorrect color” issues caused by shader incompatibilities.
That said, the previous rendering approach was also very flexible and worked well in its own context. For advanced users, custom shaders are often preferred anyway — since all raw images are still preserved, it’s entirely possible to import the model into Blender, adjust the armature, and apply fully custom shaders afterward.
Thank you for providing clarification.
Just to make sure I’m understanding correctly: are you saying that the material baking happens inside the exporter rather than in the Blender plugin itself? On my side, the folders generated by the exporter appear to contain only the original color textures, without any additional textures baked into them.
Is there something I might be misunderstanding?

Baked textures are in the "pre_light" and “pre_dark" folders

So to summarize...
I think for your use case, it might be better to add the lines that Sonogami_Rinne showed earlier to the exporter project, and compile a new exporter .dll file for yourself. This way, you'll be able to get the saturated image without the detail mask baked in. Then you'll be able to use this new PR to get the saturated atlas without the detail mask. Then apply the detail mask atlas on top of the saturated atlas once you get the model in Unreal.
Also, can you enable the setting to let me edit the PR? I'd like to update it to move it to the new atlas dropdown menu
No problem, I think I've enabled it.
I'll look into what you're saying; I've never touched the exporter before. Thanks.
@AnalogKnight
Hmm... I'm not familiar with how forgejo works, but it looks like I still can't edit the PR. Also, when I try to click the button to update the branch, it doesn't work...
Could you click the button that makes the branch up to date with the base branch? Then I'll merge your PR and make the edits afterwards.
WIP: Atlas fixto Atlas fixOf course, it should be done.
Alright, it's merged. Thanks for this feature! Sorry for taking so long with this.