Staredit Network > Forums > Modding Discussion > Topic: Animosity
Animosity
Apr 18 2018, 1:55 pm
By: Neiv  

Apr 18 2018, 1:55 pm Neiv Post #1







Animosity is a converter for SCR graphics. It can convert .anim, mainsd.anim and .dds.grp files to/from PNGs.

Currently it should work (tell me if it doesn't), but since there are 3 different files, hd, hd2 and sd for each grp/anim, it is a bit cumbersome to use. Maybe someday it can automatically downscale the sprites when importing the HD sprite.

There are no progress indicators, when working with very large sprites the program may just freeze for a moment when encoding or decoding the textures.

I believe that SCR still uses the .grp files for SD sprite dimensions (Since they are just 0/0 in mainsd.anim), so at the end of day you still need to use GRP tool as well >:l
Afaik also the mouse clickability area is defined by GRP pixels, even in HD mode.
Screen visibility is also controlled by something.. Not sure what.

I believe that HD2 sprite is 2x the resolution of a SD sprite, and HD is 4x SD resolution.
Also, the width/height values for HD2 sprites have to be twice as large as the frame dimensions (That is, a 40x60 frames in HD get centered when dimensions are set to 40x60, but the Hd2 sprite should be downscaled to 20x30 pixels with dimensions still 40x60)

HD2 sprites should just be 50% downscaled HD sprites, as there is some sort of dependecy between two if best quality sprites are enabled. Maybe they could just be considered manual mipmaps. Because of that they have to be imported simultaneously to work properly.

Thanks to Farty for documenting the file formats.

Edit Apr 19th: Fixed some bugs
Edit Apr 20th: Fixed a crash
Edit Apr 25th: Fixed HD-HD2 relation
Edit May 4th: Fixed .dds.grp scaling
Edit June 5th: Fixed dds decoding for textures with dimensions not divisible by 4
Edit July 3rd: Added multiple instance support and fixed some more bugs
Edit Mar 11th 2020 Fixed black bars on DXT1 sprites

Download for the latest release is available at: https://github.com/neivv/animosity/releases

Post has been edited 16 time(s), last time on Dec 31 2021, 7:58 pm by Neiv.



None.

Apr 18 2018, 4:49 pm Corbo Post #2

ALL PRAISE YOUR SUPREME LORD CORBO

This is great. This is very much indeed very great.

Thank you.



fuck you all

Apr 21 2018, 12:47 am O)FaRTy1billion[MM] Post #3

👻 👾 👽 💪

Is it confirmed that it uses the GRP for the dimensions? I couldn't figure out how it determined the frame sizes is why I stopped playing with it. XD



TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

Apr 21 2018, 9:56 am Neiv Post #4



Switching the grp in images.dat changes sprite centering in SD mode without actually changing graphics. Seems that BW also reads the frame-specific coordinates from grp even though they are also set in mainsd.anim.



None.

May 29 2018, 5:48 am jun3hong Post #5



The download site is blocked now.



None.

May 29 2018, 7:43 am Neiv Post #6



Oh, my bad. The link is now fixed.



None.

Jun 4 2018, 10:48 am jun3hong Post #7



Some frames look broken. I uploaded some screenshots. Well...can be fixed?

Attachments:
bandicam 2018-06-04 19-47-42-120.jpg
Hits: 17 Size: 28.54kb
bandicam 2018-06-04 19-48-28-708.jpg
Hits: 8 Size: 39.04kb



None.

Jun 4 2018, 4:48 pm Neiv Post #8



Which file is that?

Does it only look like that after editing it, or is it like that with the default file which was extracted?

What are they supposed to look like?



None.

Jun 5 2018, 9:01 am jun3hong Post #9



It's HD2's cmdbtns. It has a same problem with SD's one. Once I opened it with default, it looked like that.
But there's no problem with the original HD's cmdbtns.

For example, I uploaded screenshots fot cmdbtns' number frame.
In the original HD, there's no problem. But in the HD2, it looks broken.
When I export it, Animosity exports with broken frames like that.
When I import them again and run wuth samase to test it, it looks broken in-game too.
Not every frames are broken. Only a few frames do. I also uploaded screenshots for in-game.

