Unity Unpacker

0 views
Skip to first unread message

Lorin Searing

unread,
Aug 3, 2024, 5:52:47 PM8/3/24
to provsoftbanud

Hello! I am relatively new to Spine, or relatively new to these kind of utilities with it.
I was given a texture sheet in .png to work with, and I needed to unpack it all in separate files to update a texture in a current Spine rig.
however, when using the texture unpacker

Thanks. If you open the atlas file as text, you can see it only has one texture region entry that is the whole image. That is why it unpacks into a single image. Unfortunately without the information in the atlas there is no way to unpack smaller images.

I am an asset ripper for CREATIVE USE, not redistribution or reuse. I am looking for a program to rip the assets from Escape from Tarkov, but my PC freezes when I attempt it. I use AssetStudio ( ). Is there anything like AssetStudio that can unpack a Unity Bundle (.bundle) and give me the source models and textures?

If you want to export meshes from unity (FBX) you can use Blender. Blender has a feature that allows you to import files such as FBX, OBJ, X3D (that includes the materials). How to import files. After you imported the files you can export them in a different format.

Yes, it is the same as libgdx's unpacker. Spine doesn't expose the unpacker on the CLI, but we'll add that. Until then, you could grab gdx-tools from libgdx and run the packer. Or here, for the lazy:
-unpacker.jar
Run it like:

but assuming you haven't used meshes, you don't know what space you have to play with. Say if you want to make the head bigger, you don't know how big it can be without overlapping with another body part texture

I believe bcats is saying that with individual images you can more easily see the space you can paint in. You don't have more space, but you can see it more easily and you can't paint outside the region.

If you allow editing of atlas pages in say a Unity game, you can use the atlas region information to display and make modifieable only the part of an atlas page a region covers. If you want unpacking at runtime, you'll have to port the Java-based unpacker to your favorite language, including cutting up the image.

But after i import it to unity, the animation and the textures not installed but when i press the model in unity the animation and the textures in there. Sorry if my english is bad and to many question to ask. I watch tutorial in youtube from blender to unity it said i must to unpack so i ad manually in unity. Even there is tutorial downloading model from unity the texture and animation are separate

