The Forum is up for sale: XeNTaX Forum looking for new owner
Atlus's .PB (3D model format)
Re: Atlus's .PB (3D model format)
I just released full source code for the new Win32 application I made to convert stuff to FBX, probably the single format that supports bones & stuff, absolutely needed for seeing actual models standing. Here's a link, and this is how Munakata looks like as of now. Not perfect, but definetely looking better
. If anyone wants to jump into the data hunt, they can do it now using the code.
You do not have the required permissions to view the files attached to this post.
-
Darkfox
- VVIP member

- Posts: 688
- Joined: Fri Jul 04, 2003 6:11 pm
- Has thanked: 33 times
- Been thanked: 16 times
Re: Atlus's .PB (3D model format)
Oh aye, definetly looking better, more parts are rendered now but still a bit light.
The switch to FBX was a great choice to preserve the structure of the model, will also make animation conversion easier to test out if that comes around.
All-in-all, well done! It is very appreciated on your contributions to cracking Megaten models.
All-in-all, well done! It is very appreciated on your contributions to cracking Megaten models.
-
TGE
- veteran
- Posts: 109
- Joined: Wed Jun 04, 2014 7:48 pm
- Location: Netherlands
- Has thanked: 20 times
- Been thanked: 36 times
- Contact:
Re: Atlus's .PB (3D model format)

Ty for the info on the format even though your coding is very confusing to read to be honest so I ended up having to figure out a lot myself :p
- shakotay2
- MEGAVETERAN

- Posts: 4231
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1139 times
- Been thanked: 2222 times
Re: Atlus's .PB (3D model format)
well, it's such comments/attitude which prevent me from releasing sourcesTGE wrote:[...] even though your coding is very confusing to read to be honest so I ended up having to figure out a lot myself :p
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
-
TGE
- veteran
- Posts: 109
- Joined: Wed Jun 04, 2014 7:48 pm
- Location: Netherlands
- Has thanked: 20 times
- Been thanked: 36 times
- Contact:
Re: Atlus's .PB (3D model format)
It's not an attitude, it's just very confusing for anyone but yourself to read sometimes.shakotay2 wrote:well, it's such comments/attitude which prevent me from releasing sourcesTGE wrote:[...] even though your coding is very confusing to read to be honest so I ended up having to figure out a lot myself :p
If you add enough comments and explain what things are and what they do (which he didn't do for the most part) there should be no problem.
Not to mention I'm not that great at reading C++ source code.
-
TGE
- veteran
- Posts: 109
- Joined: Wed Jun 04, 2014 7:48 pm
- Location: Netherlands
- Has thanked: 20 times
- Been thanked: 36 times
- Contact:
Re: Atlus's .PB (3D model format)
Seems like a leftover 'petrified' state model. It's a static model.Darkfox wrote:Long time but I'm impressed this has continued! Seems you've even got some models in animated states, or is that the default pose for Kodama's model?
I'm really struggling to get the models to 'stand up' but as far as loading the meshes themselves goes, I can load nearly all models.
I've even added support for field models, so you'll be able to rip environments as well.

Of course, nothing will look correct till I get the scene graph to work in my MaxScript.. though I honestly have no clue how to implement it.
-
TGE
- veteran
- Posts: 109
- Joined: Wed Jun 04, 2014 7:48 pm
- Location: Netherlands
- Has thanked: 20 times
- Been thanked: 36 times
- Contact:
Re: Atlus's .PB (3D model format)

Progress! I'm still working on this from time to time
-
TGE
- veteran
- Posts: 109
- Joined: Wed Jun 04, 2014 7:48 pm
- Location: Netherlands
- Has thanked: 20 times
- Been thanked: 36 times
- Contact:
Re: Atlus's .PB (3D model format)
Nearly yeah, there's a few more mesh types I have to figure out for everything to work properly and there's a minor bug with invalid offsets but it's getting there :pDarkfox wrote:Really good! Can see all the little finger joints too are there and no oddities. I'm assuming from this you nearly got the entire structure down?
-
Darkfox
- VVIP member

- Posts: 688
- Joined: Fri Jul 04, 2003 6:11 pm
- Has thanked: 33 times
- Been thanked: 16 times
Re: Atlus's .PB (3D model format)
Oh yeah? What other mesh types? How much of the format is understood and in the process of understanding? I'm interested to hear.TGE wrote:Nearly yeah, there's a few more mesh types I have to figure out for everything to work properly and there's a minor bug with invalid offsets but it's getting there :p
-
TGE
- veteran
- Posts: 109
- Joined: Wed Jun 04, 2014 7:48 pm
- Location: Netherlands
- Has thanked: 20 times
- Been thanked: 36 times
- Contact:
Re: Atlus's .PB (3D model format)
The format uses types for certain mesh types eg:Darkfox wrote:Oh yeah? What other mesh types? How much of the format is understood and in the process of understanding? I'm interested to hear.TGE wrote:Nearly yeah, there's a few more mesh types I have to figure out for everything to work properly and there's a minor bug with invalid offsets but it's getting there :p
0x1 for meshes with no bone assignments, 0x2 for meshes with weight assignment, 0x3 for (this is just as assumption) morpher meshes, 0x7 for.. bigger submeshes that use bone weights and 0x8 for bigger submeshes that don't use weights.
The format is horribly ps2-like with it's heavy use of vif code (ps2 gpu instructions, basically) shenanigans so in order to have a chance at parsing this correctly I wrote two functions to handle unpacking the data for me in max (here's the link to the function if you want to see it).
The weighted meshes were quite confusing for me to figure out because I had an oversight in my code and they're stored in a weird way.
Basically how they're stored is they define the amount of bones assigned to the object along with the respective bone ids.
Then you loop through the vif 'batches' bone amount times to get the indivual vertex segments which are stored as Vector4s with element 1,2,3 being the 'relative vertex position' and element 4 being the weight and after you've looped through them you need to merge the individual vertex segments back into 1 segment by de-interleaving them based on their bone influences and transforming them by their bone transforms.
Something like
Code: Select all
Vector3 vertex = vertexSegment * (relativeBoneMatrix * weightFloat)
It's kinda terrible to explain but it gets the job done.
As for the type 0x7 and 0x8 meshes, I don't really know too much about them yet. They just seem like 'less packed' versions of the 0x1 and 0x2 types.
The batch header and face indices are no longer packed but that's kinda it it seems.
The 0x3 meshes are kinda odd, I think they define an offset table in the beginning to all the different batches that make up the morpher meshes.
Luckily none of these types use special kind of face indices, so no weird ps2 triangle stripping.
-
TGE
- veteran
- Posts: 109
- Joined: Wed Jun 04, 2014 7:48 pm
- Location: Netherlands
- Has thanked: 20 times
- Been thanked: 36 times
- Contact:
Re: Atlus's .PB (3D model format)

Okay so I got the rest of the types working for the most part.
I haven't figured out how to assign the textures automatically though, so that'll take me some time to figure out.