Attachments:
bandicam 2018-06-05 17-45-30-474.jpg
Hits: 3 Size: 29.92kb
bandicam 2018-06-05 17-45-51-475.jpg
Hits: 1 Size: 32.73kb
bandicam 2018-06-05 17-58-46-833.jpg
Hits: 3 Size: 489.56kb
bandicam 2018-06-05 17-58-52-626.jpg
Hits: 6 Size: 466.09kb



None.

Jun 5 2018, 1:00 pm Neiv Post #10



Okay, I fixed the problem and updated the download.

Thanks for letting me know of the bug =)



None.

Aug 18 2018, 1:33 am TheBigDingus Post #11



Hello, I don't seem to be able to load a grp.
I exported it from PyGRP, but its not listed as an acceptable file. Am I doing something wrong?




Aug 18 2018, 11:07 am Neiv Post #12



No, the program is just bad and only accepts pngs for its frames.

I hope to improve the situation eventually, but as of now you'd have to use some other tool to convert the paletted bmps from PyGRP to a full-color png :/

You'll currently also have to export the anim frames you want to replace once to get the .json file which contains necessary information for importing other frames.



None.

May 16 2019, 12:53 am Neiv Post #13



I felt like updating this. Two new features.

- Can up/downscale images on importing, so sprites from one quality level can be used for the other two.
- Can export/import to/from a single image (per layer).



None.

Jan 26 2020, 4:01 pm Neiv Post #14



Another update. Some of these changes were actually done months ago but I forgot to release them here.

- Added support for creating a GRP containing the info SCR needs when importing SD frames. (That means that they aren't 1.16.1-usable GRPs, they just contain info on which pixels are transparent and frame sizes)
- Fixed a bug which would cause frames jump around unpredictably when importing up/downscaled images.
- Removed garbage DXT encoding code and just used a high-quality library; imported frames look a lot better now in many cases.



None.

Apr 15 2020, 10:21 pm Neiv Post #15



Updated to fix a bug with sprites being aligned to a multiple of 4 pixels, and added a new feature for editing anim\main.lit

main.lit controls the lights that sprites can emit when real-time lighting is enabled. Each frame can have a single light source specified to it.



None.

Jun 10 2020, 6:48 am Mizgir Post #16



Quote from Neiv
Updated to fix a bug with sprites being aligned to a multiple of 4 pixels, and added a new feature for editing anim\main.lit

main.lit controls the lights that sprites can emit when real-time lighting is enabled. Each frame can have a single light source specified to it.

Thank you so much for this software. Is it possible to export sprites in 8 frames directions?



None.

Jun 11 2020, 6:55 pm Neiv Post #17



If you mean exporting sprite sheets which only have frames facing up/down/left/right and 4 diagonals, I don't think I want to do the work that is necessary for that. If you need those you can take the 1st, 5th, 9th, 13th and 17th frame of a 17-frame set, and make the left-facing frames by flipping the right-facing ones horizontally.



None.

Jun 19 2020, 4:53 am Mizgir Post #18



Quote from Neiv
If you mean exporting sprite sheets which only have frames facing up/down/left/right and 4 diagonals, I don't think I want to do the work that is necessary for that. If you need those you can take the 1st, 5th, 9th, 13th and 17th frame of a 17-frame set, and make the left-facing frames by flipping the right-facing ones horizontally.

Thank you!



None.

Jul 14 2020, 7:45 am Mizgir Post #19



Sorry, but you do not know how to extract GRP files?



None.

Jul 14 2020, 6:36 pm IlyaSnopchenko Post #20

The Curious

Quote from Mizgir
Sorry, but you do not know how to extract GRP files?
Use good ol' PYMS for that (there's a module called PYGRP there).



Trial and error... mostly error.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
[11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
[2024-4-17. : 3:26 am]
O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
[2024-4-17. : 1:53 am]
Vrael -- bet u'll ask for my minerals first and then just send me some lousy vespene gas instead
[2024-4-17. : 1:52 am]
Vrael -- hah do you think I was born yesterday?
[2024-4-17. : 1:08 am]
O)FaRTy1billion[MM] -- i'll trade you mineral counts
[2024-4-16. : 5:05 pm]
Vrael -- Its simple, just send all minerals to Vrael until you have 0 minerals then your account is gone
[2024-4-16. : 4:31 pm]
Zoan -- where's the option to delete my account
[2024-4-16. : 4:30 pm]
Zoan -- goodbye forever
Please log in to shout.


Members Online: Judcfrffvf