News: 11 March 2016 - Forum Rules, Mobile Version
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia

Author Topic: Need help on psx model ripping (Tomba 2)  (Read 918 times)

AtanoKSi

  • Jr. Member
  • **
  • Posts: 12
  • Musician, Bootleg collector and romhacker
    • View Profile
    • Join my Tomba! (Tombi!) discord server!
Need help on psx model ripping (Tomba 2)
« on: January 19, 2018, 03:55:49 pm »
Hi!
Well this is the 4th day (I think) that I'm stuck with this:
I love psx games, and one of my favs is Tomba! 2 (Or Tombi! 2 in Europe), so some days ago started thinking that would be cool to have the tomba 3d model to do animations, pictures, romhacks (One of my ideas is to have a Mario 64 hack with tomba on it), etc, just because I think is a very forgoten game that deserves more... Fun?

So well, it's well known (I think I've surfed the entire google learning about it) that Psx model ripping is HARD and almost impossible because Psx 3d games lacks of Z view.

Listen I'm not really looking for somebody to do this for me, if somebody wants it would be awesome, but the only thing I ask is for help, I really want to do this and I'll try until I get it.

Since the Ninja Ripper way is not likely to work... And since now I've been too many hours (Like 7 or 8 ) trying to figure out a way, I have an idea, but I don't know how to do it:

The tomba 2 cd has this files on it:



(Let's say this straight: I know nothing about programming
the only thing I did is modifying smb1 (NES) music with hex editing.)

