Qhimm.com Forums

Miscellaneous Forums => Scripting and Reverse Engineering => Topic started by: obesebear on 2009-05-18 06:25:21

Title: Ripping Dirge of Cerberus
Post by: obesebear on 2009-05-18 06:25:21
Ok so I've been browsing the interwebs for about 15 minutes and have discovered that a "mariokart64n" has discovered a way to rip models from PCSX2 using 3dripperdx and 3dvia (I think).  What he has done is activated the program when the model is facing forward, backward, and on either side.  The reason for this is PCSX2 displays models in a 2D way, so from what I understand the emulator isn't displaying the entire model all at once, only the side you see.  This means whenever you use the ripping programs you are only ripping 1/4 of the model.

My question to all of you is,  how has he combined them making a completely 3D model?  The handful of forums I found him posting on were either from 2008 or he had since left them  :|
Title: Re: Ripping Dirge of Cerberus
Post by: halkun on 2009-05-18 10:16:36
I've seen this done with Xenosaga too. My guess is that the model is manually knitted back together using an editor.
Title: Re: Ripping Dirge of Cerberus
Post by: obesebear on 2009-05-18 16:08:26
Yeah you saw the same thread I did.  They did it with a character called KOSMOS I think it was.  I just can't find any details on how he managed to combine all the files from 2 different programs.

