The Forum is up for sale: XeNTaX Forum looking for new owner
Starship Troopers TA pdo models
- PredatorCZ
- mega-veteran

- Posts: 291
- Joined: Mon Apr 21, 2014 8:32 pm
- Has thanked: 11 times
- Been thanked: 256 times
- Contact:
Starship Troopers TA pdo models
Hi,
so few days ago I get STTA game so I blah blah blah I'll skip that boring part.
In short way I yesterday created ms script to load meshes (PDO files), BUT I'm able to get only few blocks like animations, bones, etc.
And I cannot see any faces nor facecounts,vertexcounts, but it seems vertex data is here.
First I thought its not mesh file but after researching whole filestructure those must be ones coz there are only textures, terrain, script and those pdo files.
So Im asking for help becouse I have never seen anything like this before.
Thanks.
Packing script and some pdo files.
so few days ago I get STTA game so I blah blah blah I'll skip that boring part.
In short way I yesterday created ms script to load meshes (PDO files), BUT I'm able to get only few blocks like animations, bones, etc.
And I cannot see any faces nor facecounts,vertexcounts, but it seems vertex data is here.
First I thought its not mesh file but after researching whole filestructure those must be ones coz there are only textures, terrain, script and those pdo files.
So Im asking for help becouse I have never seen anything like this before.
Thanks.
Packing script and some pdo files.
You do not have the required permissions to view the files attached to this post.
- 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: Starship Troopers TA pdo models
for the bridge it's rather simple: from 0x5B6C you'll find 122 vertices, vertex block size: 36
and from 0x6CA8 DWord face indices f1, f2,f3 (also in 36 bytes blocks), 86 faces next submesh to be found at 0x78AC, H2O file:
0x9018 298
Vb1
36 28
0x78AC 166
040000
0x0 255
and from 0x6CA8 DWord face indices f1, f2,f3 (also in 36 bytes blocks), 86 faces next submesh to be found at 0x78AC, H2O file:
0x9018 298
Vb1
36 28
0x78AC 166
040000
0x0 255
You do not have the required permissions to view the files attached to this post.
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?"
- PredatorCZ
- mega-veteran

- Posts: 291
- Joined: Mon Apr 21, 2014 8:32 pm
- Has thanked: 11 times
- Been thanked: 256 times
- Contact:
- PredatorCZ
- mega-veteran

- Posts: 291
- Joined: Mon Apr 21, 2014 8:32 pm
- Has thanked: 11 times
- Been thanked: 256 times
- Contact:
Re: Starship Troopers TA pdo models
Becouse of nodes does not have parent id I have a big problem with hierarchy.
Hierarchy is stored in childcount tham mean any node have its own child count like
Node 1 have 3 childs
Node 2 have 2 childs
Node 3 have 0 childs
Node 4 -> 0
Node 5 -> 1
Node 6 -> 0
Node 7 -> 0
So it should look like
its a little confusing but I cannot find a way to make propper hierarchy and tell nodes whos their parent.
Any help how should be looking function for that??
Hierarchy is stored in childcount tham mean any node have its own child count like
Node 1 have 3 childs
Node 2 have 2 childs
Node 3 have 0 childs
Node 4 -> 0
Node 5 -> 1
Node 6 -> 0
Node 7 -> 0
So it should look like
Code: Select all
Node 1 #numchilds 3
Node 2 #numchilds 2
Node 3 #numchilds 0
Node 4 #numchilds 0
Node 5 #numchilds 1
Node 6 #numchilds 0
Node 7 #numchilds 0
Any help how should be looking function for that??
-
Szkaradek123
- mega-veteran