My idea is to somehow reverse engineering it... I mean, there, somewhere in that files SHOULD be the data of the models, so if I just knew how and where to search, I would find it and copy the polygons in a 3d modeling engine (I use blender)
(And then when I finally success I will get stuck on how to get the textures because seems that it's hard too)
I don't know if there is another way, but is the only idea I have, if somebody has any better idea tell me please!

So, if you would like to help me, no matter if it is by your own hands, or guiding me, advicing me, or whatever, I would be eternally grateful.


笑i like bootlegs and stuff笑

Join my Tomba! (Tombi!) discord server!
https://discord.gg/A4ZpY74

weissvulf

  • Sr. Member
  • ****
  • Posts: 324
  • Good news! An anomaly solved the enigma.
    • View Profile
Re: Need help on psx model ripping (Tomba 2)
« Reply #1 on: January 19, 2018, 09:02:58 pm »
There's a big difference between extracting a basic non-animated 3D model and transferring it, complete with animations, to another game. I've extracted textured models before (long time ago), but there were very few tools to help.

If Tomba uses the standard TMD model format, you might try PsxMultiRip HERE. Or some of the tools HERE. If you're lucky, you'd find the meshes compete with the texture settings (UV). Milkshape3D HERE is one of the few modeling programs that will open TMD models. Jum's e3d can do some things too.

If you'd like to put Tomba in another game, my advice would be to find a 2D game and create a Tomba sprite. Perhaps you could even do that with screen captures from the original Tomba game.

AtanoKSi

  • Jr. Member
  • **
  • Posts: 12
  • Musician, Bootleg collector and romhacker
    • View Profile
    • Join my Tomba! (Tombi!) discord server!
Re: Need help on psx model ripping (Tomba 2)
« Reply #2 on: January 19, 2018, 09:31:54 pm »
Tried PSX MULTIRIP hours ago, just got a TIM file (The ps1 advice of the start of the game) and a TMD model that Milkshape3D won't want to open.
Also, I don't want the animations, I've already transferred models to Mario 64, just want the model.

And well the sprite thing... It's just not the same man, having a 3d model of your fav character is somehow like having a toy of it when you are a kid, and having 2d sprites would be like having a piece of paper of the character, not the same possibilities hahaha.
笑i like bootlegs and stuff笑

Join my Tomba! (Tombi!) discord server!
https://discord.gg/A4ZpY74

mz

  • Sr. Member
  • ****
  • Posts: 330
    • View Profile
Re: Need help on psx model ripping (Tomba 2)
« Reply #3 on: January 20, 2018, 08:07:48 am »
If you only want the 3D model, you can try just running the game with one of those hardware plugins (like Pete's D3D something, for example) and see if they work with the standard 3D rippers, like 3D Ripper DX or Ninja Ripper.

Also, PS1 models are so simple and low-poly that you could just recreate them without any effort at all if you have some minimal experience with 3D modeling (that is, if you can get the textures, which should be much easier to get than the full models!)
There has to be a better life.

AtanoKSi

  • Jr. Member
  • **
  • Posts: 12
  • Musician, Bootleg collector and romhacker
    • View Profile
    • Join my Tomba! (Tombi!) discord server!
Re: Need help on psx model ripping (Tomba 2)
« Reply #4 on: January 20, 2018, 08:41:13 am »
If you only want the 3D model, you can try just running the game with one of those hardware plugins (like Pete's D3D something, for example) and see if they work with the standard 3D rippers, like 3D Ripper DX or Ninja Ripper.

Also, PS1 models are so simple and low-poly that you could just recreate them without any effort at all if you have some minimal experience with 3D modeling (that is, if you can get the textures, which should be much easier to get than the full models!)

I tried it, it's the first thing I said, (But well I guess I did not explain it very well, was so tired)
What happens is that for start, Pete's plugins run via OpenGL, and the first thing that 3DRipperDX says on the webpage is:
Quote
3D Ripper DX supports only DirectX 6.x, 8.x and 9.x applications. OpenGL, older versions of DirectX and software renderers are not supported.

But also, PSX lacks on Z view because how Psx 3d engine works, so the people who succeeded to use a ripper, got just a plain 2d model, this is why my first post is about the another idea I talk about at the end of it.



And about recreating the model: I have some experience modeling, but not enough to accurately recreate a model, my experience is just modifying models, a bit of texturing, and modeling easy things, that's why having the exact polygon data of the game would be a good way to recreate it.
笑i like bootlegs and stuff笑

Join my Tomba! (Tombi!) discord server!
https://discord.gg/A4ZpY74

mz

  • Sr. Member
  • ****
  • Posts: 330
    • View Profile
Re: Need help on psx model ripping (Tomba 2)
« Reply #5 on: January 20, 2018, 09:32:06 am »
Ah, I see, sorry for my terribly wrong answer! I read your first post yesterday and I had already forgotten most of what you had tried before. (In any case, there are Pete's plugin for Direct3D!)

So, it looks like the only way you could extract them is by learning how to reverse engineer them...

I don't know absolutely anything about the PSX 3D hardware (or if it even has one at all), but this is what I would try to get started:

1. Learn the PSX assembly language.
2. Learn how to use a debugger (there should be quite a few PSX emulators with debugging capabilities nowadays.)
3. Read all the docs you can find about the PSX hardware and PSX SDK(s).
4. Set a breakpoint on functions that create polygons, upload textures, etc. Or if you can view these things in VRAM, set breakpoints on writing there... Hope you get an idea!

The only person I've seen do some work with 3D on the PSX is Gemini, but I think he's working on a lot of other projects already.
There has to be a better life.

AtanoKSi

  • Jr. Member
  • **
  • Posts: 12
  • Musician, Bootleg collector and romhacker
    • View Profile
    • Join my Tomba! (Tombi!) discord server!
Re: Need help on psx model ripping (Tomba 2)
« Reply #6 on: January 20, 2018, 12:36:37 pm »
Mmm, actually I won't mind giving Pete's Direct3D plugin a try (I mean, I may get a plain object but may help me to figure something, who knows!), I didn't knew it existed, but I can't find it, would you mind giving me a link?

Also, yeah, I totally would like to learn PSX assembly language, but since I have very few time for my romhacking hobby that will take me a lot of time, that's why I ask here if there's somebody who could help me or guide me while I slowly learn hahaha.

Thanks for your answers :)
笑i like bootlegs and stuff笑

Join my Tomba! (Tombi!) discord server!
https://discord.gg/A4ZpY74

mz

  • Sr. Member
  • ****
  • Posts: 330
    • View Profile
Re: Need help on psx model ripping (Tomba 2)
« Reply #7 on: January 20, 2018, 03:07:30 pm »
Mmm, actually I won't mind giving Pete's Direct3D plugin a try (I mean, I may get a plain object but may help me to figure something, who knows!), I didn't knew it existed, but I can't find it, would you mind giving me a link?
http://www.pbernert.com/html/gpu.htm#OGL

There is a gpuPeteD3D.dll file inside that archive! (Also, most of the older plugins were written for D3D, so there may be others if you look around.)

In any case, you could also try the ultimate solution for the extremely lazy/busy: ROM Corruption! You corrupt shit randomly in the files and note if anything you want has changed. If you're smart enough (or lucky), you could find something relatively fast...
There has to be a better life.

weissvulf

  • Sr. Member
  • ****
  • Posts: 324
  • Good news! An anomaly solved the enigma.
    • View Profile
Re: Need help on psx model ripping (Tomba 2)
« Reply #8 on: January 20, 2018, 07:35:59 pm »
In any case, you could also try the ultimate solution for the extremely lazy/busy: ROM Corruption!
I thought I was the only person ever pathetic enough to resort to this method!  ;D

The only things I would add to MZ's good advice is:
1) Try psxprev on all versions of Tomba games (Japanese 1 and 2 etc). It's possible that one of them will use the standard formats.

2) I was never sure if the flattening of the Z coordinate in emulators was caused by the PS1 itself or if it was a speed shortcut imposed by the emulator. It's obvious that TMDs start out with a Z. If it is imposed by the emulator, it might be possible to find one that doesn't handle the models this way.

3) I recall a project that was attempting to re-inflate flattened ripped models. Don't know if it ever went anywhere. but might be worth a search.

