Hello guys,
About the game:
develoled by 3G Studios and published by Sierra.
Release date: October 26, 2007.
Special thanks: CarLuver69, shakotay2, Nick W and of course for everybody in XeNTaX forum.
As you know with CarLuver69, shakotay2, Nick W 's help we can export files from the game's archive, so I've exported some .dob files
I think these files are models.
Here is some sample file of it:
http://www.mediafire.com/download/2m81x ... models.rar
Thank you for help.
Important information: this site is currently scheduled to go offline indefinitely by end of the year.
S.W.A.T. Target Liberty (*.dob) models.
- shakotay2
- MEGAVETERAN
- Posts: 4291
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1151 times
- Been thanked: 2244 times
Re: S.W.A.T. Target Liberty (*.dob) models.
point cloud of swatvan looks like this: (don't have the time to care for face indices)
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?"
-
- beginner
- Posts: 20
- Joined: Mon Jun 22, 2015 6:59 pm
- Location: Budapest/ Hungary
- Has thanked: 8 times
- Been thanked: 3 times
Re: S.W.A.T. Target Liberty (*.dob) models.
No problem thanks for help
shakotay2 wrote:point cloud of swatvan looks like this: (don't have the time to care for face indices)
-
- VIP member
- Posts: 1330
- Joined: Wed Nov 05, 2008 12:16 pm
- Has thanked: 2710 times
- Been thanked: 884 times
Re: S.W.A.T. Target Liberty (*.dob) models.
I would love to see how the face data is stored in this dob format, i have seen samples before where i could get a good point cloud but there was no clear face data shown.shakotay2 wrote:point cloud of swatvan looks like this: (don't have the time to care for face indices)
-snip-
The 22 byte vertex pattern goes the entire length of the file so i guess the face data is inline with the vertex data but i have no idea how to set this in Hex2obj.
- shakotay2
- MEGAVETERAN
- Posts: 4291
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1151 times
- Been thanked: 2244 times
Re: S.W.A.T. Target Liberty (*.dob) models.
You'll need a fake tristripped face indices list:
(It's on my todo list.)You do not have the required permissions to view the files attached to this post.
Last edited by shakotay2 on Fri Jan 08, 2016 10:12 am, edited 1 time in total.
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?"
-
- beginner
- Posts: 20
- Joined: Mon Jun 22, 2015 6:59 pm
- Location: Budapest/ Hungary
- Has thanked: 8 times
- Been thanked: 3 times
Re: S.W.A.T. Target Liberty (*.dob) models.
I just made a test with hr_nypd.dob model
the vertex data started from: 490 and I used 8000 for count
update: right count for verts is: 8247
the vertex data started from: 490 and I used 8000 for count
update: right count for verts is: 8247
- shakotay2
- MEGAVETERAN
- Posts: 4291
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1151 times
- Been thanked: 2244 times
Re: S.W.A.T. Target Liberty (*.dob) models.
Try adding tristripped face indices such like these:
f 1 2 3
f 2 4 3
f 3 4 5
f 4 6 5
f 5 6 7
f 6 8 7
f 7 8 9
[...]
f 8240 8242 8241
f 8241 8242 8243
f 8242 8244 8243
f 8243 8244 8245
f 8244 8246 8245
f 8245 8246 8247
to a test.obj file created when pressing the 'mesh' button in point cloud mode. (edit: new pic: Fake mode) There's different implementations of the tristripped algo thus it may come that we've some superfluous faces here because I used a very simple scheme:
a b c
b c+1 c
c c+1 c+2 (where you could substitue c:=a, c+1:=b, c+2:=c to gain the next line b c+1 c as above)
didn't check for all faces but seems to work:
8241 8242 8243
8242 8244 8243
8243 8244 8245 (a b c -> next face b c+1 c is 8244 8246 8245)
edit: I've updated hex2obj to version 0.24d to have those tristripped face indices autogenerated.
Since it's scarcely tested find it in a subpost as of 12th of June in the Extracting simple models thread.
f 1 2 3
f 2 4 3
f 3 4 5
f 4 6 5
f 5 6 7
f 6 8 7
f 7 8 9
[...]
f 8240 8242 8241
f 8241 8242 8243
f 8242 8244 8243
f 8243 8244 8245
f 8244 8246 8245
f 8245 8246 8247
to a test.obj file created when pressing the 'mesh' button in point cloud mode. (edit: new pic: Fake mode) There's different implementations of the tristripped algo thus it may come that we've some superfluous faces here because I used a very simple scheme:
a b c
b c+1 c
c c+1 c+2 (where you could substitue c:=a, c+1:=b, c+2:=c to gain the next line b c+1 c as above)
didn't check for all faces but seems to work:
8241 8242 8243
8242 8244 8243
8243 8244 8245 (a b c -> next face b c+1 c is 8244 8246 8245)
edit: I've updated hex2obj to version 0.24d to have those tristripped face indices autogenerated.
Since it's scarcely tested find it in a subpost as of 12th of June in the Extracting simple models thread.
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?"
-
- beginner
- Posts: 20
- Joined: Mon Jun 22, 2015 6:59 pm
- Location: Budapest/ Hungary
- Has thanked: 8 times
- Been thanked: 3 times
Re: S.W.A.T. Target Liberty (*.dob) models.
Nice work with itshakotay2 wrote: edit: I've updated hex2obj to version 0.24d to have those tristripped face indices autogenerated.
Since it's scarcely tested find it in a subpost as of 12th of June in the Extracting simple models thread.
I tested it and worked well, there are same faces messed up but it's working
-
- beginner
- Posts: 20
- Joined: Mon Jun 22, 2015 6:59 pm
- Location: Budapest/ Hungary
- Has thanked: 8 times
- Been thanked: 3 times
Re: S.W.A.T. Target Liberty (*.dob) models.
Hello all,
For this project I opened a Github repo and uploaded the existing code.
https://github.com/Sleepy93/swat-tl-editor
Today I've updated the code with added 3D model exporting support.
It's not the best so every help will be useful and I'll be really glad to get some help about it.
For more information please read the Github Readme.md.
Thanks,
Sleepy
For this project I opened a Github repo and uploaded the existing code.
https://github.com/Sleepy93/swat-tl-editor
Today I've updated the code with added 3D model exporting support.
It's not the best so every help will be useful and I'll be really glad to get some help about it.
For more information please read the Github Readme.md.
Thanks,
Sleepy
- shakotay2
- MEGAVETERAN
- Posts: 4291
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1151 times
- Been thanked: 2244 times
Re: S.W.A.T. Target Liberty (*.dob) models.
Hi Sleepy,
nice to see your progress.
After drive selection your program expects the path "PSP_GAME" to be present.
If not, nothing happens. (Maybe you should check for the folder to exist?)
I created that folder, then copied swatvan.dob to it which could be loaded and exported to obj.
Checking the obj I found vertices for the wheels only, and no face indices.
Am I missing something?
nice to see your progress.
After drive selection your program expects the path "PSP_GAME" to be present.
If not, nothing happens. (Maybe you should check for the folder to exist?)
I created that folder, then copied swatvan.dob to it which could be loaded and exported to obj.
Checking the obj I found vertices for the wheels only, and no face indices.
Am I missing something?
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?"
-
- beginner
- Posts: 20
- Joined: Mon Jun 22, 2015 6:59 pm
- Location: Budapest/ Hungary
- Has thanked: 8 times
- Been thanked: 3 times
Re: S.W.A.T. Target Liberty (*.dob) models.
Thanks for your replyshakotay2 wrote:Hi Sleepy,
nice to see your progress.
After drive selection your program expects the path "PSP_GAME" to be present.
If not, nothing happens. (Maybe you should check for the folder to exist?)
I created that folder, then copied swatvan.dob to it which could be loaded and exported to obj.
Checking the obj I found vertices for the wheels only, and no face indices.
Am I missing something?
On the next weekend I'll work on the tool.
Nowadays I'm a bit busy.
Carluver69 helped on re-search so now I understand where and how the data stored.
Now I can calculate the number of verts etc.
Thanks again.
- shakotay2
- MEGAVETERAN
- Posts: 4291
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1151 times
- Been thanked: 2244 times
Re: S.W.A.T. Target Liberty (*.dob) models.
no problem.Sleepy wrote:Nowadays I'm a bit busy.
I had a deeper look at your project, introduced a vertex count and found that it was ok: 1136 (well, 1135 is better)
(dunno why blender showed the wheels only in a point cloud )
I added/copypasted tristripped face indices (from hex2obj) and realized a scaling problem (upper part of picture).
did some adaptions to your function void Export_OBJ()
br.BaseStream.Position = 0xCA-1;
(since I didn't understand why you read this byte: br.ReadByte();
and wanted to leave it unchanged, so had to start one byte earlier)
In the while loop while (br.PeekChar() > -1)
I adapted this:
Code: Select all
ushort x, y, z;
float fx, fy, fz ;
br.ReadByte();
x = br.ReadUInt16(); fx = (float)(x / 256.0); if (fx >= 128.0) fx -= (float) 256.0;
y = br.ReadUInt16(); fy = (float)(y / 256.0); if (fy >= 128.0) fy -= (float) 256.0;
z = br.ReadUInt16(); fz = (float)(z / 256.0); if (fz >= 128.0) fz -= (float) 256.0;
sw.WriteLine("v {0} {1} {2}", fx.ToString(System.Globalization.CultureInfo.InvariantCulture), fy.ToString(System.Globalization.CultureInfo.InvariantCulture), fz.ToString(System.Globalization.CultureInfo.InvariantCulture));
remark: you might replace "(System.Globalization.CultureInfo.InvariantCulture)" by "()"
I had to use it to avoid commas to be logged to the obj file instead of points.
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?"
-
- beginner
- Posts: 20
- Joined: Mon Jun 22, 2015 6:59 pm
- Location: Budapest/ Hungary
- Has thanked: 8 times
- Been thanked: 3 times
Re: S.W.A.T. Target Liberty (*.dob) models.
Thanks I replaced in the code the verts coords convertion.shakotay2 wrote:no problem.Sleepy wrote:Nowadays I'm a bit busy.
I had a deeper look at your project, introduced a vertex count and found that it was ok: 1136 (well, 1135 is better)
(dunno why blender showed the wheels only in a point cloud )
I added/copypasted tristripped face indices (from hex2obj) and realized a scaling problem (upper part of picture).
did some adaptions to your function void Export_OBJ()
br.BaseStream.Position = 0xCA-1;
(since I didn't understand why you read this byte: br.ReadByte();
and wanted to leave it unchanged, so had to start one byte earlier)
In the while loop while (br.PeekChar() > -1)
I adapted this:which resulted in the lower part of the picture. edit: introduced code for the uvs but as you can see from the picture there's too many connectionsCode: Select all
ushort x, y, z; float fx, fy, fz ; br.ReadByte(); x = br.ReadUInt16(); fx = (float)(x / 256.0); if (fx >= 128.0) fx -= (float) 256.0; y = br.ReadUInt16(); fy = (float)(y / 256.0); if (fy >= 128.0) fy -= (float) 256.0; z = br.ReadUInt16(); fz = (float)(z / 256.0); if (fz >= 128.0) fz -= (float) 256.0; sw.WriteLine("v {0} {1} {2}", fx.ToString(System.Globalization.CultureInfo.InvariantCulture), fy.ToString(System.Globalization.CultureInfo.InvariantCulture), fz.ToString(System.Globalization.CultureInfo.InvariantCulture));
remark: you might replace "(System.Globalization.CultureInfo.InvariantCulture)" by "()"
I had to use it to avoid commas to be logged to the obj file instead of points.
I'll do the next updates at the weekend
By the way I hope the face generating once will be well.
-
- beginner
- Posts: 20
- Joined: Mon Jun 22, 2015 6:59 pm
- Location: Budapest/ Hungary
- Has thanked: 8 times
- Been thanked: 3 times
Re: S.W.A.T. Target Liberty (*.dob) models.
Dear all
Github repo is updated.
summarizes the change of the code:
As shakotay2 advised:
PSP_GAME folder check is added - if it can't find than program throws InvalidDataException("PSP_GAME Folder Does not exists").
Based on my re-search I've added support different type of models (01 - SingleModel, 24 - MAP object, 25 - Character)
Which model has zeros as the number of animation but has animation offset it means that there is .anm file next to the dob model in the LMP archive.
Carluver69 made some improvements on the code and regarding to it I've done some additional research of the dob files.
Currently working on fixing the export obj function because using the vertex pointer it reads wrong verts coords...
The old exporter is commented out and tried to use that one which carluver69 re-wrote.
https://github.com/Sleepy93/swat-tl-edi ... xporter.cs
As I could see in case of swatvan.dob:
The offset of verts regarding to the reading of file is: 0xD0...
however regarding to what works in (hex2obj) the start of the vertex block is 0xCA
If we read the model from 0xCA than there is a flying vertex and it is connected to the chassis maybe it would be siren.. just not in right position
If i check hr_nypd.dob than:
The verts offset is: 0x480
however in hex2obj we can only read the model well if the offset is 0x490
with hr_nypd.dob checked some options with uv mapping and it is flipped maybe it could caused by the scaling problem which is already mentioned
hex2obj settings:
UV mapping:
Texture:
I've checked a map level with hex2obj but I didn't find yet how it should show well.
I've uploaded a sample file of it:
https://www.mediafire.com/file/oi0qngz2 ... a.dob/file
Github repo is updated.
summarizes the change of the code:
As shakotay2 advised:
PSP_GAME folder check is added - if it can't find than program throws InvalidDataException("PSP_GAME Folder Does not exists").
Based on my re-search I've added support different type of models (01 - SingleModel, 24 - MAP object, 25 - Character)
Which model has zeros as the number of animation but has animation offset it means that there is .anm file next to the dob model in the LMP archive.
Carluver69 made some improvements on the code and regarding to it I've done some additional research of the dob files.
Currently working on fixing the export obj function because using the vertex pointer it reads wrong verts coords...
The old exporter is commented out and tried to use that one which carluver69 re-wrote.
https://github.com/Sleepy93/swat-tl-edi ... xporter.cs
As I could see in case of swatvan.dob:
The offset of verts regarding to the reading of file is: 0xD0...
however regarding to what works in (hex2obj) the start of the vertex block is 0xCA
If we read the model from 0xCA than there is a flying vertex and it is connected to the chassis maybe it would be siren.. just not in right position
If i check hr_nypd.dob than:
The verts offset is: 0x480
however in hex2obj we can only read the model well if the offset is 0x490
with hr_nypd.dob checked some options with uv mapping and it is flipped maybe it could caused by the scaling problem which is already mentioned
hex2obj settings:
UV mapping:
Texture:
I've checked a map level with hex2obj but I didn't find yet how it should show well.
I've uploaded a sample file of it:
https://www.mediafire.com/file/oi0qngz2 ... a.dob/file
- Durik256
- ultra-veteran
- Posts: 428
- Joined: Wed Nov 21, 2018 7:26 pm
- Has thanked: 45 times
- Been thanked: 429 times
Re: S.W.A.T. Target Liberty (*.dob) models.
I quickly made a plugin for Noesis:
there are "zero" invisible faces:
You do not have the required permissions to view the files attached to this post.