I also noticed the names Kosmos and Telos thrown around, but they seem to only be tools for ripping xenosaga files.  I've found that forum member FaustWolf was in a few of those threads as well so I'll shoot him a pm and see what he knows.
Title: Re: Ripping Dirge of Cerberus
Post by: koral on 2009-05-18 23:03:59
There was a time when I had tried ripping models from emulators too, but alas the curse of the pancakes!  :-(

I am not sure how even having ripped pancake-geometry from different angles would work, because all the vertices would be flattened in all the axis, so anything done to one vertex would also be done to all the others.

The only way such a method would work if each vertex/edge/polygon was manually "pulled" out and shaped using the other pancake-geometry angles as reference.
But that is most definitly not an easy thing to do.

If someone could write a custom driver for the emulators, perhaps one with a depth-colour shader (similar to Aalii's early work) then even pancake-geometry could be mathamatically "volumised" using a custom tool afterwards.
I wouldn't mind creating the tool, but we would still need the depth-shaded screen RtT from the emulator created at the same time the geometry was dumped.
Title: Re: Ripping Dirge of Cerberus
Post by: halkun on 2009-05-19 00:14:36
The problem with emulators is that a GPU has no concept of 3D. It's just a 2D surface that can draw triangles really fast while interpolating texture data across it. That's it. The 3D maths and transformations are all done by the game higher up in the render pipeline. You can't make a Z buffer shader display because the GPU does not know what a Z axis is.
Title: Re: Ripping Dirge of Cerberus
Post by: obesebear on 2009-05-19 03:43:02
http://www.facepunch.com/showthread.php?t=540255&page=18 (http://www.facepunch.com/showthread.php?t=540255&page=18)
Post 685 and 686.

There are a few others where it's clear he knows what he's doing. This post about scaling the z-axis seems promising...

Title: Re: Ripping Dirge of Cerberus
Post by: BlitzNCS on 2009-05-19 15:32:42
O.o has anyone even tried using 3d printscreen on PCSX2!?
i'd do it myself, but every computer i've ever had doesnt work properly with either 3dripper or 3d printscreen.
Title: Re: Ripping Dirge of Cerberus
Post by: ultima espio on 2009-05-19 16:12:52
O.o has anyone even tried using 3d printscreen on PCSX2!?
i'd do it myself, but every computer i've ever had doesnt work properly with either 3dripper or 3d printscreen.

Yeah comes out flat. There is a technique that lets you do it, and a plugin but i've never actually found them.
Title: Re: Ripping Dirge of Cerberus
Post by: MrAdults on 2009-05-20 07:45:27
The problem with emulators is that a GPU has no concept of 3D. It's just a 2D surface that can draw triangles really fast while interpolating texture data across it. That's it. The 3D maths and transformations are all done by the game higher up in the render pipeline. You can't make a Z buffer shader display because the GPU does not know what a Z axis is.
This statement is somewhat insane and wrong. :) But I believe you are thinking of the state of geometry in projection space. However, the PS2 does indeed do hardware transforms, which is why HLE is very possible. Not to mention, a depth buffer is maintained in framebuffer coordinates (the GPU does not just draw 2D triangles, it has to test depth on a per fragment basis, which involves z-buffer data generated by the interpolated projection space coordinate). It sounds like the driver(s) people are using for these OpenGL/Direct3D captures are rendering flattened triangles in projection space, but there is a high likelihood that hardware depth testing is being used, and so if that is the case, koral is correct that a depth export shader could be made.

I've never even used a PS2 emulator though, and I have no idea what PCSX2 feeds to its GPU plugins. I can't imagine it would be the rasterized fragments though. That would almost defeat the point of GPU drivers. Not quite. But almost.
Title: Re: Ripping Dirge of Cerberus
Post by: koral on 2009-05-20 20:38:36
The PS2 must contain some sort of depth-buffer, because I just cannot imagine a game like FF12 trying to depth sort and render all its polygons in software!!
I have never done any driver coding, so unfortunatly this is something I must wait for someone else to try.

Another option might be to wait for a PS3 emulator (I wouldn't hold my breath though :lol:) and then use that to rip the geometry when it tries to software-emulate the PS2.
Or would that not work..?

Afterall, the PS3 may just be doing the same dorky triangle transforms (3D -> 2D) to render as the PS2 does...  :-P
Title: Re: Ripping Dirge of Cerberus
Post by: Aurenasek116 on 2009-05-20 22:04:31
Quote from: koral
Another option might be to wait for a PS3 emulator

Seeing as the PS2 emulator still isn't 100% working I wouldn't count on PS3 emulator in next...10 years?
Title: Re: Ripping Dirge of Cerberus
Post by: obesebear on 2009-05-21 01:49:12
Well I have my roommate's 3dsmax installed along with 3dvia, so tonight I'm going to run Dirge of Cerberus and try to figure out how to z-scale whatever I rip.  I might also have to just play the game so I can get the model viewer access, so if anyone has a save game that could help feel free to send it.

Edit:
I managed to find and convert a savefile so I have access to everything in the Extra Content mode.  When using DirectX or OpenGl I can view the models no problem.  3DRipperDX seems to do nothing at all, though occasionally files will pop up in the shaders and textures folder.  3DVia finishes very quickly when using a DirectX plugin and always seems to successfully rip the floor the models stand on. 

Now here's the thing, just above said floor there is a jumble of... something.  Let me also note that what is viewable with 3DVia whether using the DirectX or OpenGl plugin, it looks exactly the same.  Only OpenGl takes a good 15 seconds to finish whatever it's doing.  It's getting late here so I haven't had the chance to mess around with importing whatever it is I've captured, so maybe by Friday night I'll have some form of success.  From what I've seen so far though it seems like Koral is right.. if mariokart64n used the same tools I have, he must have spent a ton of time getting the model just right.

Oh well, I'll continue searching to see what info I can find.  Perhaps one of the far more computer savvy people on here will figure something out.
Title: Re: Ripping Dirge of Cerberus
Post by: obesebear on 2009-05-22 05:01:40
Ok so I have truly been to the end of the internets and back looking for information about this.  I found 2 posts on separate sites (forgot to paste links  :x ) but here they are

texture dump works with GSDX9 only and model dumping with ZeroGS.

but the dumped models are flat because the GS plugins uses an overlay.


AND

you need to have 2 views of the exact same frame capture using 3d ripper dx.
the only way to do this is in the model viewer mode.
take 1 capture straight on then take one side profile snapshot.
then there is a max script you must run on the 2 files that will solve for the depth and it will make the image 3d again.
I can't remember the name of the script off the top oif my head if I can dig it up ill post it.


The latter post was made in Jan of 08 if I remember correctly, needless to say it was the last post in the thread.  So if anyone is familiar with Max maybe they will know what he's referring to?
Title: Re: Ripping Dirge of Cerberus
Post by: ultima espio on 2009-05-22 19:13:29
Best i could get...

(http://i85.photobucket.com/albums/k61/ultima_espio/vincent.png)

I got that in June last year, cant remember what i did to get it though  :|
Title: Re: Ripping Dirge of Cerberus
Post by: koral on 2009-05-22 22:12:51
I can swear I have been able to rip textures perfectly using 3DReaper and PCSX2. I dont know why yours would be black and white, perhaps it was an old emulator or something.

then there is a max script you must run on the 2 files that will solve for the depth and it will make the image 3d again.

Now THIS is what I am talking about. The key word here is max-script.
I have zero experience with max-scripts, but theory is sound.
Both rips should (theoretically) have identical geometry and vertex indices inside Max, so using a custom script, you would simply recurse through ALL vertices and assign the correct vertex-positions per axis (based on each pancake-geom).

I will have a go at it tonight, see what happens.
:-D
Title: Re: Ripping Dirge of Cerberus
Post by: obesebear on 2009-05-23 01:27:08
Yeah that was definitely one of the most helpful things I discovered.  If anyone can figure it out based on this little spec of information, I'm sure it's Koral
Title: Re: Ripping Dirge of Cerberus
Post by: ultima espio on 2009-05-23 13:11:29
Found a part of Shalua's texture

(http://i85.photobucket.com/albums/k61/ultima_espio/pcsx2096exe_Thu_Apr_02_17-10-19_200.png)

more like ShaBLUEa  :-P

oh and i found more:
(http://i85.photobucket.com/albums/k61/ultima_espio/tex4.png)
(http://i85.photobucket.com/albums/k61/ultima_espio/tex3.png)
(http://i85.photobucket.com/albums/k61/ultima_espio/tex2.png)
(http://i85.photobucket.com/albums/k61/ultima_espio/tex1.png)
(http://i85.photobucket.com/albums/k61/ultima_espio/badge.png)
Title: Re: Ripping Dirge of Cerberus
Post by: MrAdults on 2009-05-24 06:27:43
Random guess, the GPU driver is uploading an entire texture for each CLUT, because it doesn't know which pixel region is correct for which CLUT entry (since that is determined by the mesh, in which uv segment is drawn with which CLUT index, and that's not something the driver can really determine itself), and it can't rely on native hardware paletted texture support.

If I'm right, in order to end up with your final desired texture map, you would have to find all of the texture maps for all of the CLUT's, and figure out which one contains the correct color for which region, and combine them by hand all into one. However, that task would be made much easier by extracting the corresponding model, as the ripper program should index each draw call (mesh chunk) to the appropriate in-memory texture.
Title: Re: Ripping Dirge of Cerberus
Post by: obesebear on 2009-05-25 06:10:50
This is what I managed to get from chaos.  I've tried a few different combinations of things with the graphics plugin trying to see which works best.
(http://i221.photobucket.com/albums/dd138/obesebear/chaos.jpg)

I haven't yet tried grabbing any 3d models, because that seems a little beyond something I'm capable of.

I'll keep trying to figure out how to rip these textures properly though.  Any hints Ultima Espio?
Title: Re: Ripping Dirge of Cerberus
Post by: ultima espio on 2009-05-25 13:03:24
I defiantly got them through 3dripper dx, but this was last June so i cant remember what plugin i used. It wasnt zero gs thats for sure. Just which version of the other one i dont know.
Title: Re: Ripping Dirge of Cerberus
Post by: obesebear on 2009-05-25 16:02:20
I want to think I read that an earlier version of 3dRipperDX was best to use.  Maybe 1.3?  Which version have you been using?
Title: Re: Ripping Dirge of Cerberus
Post by: ultima espio on 2009-05-25 16:26:46
The latest one 1.5a. It's got the global monitor function. It hasnt been updated since October 2007 though.
Title: Re: Ripping Dirge of Cerberus
Post by: obesebear on 2009-07-18 05:41:56
Well well well.  I must necro my own thread for this new tidbit of information.

After downloading 3DVia onto my new computer for use with the FF8 models, I decided to go back once more (for old time's sake) just to see if maybe I could pull one of the models from the game.

And what would you know, I can.  Kind of. 

As mentioned in one of the earlier posts two separate printscreens must be taken; one from a front view and one from a side.  However, if anyone is still interested in doing this, it is VERY much so possible.  I simply don't know enough about Max to run a script that would combine the two models into one.   And of course there is still the problem of UV mapping all the textures to it.

(http://i221.photobucket.com/albums/dd138/obesebear/chaosmodel.jpg)

chaos v.001 (http://www.mediafire.com/download.php?iyzfymjwdyi)

As you can tell, 3DVia knows that there should be a 3D model as evidenced by it drawing Chaos on 3 separate levels.  I'll mess with him a little more tonight to see if I can't smooth the model out some.  If anyone is still interested in this... POST  :-)

New info :)"Which model-ripping utility are you using with PCSX2"
3dripper dx + gdx 1.7 for texture and gsplugin for mesh.
and
3dvia printscreen grabs the axis data, so 2 views is unnecessary.
Title: Re: Ripping Dirge of Cerberus
Post by: polaris_027 on 2009-07-19 02:08:59
wow goodluck! this is good if you pull this off.. :-D
Title: Re: Ripping Dirge of Cerberus
Post by: ultima espio on 2009-07-19 12:01:37
Are the textures in their proper colours?
Title: Re: Ripping Dirge of Cerberus
Post by: obesebear on 2009-07-19 17:14:55
I wish I could tell you.  I have DirectX10.  When running the plugin in DirectX10 mode I get nothing, but the game runs very smoothly.  Once I change the plugin to run in DirectX9 hardware mode, I get the same textures I've been getting.

I did have some luck running in software mode.  It captured the main title screen perfectly (colors and all)  I'm just having trouble converting the DDS file.  IRfanview and dds convert won't work for some reason.

I think if you are able to get to the model viewer section in software mode it would rip the textures.  I just can't seem to get that far
Title: Re: Ripping Dirge of Cerberus
Post by: Satoh on 2009-07-26 03:37:33
I believe the issues with the color on those textures you have are a CLUT issue.

I think the textures may  have multiple palettes, one palette for some parts of the texture, and another palette for the other parts. Chrono Cross uses the same MO on its textures...
Title: Re: Ripping Dirge of Cerberus
Post by: ultima espio on 2009-07-26 11:53:39
Well i guess it's time....

I figured this out when i used the program texmod on pcsx2 to try and capture the textures.

The textures work JUST like FFX, they are in those horrible palettes. I've managed to merge some of them together, and i had to change the hue of the image by +170.

(http://i85.photobucket.com/albums/k61/ultima_espio/Yuffietex.png)

Zerogs does NOT give a good result for ripping textures, just gives garbage :|
Title: Re: Ripping Dirge of Cerberus
Post by: Xelane on 2009-07-26 14:13:52
oh...my...god....is that....yuffie? WTF DID YOU DO TO HER!!!

Murderer!  :-D
Title: Re: Ripping Dirge of Cerberus
Post by: Kudistos Megistos on 2009-07-26 15:07:13
Come on, we all felt like that after seeing our spam folders fill up with those messages in Crisis Core  :-D

Anyways, it's nice to see something working. Maybe one day we'll be able to rip Vincent's model and put him in FF7  :wink:
Title: Re: Ripping Dirge of Cerberus
Post by: obesebear on 2009-07-26 16:01:15
Well i guess it's time....

I figured this out when i used the program texmod on pcsx2 to try and capture the textures.

The textures work JUST like FFX, they are in those horrible palettes. I've managed to merge some of them together, and i had to change the hue of the image by +170.

(http://i85.photobucket.com/albums/k61/ultima_espio/Yuffietex.png)

Zerogs does NOT give a good result for ripping textures, just gives garbage :|
Great job! Check out this post...

New info :)"Which model-ripping utility are you using with PCSX2"
3dripper dx + gdx 1.7 for texture and gsplugin for mesh.
and
3dvia printscreen grabs the axis data, so 2 views is unnecessary.
As you can see in the model I uploaded, 3DVia rips 3 separate angles of the model.  All are scaled differently for some reason, and I can't for the life of me get the Z-axis to scale.  It technically is a 3D model and has about 2 dozen different meshes, but this looks like a job for someone more efficient with 3D modeling.
Notice to grab the textures this guy had suggested to use gdx 1.7 (I think the newest is 1.14.  1.7 was the newest at the time of that post)  Using it in DirectX10 with 3DRipperDX will get you nothing, but Directx9 in Software mode seems EXTREMELY promising. Hardware mode can grab stuff, but I couldn't get anything useful off of Chaos.

Then again it seems like texmod may be even better ;)
Title: Re: Ripping Dirge of Cerberus
Post by: ultima espio on 2009-07-26 16:27:32
It has a little problem with pcsx2 though...with some textures, it likes to cycle through them, and doesn't let you save them. It's rather annoying, but at least we get some :-)
Title: Re: Ripping Dirge of Cerberus
Post by: Satoh on 2009-07-26 17:48:23
Try running that texture through tile molester and changing the palettes around... I'm positive you'll find a spot that makes the other colors look right while at the same time screwing up the blue and orange.
Title: Re: Ripping Dirge of Cerberus
Post by: obesebear on 2009-08-17 17:59:58
Well, although MarioKart64n says 3Dvia is the way to go when ripping models, I can't seem to scale any Z-axis.    2 new posts found...

Vista uses DX10, which should be common knowledge by now

basically that's all vista does is use emulation and backwards compatibility to "fake" dx9 and run dx9 programs. >BUT IT IS NOT TRUE DX9<

essentially, it's impossible on a Vista system.

So now I have to find my old XP boot disc to install on my new computer.

There have also been a few others like this (http://www.facepunch.com/showthread.php?t=197075) that know how to get models and textures from PCSX2...
Title: Re: Ripping Dirge of Cerberus
Post by: ultima espio on 2009-08-17 18:01:33
I do NOT want to see Cerberus models appearing on facepunch. EVER.
Title: Re: Ripping Dirge of Cerberus
Post by: obesebear on 2009-08-17 18:33:05
I do NOT want to see Cerberus models appearing on facepunch. EVER.
What?  Why?
Title: Re: Ripping Dirge of Cerberus
Post by: Satoh on 2009-08-17 18:35:38
Will someone please... for the love of god... host a copy of 3DVia Printscreen... It's not longer available on the their site...

I might be able to help with the ripping but I need 3DViaPS...
Title: Re: Ripping Dirge of Cerberus
Post by: ultima espio on 2009-08-17 18:36:21
I'd rather not see people take our hard work and rape it. By that i mean re colouring the characters to make new fan ones. Combining characters is even worse. OH GOD CAIT SITH AND YUFFIE MERGED :cry: :-P

Will someone please... for the love of god... host a copy of 3DVia Printscreen... It's not longer available on the their site...

I might be able to help with the ripping but I need 3DViaPS...

I dunno what site your on, but its right here

http://www.3dvia.com/blog/software/3dvia-labs/3dvia-printscreen/
Title: Re: Ripping Dirge of Cerberus
Post by: Satoh on 2009-08-17 18:39:46
Ok wtf... I was just there and the link was busted... I swear... the world just doesn't want me to have PS2 models at all...

The link you posted works... just to be clear.
Title: Re: Ripping Dirge of Cerberus
Post by: obesebear on 2009-08-17 18:52:52
Chaos v.1 Download (http://www.mediafire.com/download.php?mythwmjmq24)

He was originally detached into a few dozen different parts, and then 3 separate parts from there.  So the few dozen have been attached to each other appropriately. 
All 3 instances have then been scaled to be similar size and closer to the grid for easier manageability.


Satoh, you will also want this...http://www.4shared.com/dir/5807782/1c394251/KoichiSenada.html (http://www.4shared.com/dir/5807782/1c394251/KoichiSenada.html) 3dsmax>>3dsMaxConvertXML>>2008.11.25.   This will convert the files 3Dvia gives you into a .max scene

I'd rather not see people take our hard work and rape it. By that i mean re colouring the characters to make new fan ones. Combining characters is even worse. OH GOD CAIT SITH AND YUFFIE MERGED :cry: :-P

You know, if they could at least get something I would be happy.   As long as SOMEONE can make some progress with these things.

Now back to work on chaos....
Title: Re: Ripping Dirge of Cerberus
Post by: Kudistos Megistos on 2009-08-17 19:08:05
It has come to my attention that the title of this thread is rather inauspicious. After all, we're just exploring and finding things out about the models from DoC, aren't we? *wink wink*

Title: Re: Ripping Dirge of Cerberus
Post by: obesebear on 2009-08-17 19:20:17
Basically what we're trying to do is catch up to the people that already know how to do this and have posted their findings on other forums, such as www.facepunch.com (http://www.facepunch.com).    Making the thread about Dirge of Cerberus simply keeps it FF7 related. 
All the tools for what we want to do are already there, and have been successfully used by others, it's just trying to figure out the correct configuration that is the problem.
Title: Re: Ripping Dirge of Cerberus
Post by: halkun on 2009-08-17 19:32:25
I would strongly suggest that you take the ripping conversation elsewhere.
Title: Re: Ripping Dirge of Cerberus
Post by: obesebear on 2009-08-17 19:42:58
I would strongly suggest that you take the ripping conversation elsewhere.
There is/will be no discussion of putting any models into the game, but very well.

If anyone is interested in continued discussion on this matter, the topic has been moved to another site.  If you would like to be a part of it, send me a PM and I will gladly link you to it.   I will be transferring all the helpful information from this thread to there, so that this one may die a quiet death   :cry:

Edited to remove site link
Title: Re: Ripping Dirge of Cerberus
Post by: ziggurat on 2009-09-14 11:00:49
3dripper dx doesn't support a perfect mesh file. i's just preview a front side model. anybody, can give other idea?
Title: Re: Ripping Dirge of Cerberus
Post by: ultima espio on 2009-09-14 14:45:22
no
Title: Re: Ripping Dirge of Cerberus
Post by: halkun on 2009-09-14 18:42:40
I guess I wasn't heard the first time.