4) If Tomba models are not standard, they're probably only slightly modified because the 3D format is largely hardware dictated. There's good documentation on the PS1 basic formats so it might be possible to find the Tomba model by searching for a crucial aspect of model. For example, the model's texture should be easy enough to locate in VRAM. I recall that TMDs reference their texture's page internally, so searching for reference to the texture's VRAM location might uncover the model.
« Last Edit: January 20, 2018, 08:34:24 pm by weissvulf »

AtanoKSi

  • Jr. Member
  • **
  • Posts: 12
  • Musician, Bootleg collector and romhacker
    • View Profile
    • Join my Tomba! (Tombi!) discord server!
Re: Need help on psx model ripping (Tomba 2)
« Reply #9 on: January 22, 2018, 08:23:56 pm »
I thought I was the only person ever pathetic enough to resort to this method!  ;D

The only things I would add to MZ's good advice is:
1) Try psxprev on all versions of Tomba games (Japanese 1 and 2 etc). It's possible that one of them will use the standard formats.

2) I was never sure if the flattening of the Z coordinate in emulators was caused by the PS1 itself or if it was a speed shortcut imposed by the emulator. It's obvious that TMDs start out with a Z. If it is imposed by the emulator, it might be possible to find one that doesn't handle the models this way.

3) I recall a project that was attempting to re-inflate flattened ripped models. Don't know if it ever went anywhere. but might be worth a search.

4) If Tomba models are not standard, they're probably only slightly modified because the 3D format is largely hardware dictated. There's good documentation on the PS1 basic formats so it might be possible to find the Tomba model by searching for a crucial aspect of model. For example, the model's texture should be easy enough to locate in VRAM. I recall that TMDs reference their texture's page internally, so searching for reference to the texture's VRAM location might uncover the model.


Okay this is weird, I replied to your answer but maybe I didn't... Sent it? (It was like 4:00 AM lol)

So,

1)A really good Idea I never had in consideration, my original reply said that I was going to try it despite of the hour, and I did but I have some issues...
PSXPrev doesn't seems to work for me, I don't know if I'm using it right, I open PsxPrevLauncher.exe, give it the directory of where my iso is, check the TMD box, and scan... Then the commands window opens, theoretically scans the folder, but stays without doing nothing :(
Tried it with Japanese, English and Spanish versions of the game.
Also tried
-with ninja ripper (And the Pete d3d plugin on epsxe): nothing
-Jpsxdec: well, with this one I'm able to rip music and movies, but nothing else, the only difference I see is that the Spanish version has an extra loading screen.
-PsxMultiRiper: Got a TIM image of the first ps1 advice, and an unreadable TMD, milkshape says it's corrupted.
-3d Ripper DX: I think this one is the first one where I get SOMETHING. What I did was install the Pete's D3D plugin that MZ told me, and try to capture frames with 3d Ripper DX, surprisingly I got something, a crazy and flat mesh without textures... But it's something lol, I'm so far to figure out how to get anything but this made me actually very happy because I was so tired from not being able to get ANYTHING to work, I don't know why it doesn't get the textures though.