- Posts: 292
- Joined: Wed May 05, 2010 8:21 pm
- Location: Poland Głogów
- Has thanked: 21 times
- Been thanked: 739 times
Re: Starship Troopers TA pdo models
Hi
Sections:
1.header
2.animation info
3.animation data
4.lod info
5.lod data
5.1.skeleton
5.2.meshes
ad1.
int32
string20 from 20 bytes
int32 - animCount int
int32 - lodCount
int32 - boneCount
skip 32 bytes
ad2. repeat animCount
string20 - animation name
int32 - id
int32 - fps
int32 - unk
int32 - absolut offset to animation data
ad3.
ad4.repeat lodCount
int32 - boneCount
int32 - unk
int32 - unk
int32 - offset to lod data
ad5. repeat lodCount
ad5.1. repeat boneCount
int32 - unk
int32 - unk
int32 - unk
string24 - bone name
int32 - unk
int32 - unk
int32 - unk
int32 - parentID
int32 - vertCount for a mesh bind with this bone
int32 - faceCount for a mesh bind with this bone
int32 - unk
int32 -unk
Vector f3 - bone position relativ to parent bone
Quaternion 4f - bone rotation relativ to parent bone
Vector f3
Quaternion 4f
ad.5.2.
mesh is parenting to bone
Sorry. I can't explain good. Please look at python script for importing pdo.
Sections:
1.header
2.animation info
3.animation data
4.lod info
5.lod data
5.1.skeleton
5.2.meshes
ad1.
int32
string20 from 20 bytes
int32 - animCount int
int32 - lodCount
int32 - boneCount
skip 32 bytes
ad2. repeat animCount
string20 - animation name
int32 - id
int32 - fps
int32 - unk
int32 - absolut offset to animation data
ad3.
ad4.repeat lodCount
int32 - boneCount
int32 - unk
int32 - unk
int32 - offset to lod data
ad5. repeat lodCount
ad5.1. repeat boneCount
int32 - unk
int32 - unk
int32 - unk
string24 - bone name
int32 - unk
int32 - unk
int32 - unk
int32 - parentID
int32 - vertCount for a mesh bind with this bone
int32 - faceCount for a mesh bind with this bone
int32 - unk
int32 -unk
Vector f3 - bone position relativ to parent bone
Quaternion 4f - bone rotation relativ to parent bone
Vector f3
Quaternion 4f
ad.5.2.
mesh is parenting to bone
Sorry. I can't explain good. Please look at python script for importing pdo.
You do not have the required permissions to view the files attached to this post.
- PredatorCZ
- mega-veteran

- Posts: 291
- Joined: Mon Apr 21, 2014 8:32 pm
- Has thanked: 11 times
- Been thanked: 256 times
- Contact:
Re: Starship Troopers TA pdo models
Well, I have already created MaxScript, it can load every mesh, Only problem is parenting possitions.
Last edited by PredatorCZ on Sat Dec 20, 2014 3:18 pm, edited 1 time in total.
-
Szkaradek123
- mega-veteran

- Posts: 292
- Joined: Wed May 05, 2010 8:21 pm
- Location: Poland Głogów
- Has thanked: 21 times
- Been thanked: 739 times
Re: Starship Troopers TA pdo models
Hi
Good job with max script.
Maybe try build armature with relativ relations for bones. (from line 119)
Try this at line 123 . here is parent id:
msh.name = readschars f 40 <==>readschars f 24 + unk,unk,unk,bone.parentID=readlong,readlong,readlong,readlong
And after than get needed matrix(absolut) for mesh from bone with the same name.
Or try build matrix list with recursion function.
Edit:
at line 146:
msh.rot = (quat r21 r22 r23 r24)
please use:
msh.rot = (quat r14 r21 r22 r23)
Good job with max script.
Maybe try build armature with relativ relations for bones. (from line 119)
Try this at line 123 . here is parent id:
msh.name = readschars f 40 <==>readschars f 24 + unk,unk,unk,bone.parentID=readlong,readlong,readlong,readlong
And after than get needed matrix(absolut) for mesh from bone with the same name.
Or try build matrix list with recursion function.
Edit:
at line 146:
msh.rot = (quat r21 r22 r23 r24)
please use:
msh.rot = (quat r14 r21 r22 r23)
- PredatorCZ
- mega-veteran

- Posts: 291
- Joined: Mon Apr 21, 2014 8:32 pm
- Has thanked: 11 times
- Been thanked: 256 times
- Contact:
Re: Starship Troopers TA pdo models
Yes, I edited that, thanks for info in script. Now its working how it should be 

Also any tips for animation data?

Also any tips for animation data?
Last edited by PredatorCZ on Sun Dec 21, 2014 10:47 am, edited 2 times in total.
-
Szkaradek123
- mega-veteran

- Posts: 292
- Joined: Wed May 05, 2010 8:21 pm
- Location: Poland Głogów
- Has thanked: 21 times
- Been thanked: 739 times
Re: Starship Troopers TA pdo models
I have no idea.
Maybe use bytes for rotation key (example: 4/256,6/256,34/256 Euler ?) not shorts.
Maybe use bytes for rotation key (example: 4/256,6/256,34/256 Euler ?) not shorts.
- PredatorCZ
- mega-veteran

- Posts: 291
- Joined: Mon Apr 21, 2014 8:32 pm
- Has thanked: 11 times
- Been thanked: 256 times
- Contact:
Re: Starship Troopers TA pdo models
Okay, so here is my final version of script.
It can merge multimeshes to one so skinning operation is much faster.
Bones
Weights
LODs as Objects
UVs
Materials should be set manually, same for MATIDs.
I cannot understand animations so they are not in process.
Textures are in Portable Pixmap format (PPM), so they can be opened in every good editor/viewer.
It can merge multimeshes to one so skinning operation is much faster.
Bones
Weights
LODs as Objects
UVs
Materials should be set manually, same for MATIDs.
I cannot understand animations so they are not in process.
Textures are in Portable Pixmap format (PPM), so they can be opened in every good editor/viewer.
You do not have the required permissions to view the files attached to this post.