I need to export this as an fbx file to import it into unity. Following some instructions I did this by first Unpacking the resources. When I do that I get the files in a directory named textures`. However the images in the example image above do not appear. How can I get these to also be exported?

If anyone's interested( probably not lol, since Modtools does all of this in-game anyways), I've built a small prototype CRP unpacker, so you can extract things like meshes, textures, and some metadata out of the CRP file without having to open the game. Unfortunately, since I can't import any of the Unity libraries, whoever builds the next version should probably move this over to a unity app instead of the current solution( plain old .NET app ).

In order to use this, you'll need .NET framework 4.5, and to copy Assembly-CSharp.dll, ColossalManaged.dll, ICities.dll, and UnityEngine.dll into the app folder. Once you've done that, just drag the .crp file into CrpParser.exe, and it should output a folder containing:

Exporting the various files works fine (as far as my newbie eye can tell), but unfortunately there's nothing I can do with the .obj file that's being spit out by your tool.
Importing a new asset based on the .obj file (I have a "obj-filename_d.png" texture file in same folder) doesn't work - it shows up in the import list, but I get neither preview nor can I continue (button disabled), so I reckon it needs to be converted first. I've tried Autodesk's FBX Converter, but it's not working for me: I get a 'Not enough parameters' message and that's the end of it

Edit: I suspect there may be something with the exported .obj file. When I use ModTools to dump the mesh of the same prop, I can convert it to .fbx with FBX Converter without problems. However, importing that .fbx gives me nothing (still no preview, and the 'Continue' button is clickable once, then disappears...)

All right, thanks for the info. What I need for some new features for American RoadSigns is a set of import-ready .fbx files (road sign props) so I can create additional ones to include in the mod (basically re-textured versions of the signs already included), and I hoped to be able to achieve that with a few (simple) tools. Knowing that it takes more than that, I guess I'll have to to rethink my approach (I have a sneaking suspicion that importing and exporting with 3D Max won't be as simple as just that, which means having to spend more time for trial-and-error, reading additional resources, etc. - something I have no desire to do).

Nah, you got to invert one of the axis of the pivot of the model and cut off the bottom row of vertices. You can adjust the pivot or import using the center option. You also have to split one of the maps using colorchannels.

And some more tinkering. I removed the dependency of the ImageMagick Library, it was 10 MB fat! Now uses byte[]. new installer: -devel/crp-parser/blob/master/Installer/CRP-Extractor-0.2-Setup.exe?raw=true

Sounds like a great optimization, but when I try to extract a .crp file, I get an ImageMagick-related error ('Could not load file or assembly 'Magick.Net-Q16-AnyCPU ....').
Also, you accidentally linked to the 0.1 version (this is the correct url: -devel/crp-parser/blob/master/Installer/CRP-Extractor-0.2-Setup.exe?raw=true - your link text is correct, the href links to the 0.1 version).

Works fine for me. There are no references to the Magick library anymore, so they hardly can throw an error. I'm pretty sure something has been mixed up during install. Try re-installing while making sure the extractor isn't running.

Looks great! Thanks so much for the GUI!

A note about the ImageMagick dependency though, it's in the first revision so that the app can convert the dds textures to png, in case anyone using the app can't use a dds viewer/editor or something. Something to think about...

Depending on the version of the package(probably, I only tested like 4-5 assets[also, sort of why I'm weary about adding unit tests where the test is just parsing a file]), the textures may be stored as a DDS file, preview images are always PNGs though. You probably don't need that dependency if you want save the file as-is, but I found it inconvenient to have to open visual studio or something to verify them.

allright i will change it to byte[] for the previews and back to magick for the textures and make it load lazy so it only croaks when somebody accesses textures and the magick lib isn't there. that way you can keep the parser slick and when somebody needs the texture stuff /(s)?he/ can add the magick lib. i'll do installers with and without.

btw, tony if you want to continue on, please feel free to merge my changes. I refactored quite a bit and it's quite more friendly for unit tests imho. edit: oh, and because i added one unit test already (along with the test project).

Hi I've been trying to use the extractor but it comes up with an error saying it "could not load file or assembly". Is there any fix to this? I notice that Judazzz has had a similar issue and something got fixed, but I still have it.

But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

Here is a picture example, focus on the gray part. White parts I just not started to touch yet, they are using another shader. Background which is not using any shader though was easy to fix and looks exactly the same than in Unity.

I never touched at shaders before so I am a bit lost, I am really not sure about the Unity uv3_x => Godot UV conversion, but using UV2 seems to make things even worse.
Would appreciate any pointers !

What I would do is, for the locker mesh(es) you are showing there in that last shot, is that 2 separate meshes, the 3 lockers on top and then the mesh decals on the bottom? If so, do they have different materials associated on them on the mesh when in the engine, even if the imported mesh has more than one Material ID?

There are tricks to making this easier, but if you really want to use these assets in Godot, converting these these fully might be in order, which I think would include completely re-writing the shader, either in visual shader setup in godot, or manually writing one. One of the reasons too is that all of the variable names are the node name in the shader editor they used, so they have little information of what they do down the line, so just renaming those do would help a lot to figure it all out, things like
tex2DNode3 and lerpResult11, etc.

You also have some sampler type issues, both normal maps look like in godot they are not being recognized as normal maps, you have the hint_normal in the shader, but in the unity shader they are doing some normal unpacking so that might need some investigation. The other one is the dirt roughness sampler looks different too, it could just be that the hint is roughness_normal, which would need some special setup on the texture resource, it just seems like you are losing the blue channel data probably due to that hint, try taking that off completely and see if it matches the unity version.

c80f0f1006
Reply all
Reply to author
Forward
0 new messages