Hey so I've been wanting to see if I can rip sprites from Bastion but I can't find much on the topic. Nobody's been able to unpack the game files directly, which sucks, but since the game uses DirectX I was wondering if there's some program like 3D Ripper DX, but for sprites.
So far the only slightly helpful thing I've been able to find is a tumblr blog by icetigris who's managed to rip a fair bit of stuff from Bastion themselves, like these Ura soldiers. Apparently icetigris uses PIX, which is a program that can do a variety of stuff with DirectX games, which is included within the DirectX SDK. However I'd rather not download a whole SDK for just one tool.
So I wanna know if anybody knows of anything I could try. If there's no alternative I'll probably see how PIX goes, but if I don't want to if I don't have to.
You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down, but the staying down. -Mary Pickford
Well, those sprites are on a black background which their alpha-aliasing (transparent AA) blends into, so unless Icetigris did that by accident, PIX must have done it and therefore you couldn't use it even as a last resort.
I don't think icetigris is a proper sprite-ripper like us She isn't submitting it on an official sprite website, maybe just because people might want to check them out. Or maybe she just doesn't know that using a black background is bad practice.
You could be right though, there are a few animated GIFs she made out of sprites like this one that look pretty messed up without a black background.
You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down, but the staying down. -Mary Pickford
That's also a possibility, yeah. Though I gotta say that sprite doesn't look too bad. Maybe that one doesn't use alpha blending, but it also could, I don't know anything about that game.
Either way I hope you find another way to rip the sprites! Wish I could be of more help.
Posts: 524
Threads: 9
Joined: Jul 2012
DirectX SDK Wrote:PIX is a debugging and analysis tool that captures detailed information from a Direct3D application as it executes. PIX can be configured to gather data, such as the list of Direct3D APIs called, timing information, mesh vertices before and after transformations, screenshots, and select statistics. PIX can also be used for debugging vertex and pixel shaders, including setting breakpoints and stepping through shader code.
Im learning sharpdx, a wrapper around DirectX, but i havent used PIX yet so i dont know much about it. From the documentation, it sounds like you might be able to do what you need with screenshots. I've never ripped sprites from anything before, so i may be wrong.
seeing as how bastion is also on the pc,.....you maybe be able to "look" at its resources.....
(08-05-2012, 04:42 PM)TheShyGuy Wrote: seeing as how bastion is also on the pc,.....you maybe be able to "look" at its resources.....
(08-05-2012, 02:53 PM)puggsoy Wrote: Nobody's been able to unpack the game files directly, which sucks
But yeah, I will look at doing it with screenshots via PIX, if there is no other way.
You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down, but the staying down. -Mary Pickford
Posts: 3,049
Threads: 60
Joined: Jul 2008
Although the chance of getting a useful reply is slim you could try contacting icetigris (why does that name ring a bell...) and check if she put them on a black background or not - could save you a download.
I already asked her via her tumblr blog (although that was about her ripping method before I figured it out), no reply. I doubt I'll get a reply if I ask about the black backgrounds but I may as well give it a shot.
You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down, but the staying down. -Mary Pickford
Posts: 3,049
Threads: 60
Joined: Jul 2008
The dump looks like it hasn't been organised which makes me fear it might be a "this is what you get and that's it" situation. Hopefully I'm wrong, or there's some magical setting to bring everyone's favourite colour bleeding eye pink into it, but from it doesn't look very promising to me personally.
Once again no reply. You'd think that the option would be removed if she can't be bothered to answer any questions.
As you said the organisation of the sheet hints somewhat to automated ripping, but from what I've read PIX is a general analysis program so I'm not so sure. And as I said she doesn't seem to rip sprites the same way we do, she makes graphics and such but I don't think sprite ripping is a main hobby of hers, maybe she just did it because she enjoyed Bastion.
Anyway I'll probably check out PIX and see how it goes.
You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down, but the staying down. -Mary Pickford
Oh yeah. Hell yeah. Heck yeah.
I finally did it. I really, finally, solved the puzzle. The pieces were harder to find than a piece of lint in a cornfield, but I got them. And they fit together wondefully.
After discovering that the DirectX SDK was half a gigabyte large, I kind of took a step back. If I was gonna get the same results as icetigris, which was likely, was PIX really worth such a massive download? I decided that I wasn't that desperate, at least not yet.
So I went and looked a bit harder into unpacking Bastion's PKG files. I found a guy who said he managed to do it, and after asking him about it (luckily he has an active blog), he gave me a link to the source code. Unfortunately there were no builds, and it was programmed in C# (which I have no knowledge of), but I downloaded Visual C# Express and managed to compile it.
It was a command-line program, as I expected, and after fiddling with it I managed to get it to extract files from a PKG file (specifically the one containing the files of the mechanical Pyth). What it produced was an XML file, which was just pointing to stuff, and a new problem: an XNB file.
I figured that this XNB file contained the graphics. Some Googling seemed to confirm it: XNA games, which Bastion is one of, commonly use XNB files to store most resources.
So while looking around to see if I could somehow open or unpack these XNB files, I found myself back by the guy who gave me the code for the PKG files. Apparently he'd also made a program to decompress these XNB files. So, I did the same as before, downloaded the source and compiled the command-line program. I had it figured out fairly quick and managed to decompress the XNB file. Now this is where it got hard.
What it gave was not a PNG or GIF file, not even a JPG. It gave me a larger XNB. I asked the guy who made the program about this, and he said that that's as far as he went, since all he wanted to do was port the game for Mac and Linux (or something like that), which required only the decompression of the XNB files. But I needed to convert them into images.
And so began my adventure through Google. I cannot tell you how many hours it took; how many websites I opened; how many paragraphs of technical jabber that I read. All I can tell is that I thought more than once of giving up. But I just couldn't. Through all of this, I downloaded numerous programs, a plugin for Paint.NET (which I had to download as well since I don't use it), I even tried learning C# & XNA myself. None of it gave fruit.
But finally, less than an hour ago, I found it. A simple little program someone managed to conjure for modding Magicka. It claimed that, among some other things, it could open XNB textures and save them as images. I had already downloaded programs that said they could do this, but those had failed. This one, however, was different. I had already downloaded an earlier version of it, which allowed me to open XNB files and view the images, but I couldn't do anything with them. This new version however, could save them. It had multiple options, BMP, JPG, TIF, but I went straight for PNG, hoping my head off that it would work. And it did.
There was something that seemed like a snag: the image was on a black background when I viewed it. Horrific memories of icetigris' sheets flashed in my mind: was I doomed to the same fate? But upon opening the PNG in GIMP, I saw the sweet, beautiful truth: the background was transparent. Nice, clean, alpha-equals-zero transparent. I zoomed in, looking at the sprite's edges: anti-aliasing was there. Half-opaque pixels, making the sprites look as beautiful as ever.
And so, I had done it. I had solved the puzzle.
I had ripped pure sprites from Bastion.
I managed to unpack Bastion's PKG files, which gave me XNB files containing the sprites. After a long while I found a Magicka Modding Tool that allowed me to open them and save them as images.
Want the awesome result? WELL HERE IT IS.
This might not seem like a big deal or anything but you seriously have no idea how glad, proud, and overall good I'm feeling right now. This is seriously a big thing for me and it will be one of my milestones in my sprite ripping memories. Bastion is a fantastic game and it's just so cool to be ripping pure, clean sprites from it, let alone being the first to find out how.
Prepare yourself for some awesome stuff in my submission thread!
*does a little jig*
WELL CONGRATULATIONS TO YOU FINE SIR. I'm stoked to see that for once I see someone able to to rip from something that they love so much. It really fills my heart with joy as it's certainly not something I've been able to achieve very often.
Again wonderful job and I look forward to uploading your hard-earned submissions.
Thanks MJ Yeah it's not often that I get this hyped about anything really, I think the fact that it was so difficult to get to this point amplified the satisfaction.
Plus, something just happened that sunk my heart slightly and then set it afloat straight away. I tried ripping the loading screen graphics, and I got a file like this:
Looks a lot like what icetigris got. But again, when I opened it in GIMP:
I was expecting the black to go away, but just look at the other differences. Those weird glitchy colours by his hair are all gone, and just look at that glow on the feather. Seriously I don't know how this is happening but I'm loving it.
You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down, but the staying down. -Mary Pickford
Yeah, Windows Picture Viewer does not display transparency properly so don't worry about that.
Posts: 524
Threads: 9
Joined: Jul 2012
08-08-2012, 06:15 PM
(This post was last modified: 08-08-2012, 06:31 PM by TheShyGuy.)
I was about to say something about the transparency as well, but MJ said it.
Not for the eyes of puggsoy....
About your journey....wow - what a waste of time. You could of asked about the .xnb format here, as its what all content is compiled to, sound, images, etc for Xna projects(like you stated). Xna itself, ofc, can open its own file and save, with 1 line of code, to either jpg or png. There was no point in decompressing the .xnb, as you can see. However, the pkg, yes (as far as i know, which is nothing about them). Im not trying to troll, but all those hours of hard work could've been minutes if you asked a few questions here -.0
|