Jump to content

Recommended Posts

Posted

Hello!

I was working on a Python script that replace Sprites data with another for Unity games but Unity has another trick in its sleeve.

For those who use AssetStudio, you will extract sprites like this (from Dungeon Clawler 2024 Demo):

Dolly_Idle.png.68de9b7ea83c89d76958a88a651da8c8.png

But with a tweak, I found out Unity uses more data to store RGBA32 sprites!

Dolly_IdleUNITYCONVERT.thumb.png.05aa670748794223e79e5e4e91ced455.png

Unity uses an Anisotropic filter to enhance the quality. Something that is difficult to replicate with Python and every sprites doesn't follow the same rule! We have to follow them individually. Another example with Clawcula.

CountClawcula_idleUNITYCONVERT.thumb.png.a1ec474dac4b0f89e9ab23ce90cf2c7b.png

Interestingly enough, a partial replacement works and those which lack shearing, like the Logo, are easier to replace. Not every sprites use all "layers" which should make things easier.

DungeonClawler(Demo)TimeCrunchMODTitleScreen.thumb.png.18d5b1967f307f53158ab26736b10e23.png

What I replaced with:

Logo.thumb.png.379c75f0a674c99ddb63362d4e6229a5.png

And here is the original one:

LogoUNITYCONVERT.thumb.png.aaec6f72d9c9368570471c8229eadff9.png

Despise the flaw, it's sufficient replacement.

I was close to replace the sprites with Animal Crossing cub villagers without using Unity (after the Unity controversy, which lead me to mod Unity games with Python).

Video Example: https://drive.google.com/file/d/18L1NBMWRQjwmCnFElAzJ2ww6KMtV2YE9/view?usp=drive_link

If you have information on reproducing correctly their Anisotropic effect, feel free to share!


Python Scripts:

  • Unity Image Extractor: This extract all sprite data from resource files. Work on RGBA32 and RGB24. Don't forget to create a new folder, I don't know how to make the script allow you to choose one.

Unity Image Extractor Script FINAL.py

  • Unity Image Replacer: This replace all sprites with those from the batch. Although it works for RGBA32 and RGB24, it works better for the latter.

Unity Image Replacer Script FINAL.py

  • Unity Ano Simulate (Work in Progress): An attempt to simulate the Anisotropic effect for a bulk. Work best for no shear one.

Unity Ano Simulate Script (Bulk) with Shear.py

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...