Important information: this site is currently scheduled to go offline indefinitely by end of the year.

Dead Space 2 Suit Models Help Please

Post questions about game models here, or help out others!
nightFlarer
beginner
Posts: 33
Joined: Thu May 13, 2010 8:25 am
Has thanked: 4 times
Been thanked: 2 times

Re: Dead Space 2 Suit Models Help Please

Post by nightFlarer »

Phew, ok, I am done. So it's the same deal guys with maxscripts.
Copy the code below, open up 3DS Max, Maxscript Menu>New Script, then paste, save, Maxscript Menu>Run Script, select the script you saved.

Now it's going to ask for the mesh file, so open up a .geo in the "Mesh" folder eg. 0144_torsoupper.geo
Then it's going to ask for the UV file which is also a .geo file, but should be in the "MeshVolatile" folder eg. 0145_torsoupper.geo
Notice that the number is different, lower is the mesh and greater is the UV.

14/02/11 Edit: Fixed the code so it didn't suck...

23/02/11 Edit 2: The .geo format is really inconsistent, so I've added an "if statement" for more compatibility.

6/03/11 Edit 3: Found another face count, should fix problems with files that have multiple meshes

Code: Select all

fname = getOpenFileName \
caption:"Open .geo from Mesh folder" \
types:"Dead Space 2 Mesh(*.geo)|*.geo" \
historyCategory:"DeadSpace2ObjectPresets"
f = fopen fname "rb"
gname = getOpenFileName \
caption:"Open .geo from MeshVolatile folder" \
types:"Dead Space 2 UV(*.geo)|*.geo" \
historyCategory:"DeadSpace2ObjectPresets"
g = fopen gname "rb"
clearlistener()
fscale=100
indices = 0

Face_array=#()
Vert_array=#()
UV_array=#()

fseek f 0x50 #seek_set
infoOff1=readlong f
r=readlong f
r=readlong f
r=readlong f
r=readlong f
r=readlong f
infoOff2=readlong f

fseek f infoOff1 #seek_set
fseek f 48 #seek_cur
Print ("Last Read @ 0x"+((bit.intAsHex(ftell f))as string))
faceInd=readlong f
fseek f 76 #seek_cur
unk01=readlong f
vertOff=readlong f
faceOff=readlong f


fseek f infoOff2 #seek_set
Print ("Last Read @ 0x"+((bit.intAsHex(ftell f))as string))
unk1=readlong f
vertcount=readlong f
unk2=readlong f
null1=readlong f
unk3=readlong f
vertcount=readlong f
unk4=readlong f
unk5=readlong f
unk6=readlong f
face=readlong f
Print ("Last Read @ 0x"+((bit.intAsHex(ftell f))as string))
unk7=readlong f
unk8=readlong f
unk9=readlong f
unk10=readlong f
unk11=readlong f
unk12=readlong f
unk13=readlong f
face2=readlong f
Print ("face2 @ 0x"+((bit.intAsHex(ftell f))as string))

fseek f vertOff #seek_set
Print ("Last Read @ 0x"+((bit.intAsHex(ftell f))as string))

   
for x = 1 to vertcount do(

vx=readfloat f
vy=readfloat f
vz=readfloat f
p=readfloat f
p=readfloat f
p=readfloat f
p=readfloat f
p=readfloat f
append Vert_array([vx,vy,vz] * fscale)
)

for u = 1 to vertcount do(
tu=readfloat g
tv=readfloat g
append UV_array[tu,tv,0]
)

fseek f faceoff #seek_set
Print ("Last Read @ 0x"+((bit.intAsHex(ftell f))as string))

if (face2 > faceInd) then (
indices = face2
)else(
indices = faceInd)

if (faceInd > face) then (
indices = faceInd
)else(
indices = face)

for x = 1 to indices/3 do(
fa=readshort f #unsigned+1
fb=readshort f #unsigned+1
fc=readshort f #unsigned+1
append Face_array[fa,fb,fc]
)
Print ("Last Read @ 0x"+((bit.intAsHex(ftell f))as string))

msh = mesh vertices:Vert_array faces:Face_array
msh.numTVerts = UV_array.count
buildTVFaces msh
for j = 1 to UV_array.count do setTVert msh j UV_array[j]
for j = 1 to Face_array.count do setTVFace msh j Face_array[j]

Print ("Last Read @ 0x"+((bit.intAsHex(ftell f))as string))
gc()
fclose f
fclose g
Last edited by nightFlarer on Sat Mar 05, 2011 11:18 pm, edited 3 times in total.
chrrox
Moderator
Posts: 2602
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1422 times

Re: Dead Space 2 Suit Models Help Please

Post by chrrox »

you know that wont work for all meshes the offset and vertex declarations change alot.
renato
beginner
Posts: 21
Joined: Wed Nov 03, 2010 2:16 am
Has thanked: 3 times
Been thanked: 1 time

Re: Dead Space 2 Suit Models Help Please

Post by renato »

I'm only able to open dismembered parts using this script

