Skip to content
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

[PsBuild] use combined image to compile for Tachie image type #66

Closed
TheEZIC opened this issue Aug 13, 2021 · 15 comments
Closed

[PsBuild] use combined image to compile for Tachie image type #66

TheEZIC opened this issue Aug 13, 2021 · 15 comments
Assignees
Labels
enhancement feature Something big is coming
Milestone

Comments

@TheEZIC
Copy link

TheEZIC commented Aug 13, 2021

I tried to translate a certain game but ran into a problem.
I decompiled pictures using this command:
./PsbDecompile image_name.psb
This command created a folder with an image splitted into chunks(and with a combined image). I translated the picture chunks, but the builder broke it.
It would be wonderful if it was possible to work with such images via "image" and "link" commands, cuz working with chunks is such a pain in the ass
I saw same problem in this issue:
#40

@UlyssesWu
Copy link
Owner

but the builder broke it

Couldn't understand what this means, but get your main point.
It sounds possible, but will take some time of course.

@UlyssesWu UlyssesWu changed the title [PsbDecompile/PsBuild] impove the work with image [PsBuild] use combined image to compile for Tachie image type Aug 13, 2021
@UlyssesWu UlyssesWu added this to the v3.0 milestone Aug 13, 2021
@TheEZIC
Copy link
Author

TheEZIC commented Aug 13, 2021

but the builder broke it

Couldn't understand what this means

Output image receives visual artifacts if I decompile compiled psb file

@UlyssesWu
Copy link
Owner

UlyssesWu commented Aug 14, 2021

Output image receives visual artifacts if I decompile compiled psb file

Still cannot understand. Why don't you upload samples and screenshots?

If the build result contains some errors, build with combined image won't save you from that. It sounds like a image format issue happened when you saving modified images.

@TheEZIC
Copy link
Author

TheEZIC commented Aug 14, 2021

I have this pictures in my decompiled folder:
image
First image is combined one. Second and third is chunks. They have a different size in contrast to the combined one (I tried to put one on top of the other in photoshop).
Then I tried to drow random lines on 2rd chunk.
The compiler gave me this:
image
As you can see in the screenshot. In the combined image, the first chunk (not modified) became normal, but the modified one did't.

@UlyssesWu
Copy link
Owner

Why don't you upload samples and screenshots?

Just Upload PSB

@TheEZIC
Copy link
Author

TheEZIC commented Aug 14, 2021

psb.zip

@UlyssesWu
Copy link
Owner

UlyssesWu commented Aug 14, 2021

Tried and it works as expected. This screenshot shows the images extracted from recompiled PSB.
image

The possible problem, is that you may have changed chunk images' size. Anyway, unless you can provide a more clear reproduce steps with samples, I will not spend more time on this "builder broke it" issue.

And I must emphasize that you should have provided the PSB samples since your first post if you want the issue to be fixed ASAP. The issue template has stated that. It's already figured out that you're trying to make a Russian translation of Go-Toubun no Hanayome (without mentioning FreeMote though) so don't hide a thing and just provide PSB before asking questions next time.

@UlyssesWu UlyssesWu modified the milestones: v3.0, v4.0 Aug 14, 2021
@TheEZIC
Copy link
Author

TheEZIC commented Aug 14, 2021

And I must emphasize that you should have provided the PSB samples since your first post if you want the issue to be fixed ASAP. The issue template has stated that. It's already figured out that you're trying to make a Russian translation of Go-Toubun no Hanayome (without mentioning FreeMote though) so don't hide a thing and just provide PSB before asking questions next time.

Ok, sorry for that. I thought that your tool is allowed only for personal use, and not for public translations. Next time I will attach PSD files. I will also mention your tool in the posts, if you don't mind of course. Please accept my apologies again. A little later I will describe the steps that I did about the "builder broke it" issue

@TheEZIC
Copy link
Author

TheEZIC commented Aug 14, 2021

  1. I decompile the original psb file using this command:
    .\PsbDecompile.exe ./ebg06a.psb.m
  2. I change the chunk image(ebg06a-1).
    After which I try to transfer the same changes to the combined image(ebg06a).
    But I can't make the changes in the same places on the combined image, since the combined image has a width of 1920, and the chunk is 2048.(Also, if you add up the heights of the two chunks, their sum will not match the height of the combined image.)
  3. I build a psb file using this command:
    ./PsBuild.exe ./ebg06a.psb.m.json
  4. I decompile the psb file obtained in step 3 with the command:
    .\PsbDecompile.exe ./ebg06a.psb.m.pure.psb
  5. I open the folder and see those visual artifacts that were in the screenshots above.
    I also tried to change only the combined image in step 3, but it led to the same results.

@UlyssesWu
Copy link
Owner

I change the chunk image(ebg06a-1).

This is the most unclear (and unable to reproduce) part.
I have said "you may have changed chunk images' size". Have you done that? The ebg06a-1 is 2048x1024, after change, it should still be 2048x1024.

@TheEZIC
Copy link
Author

TheEZIC commented Aug 14, 2021

Yep, it's still 2048x1024
image
And after changes too
image

@UlyssesWu
Copy link
Owner

If you have upload files in the first picture with your reproduce steps, things may have been clear and you won't have to post these screenshots. "Always attach samples."

However, it's still lucky enough for you and me because your first screenshot has indicated the issue. Have you compared your 2 screenshots? Did you find one is "24" and another is "32"? After that, you may go back and check the decompiled result at beginning. So it's because you have changed image format.

@TheEZIC
Copy link
Author

TheEZIC commented Aug 14, 2021

Right now I've drawn only red strokes, but I think there is some problem with RGB channels
image

@TheEZIC
Copy link
Author

TheEZIC commented Aug 14, 2021

Okay The problem really was in the bit depth of the color. I would never have thought of it myself. Thanks for the help. ^_^

@UlyssesWu UlyssesWu modified the milestones: v4.0, v3.0 Aug 14, 2021
@UlyssesWu UlyssesWu self-assigned this Aug 14, 2021
@UlyssesWu UlyssesWu added the feature Something big is coming label Aug 14, 2021
@UlyssesWu
Copy link
Owner

From now on, PsbDecompile will only extract combined images from image (Tachie) PSB, unless -dci (--disable-combined-image) is specified.

PsBuild is now able to build Tachie PSB from combined images. And it can still build from chunk images if you've decompiled with -dci.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement feature Something big is coming
Projects
None yet
Development

No branches or pull requests

2 participants