Then I did an experiment, I found a plugin for psx emulators called GpuBladeSoft which claims to actually implement the z-buffer to the emulator.
I was so excited to read that, but then I saw the problems:
It's a HELL hard to install, very unintuitive, and didn't actually managed the gui to work, but eventhough, apart of being GL based so I would need to search a gl 3d ripper... I've read a lot about this plugin and people says it doesn't actually work, so I think I will stop trying it and think another way.

2)Well, I don't know either, the I N T E R N E T comunity seems to affirm that it's the PS1 itself, but idk...

3)Any source of that project? Name or something? Tried to search but didn't knew exactly what keywords use.

4)This sadly my fault, because I know nothing about programming, and I have no time (I always try to learn actually but I'm very slow because I just can do it some short times.) so I don't know, I suppose this way would be a lot faster and easier if I wasn't so uneducated in this matters.
笑i like bootlegs and stuff笑

Join my Tomba! (Tombi!) discord server!
https://discord.gg/A4ZpY74

weissvulf

  • Sr. Member
  • ****
  • Posts: 324
  • Good news! An anomaly solved the enigma.
    • View Profile
Re: Need help on psx model ripping (Tomba 2)
« Reply #10 on: January 22, 2018, 11:53:38 pm »
Quote
give it the directory of where my iso
I'm fairly certain you'll need to extract the files off the CD image before scanning. PS1 disk images contain the CD sector-headers injected into the game-data at regular intervals. Extracting the file from the CD image will leave behind the sector-headers giving you the files as the game sees them. ISObuster is a good tool for extracting all the files off the image in one pass.

Quote
I got something, a crazy and flat mesh without textures.
You can get the textures separately. More importantly is if the Tomba model has its UV intact. If you don't know, UV is the common coordinate system used to record what part of the texture is displayed on a given polygon. Usually, to restore the texture on a ripped model, you open the mesh in a modeler, go to the 'materials' section, and select the texture (ripped separately). If the UV is intact, the model will look like it's supposed to. If not, you'll end up with a mess (repeated, stretched blobs etc).

Quote
Any source of that project? Name or something?
It was years ago. I think the basic method was taking two flat captures, one side view, and one front view, then transferring the missing coordinate data between the two. I don't know if it was just a tutorial or if there was a tool involved, but I'm pretty sure they were working with Resident Evil models.

The general theory is that each vertex on a 3D model has 3 coordinate values giving it's position relative to the model's center (root). If you save a flat model in a text-based format like X or MQO, you'll see that one of the coordinate values is '0' for every vertex. You would simply copy/paste the missing value from the 'side view' flat-model to the 'front-view'. If the two samples are not perfectly 90 degrees apart, and from the exact same pose, the model will end up warped. You could probably tweak it into shape though. Metasequoia is a good simple model editor that has a free version, if you wanted to try.

AtanoKSi

  • Jr. Member
  • **
  • Posts: 12
  • Musician, Bootleg collector and romhacker
    • View Profile
    • Join my Tomba! (Tombi!) discord server!
Re: Need help on psx model ripping (Tomba 2)
« Reply #11 on: January 23, 2018, 06:46:01 am »
I finally got the textures with 3d ripper DX, they were .dds on another folder.
The model SEEMS to have an UV map for them, but I don't know how to give it its texture, I did some texturing a year ago but I don't know how to apply textures that already has it's place set, and the only tutorials I find only tells how totexturize from scratch (in blender).

Anyway going to try what you said with psxprev :)
笑i like bootlegs and stuff笑

Join my Tomba! (Tombi!) discord server!
https://discord.gg/A4ZpY74

weissvulf

  • Sr. Member
  • ****
  • Posts: 324
  • Good news! An anomaly solved the enigma.
    • View Profile
Re: Need help on psx model ripping (Tomba 2)
« Reply #12 on: January 24, 2018, 06:33:47 am »
If you open a model that already has it's UV set, an entry should show up in something like a material panel. The name differs, but it's usually a browse button of some sort. just browse to your dds and, bam, the model should be skinned... if it has it's UV.