The VG Resource
How do I get the proper dimensions of Unity image assets unpacked with Asset Studio - Printable Version

+- The VG Resource (https://www.vg-resource.com)
+-- Forum: The Resources (https://www.vg-resource.com/forum-109.html)
+--- Forum: General Ripping (https://www.vg-resource.com/forum-145.html)
+--- Thread: How do I get the proper dimensions of Unity image assets unpacked with Asset Studio (/thread-39821.html)



How do I get the proper dimensions of Unity image assets unpacked with Asset Studio - otchi - 10-25-2021

I've managed to unpack a bunch of game data with AsssetStudio, but unfortunately, a bunch of them gets exported out as large 2048x2048 squares. The images becomes stretched/squashed and doesn't look right at all. Is there a way for me to figure out what was the proper dimensions for these? I assume if this is the actual raw image file, then there should be a command somewhere explaining what the proper size should have been


RE: How do I get the proper dimensions of Unity image assets unpacked with Asset Studio - monlupin - 10-27-2021

could you provide the image? depending on what its like you may want to run it through something like kuriimu2. what does assetstudio say the size of the image should be? up in the corner of the preview it should have a bit of text saying the height/width
you could also futz with the export settings, but it may not be an export issue? under options > export options


RE: How do I get the proper dimensions of Unity image assets unpacked with Asset Studio - otchi - 10-28-2021

Oh yeah, I'm quite sure it's not an error. In the AssetStudio window it already looks like a squashed square and the dimensions IS 1024x1024 (sometimes 2048x2048), so I figured that's just how the picture is packaged/encrypted by Unity somehow.
But considering in the game itself the texture looks different, I figured there must be some programming or something that sets the dimensions? Because some goes does this , some other don't.

This is the image:

https://64.media.tumblr.com/41b80c1d39688869ab8efee7e4f7bce7/4d80b214a94d63b0-58/s2048x3072/7ac26d097f74a01ae748afe7b37c26dd7b1bb4ee.png


RE: How do I get the proper dimensions of Unity image assets unpacked with Asset Studio - monlupin - 10-29-2021

its entirely possible that its like that in the game files haha. i dont think its encypted--considering its viewable and encryption is reserved for things you want to obfuscate. looking at it in a hex editor it seems fine, has all of the chunks it needs
unsure of how familiar you are w/ game construction, but 1024x1024 and 2048x2048 are sizes used for texture maps. all 2d games nowadays are 3d behind the scenes, so its entirely possible that the character sprites are made by having a square plane, applying the texture w/ the sprite on it, and squishing the plane to the right size. a bit... odd as opposed to keeping the aspect ratio of the image and just allocating multiple images to one texture map but i digress. in my experience extracting texture maps always come out funky, so dont stress too much about it, sometimes it takes a little manipulation to get it to look right

if you want to replicate how they look whilst playing, take a screenshot of the character, pop the image you extracted + your screenshot into a photo editing (or drawing) program of some kind and squish your extracted photo until it lines up 1:1 w/ your screenshot! no clue what the right width for this guy is but throwin him into csp n squishin him didnt give me any loss of quality, so you should be good


RE: How do I get the proper dimensions of Unity image assets unpacked with Asset Studio - otchi - 11-06-2021

(10-29-2021, 03:06 PM)monlupin Wrote: its entirely possible that its like that in the game files haha. i dont think its encypted--considering its viewable and encryption is reserved for things you want to obfuscate. looking at it in a hex editor it seems fine, has all of the chunks it needs
unsure of how familiar you are w/ game construction, but 1024x1024 and 2048x2048 are sizes used for texture maps. all 2d games nowadays are 3d behind the scenes, so its entirely possible that the character sprites are made by having a square plane, applying the texture w/ the sprite on it, and squishing the plane to the right size. a bit... odd as opposed to keeping the aspect ratio of the image and just allocating multiple images to one texture map but i digress. in my experience extracting texture maps always come out funky, so dont stress too much about it, sometimes it takes a little manipulation to get it to look right

if you want to replicate how they look whilst playing, take a screenshot of the character, pop the image you extracted + your screenshot into a photo editing (or drawing) program of some kind and squish your extracted photo until it lines up 1:1 w/ your screenshot! no clue what the right width for this guy is but throwin him into csp n squishin him didnt give me any loss of quality, so you should be good

Aah, man, guess there's no easy shortcut for it LOL. Some of the sprites thankfully was squashed in a perfect 1/3 ratio, so I just need to stretch it by 3x and it was all good. Some of them took extra fiddling to figure out the proportions though LOL