The program gives this error when I try to open 0136_playeradvancedhelmet and 0137_playeradvancedhelmet

Image

and this when I try to open 0138_right_leg1 and 0139_right_leg1

Image


by google translate
nightFlarer
beginner
Posts: 33
Joined: Thu May 13, 2010 8:25 am
Has thanked: 4 times
Been thanked: 2 times

Re: Dead Space 2 Suit Models Help Please

Post by nightFlarer »

chrrox wrote:you know that wont work for all meshes the offset and vertex declarations change alot.
Oh really? :( I only tried two meshes and it worked so I thought it would of been the same.
Well I'm at uni at the moment so I'll fix it when I get home.

@renato - I'll fix it soon. Also could you upload those files?
nightFlarer
beginner
Posts: 33
Joined: Thu May 13, 2010 8:25 am
Has thanked: 4 times
Been thanked: 2 times

Re: Dead Space 2 Suit Models Help Please

Post by nightFlarer »

Image

Ok, I quickly did this at uni lol. So I've updated the script above, It should be fixed now.
renato
beginner
Posts: 21
Joined: Wed Nov 03, 2010 2:16 am
Has thanked: 3 times
Been thanked: 1 time

Re: Dead Space 2 Suit Models Help Please

Post by renato »

perfect man

thx thx thx thx

edit:

While I was exploring the files I found a strange thing:
Image

the files:
0131_mesh_rarm00_dism.geo
0132_mesh_rarm00_dism.geo
Nexus Elite ns
beginner
Posts: 20
Joined: Sun Nov 08, 2009 6:11 pm

Re: Dead Space 2 Suit Models Help Please

Post by Nexus Elite ns »

The contents of this post was deleted because of possible forum rules violation.
nightFlarer
beginner
Posts: 33
Joined: Thu May 13, 2010 8:25 am
Has thanked: 4 times
Been thanked: 2 times

Re: Dead Space 2 Suit Models Help Please

Post by nightFlarer »

@Nexus Elite ns and renato
Whoa, those files are different, from the others.

The vertices don't seem to follow the same pattern. This will probably take awhile, sooo..back to drawing board again.
Nexus Elite ns
beginner
Posts: 20
Joined: Sun Nov 08, 2009 6:11 pm

Re: Dead Space 2 Suit Models Help Please

Post by Nexus Elite ns »

nightFlarer wrote:@Nexus Elite ns and renato
Whoa, those files are different, from the others.

The vertices don't seem to follow the same pattern. This will probably take awhile, sooo..back to drawing board again.
Well you're doing your best at least. Thanks for doing the script for the community.

Though, it strange that there some missing GEO files for the mesh and UV, is anyone else missing few parts from geo? I think the STR unpacker isn't fully working.
Aliensoldier
n00b
Posts: 12
Joined: Sun Feb 13, 2011 3:36 pm

Re: Dead Space 2 Suit Models Help Please

Post by Aliensoldier »

Just a quick question:

When you export the GEOs into 3Ds Max and open the Material Editor you can see that the textures are already applied to the mesh.
Are the texture coordinates correct?
And does somebody know how to convert the TG4D textures?
Thanks!
nightFlarer
beginner
Posts: 33
Joined: Thu May 13, 2010 8:25 am
Has thanked: 4 times
Been thanked: 2 times

Re: Dead Space 2 Suit Models Help Please

Post by nightFlarer »

Well it could be possible that the texture UVs are flipped, but we can't be sure until the textures are properly ripped. Rick has a slightly working converter, but I don't think the results are perfect yet.
AceAngel
veteran
Posts: 115
Joined: Sun Feb 08, 2009 5:45 pm
Has thanked: 35 times
Been thanked: 8 times

Re: Dead Space 2 Suit Models Help Please

Post by AceAngel »

Hey, sorry for the extremely stupid question I'm going to ask, but here it goes.

Does the script work on DS1 models? When I try, it says it needs Geo UV's, and so far I'm unable to find a file that has the same Name which could correspond to the GEO containing the UV's.

Also, the errors reports back as --Float.

Stupid question, I know, so I was just wondering.
nightFlarer
beginner
Posts: 33
Joined: Thu May 13, 2010 8:25 am
Has thanked: 4 times
Been thanked: 2 times

Re: Dead Space 2 Suit Models Help Please

Post by nightFlarer »

AceAngel wrote:Hey, sorry for the extremely stupid question I'm going to ask, but here it goes.

Does the script work on DS1 models? When I try, it says it needs Geo UV's, and so far I'm unable to find a file that has the same Name which could correspond to the GEO containing the UV's.

Also, the errors reports back as --Float.

Stupid question, I know, so I was just wondering.
I'm not sure if it's the same, I don't have any of the games. It could possibly be different, post a couple of samples and I'll quickly check.
jaden
mega-veteran
mega-veteran
Posts: 209
Joined: Sat Feb 05, 2011 1:41 am
Been thanked: 1 time

Re: Dead Space 2 Suit Models Help Please

Post by jaden »

Great progress
Post Reply