Join also our Discord channel! Click here.

Dead Space 2 Suit Models Help Please

Post questions about game models here, or help out others!
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 » Sat Feb 12, 2011 3:26 am

Wow great work niceflarer

User avatar
chrrox
Moderator
Posts: 2564
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1308 times

Re: Dead Space 2 Suit Models Help Please

Post by chrrox » Sat Feb 12, 2011 3:49 am

the whole model format is dead easy its almost the same as obj. just need the header sorted out to reach the offset table then you can import anything.
You do not have the required permissions to view the files attached to this post.

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 » Sat Feb 12, 2011 5:20 am

dammit chrrox, did you have to rain on my parade!? XD hehe

yeah, its quite easy, but I can't find the uv info.

This is what I have so far.

Code: Select all

f = fopen "_.geo" "rb"
clearlistener()
fscale=100

fn readHalfFloat fstream = (
    hf=readshort fstream #unsigned
    sign = bit.get hf 16
    exponent = (bit.shift (bit.and hf (bit.hexasint "7C00")) -10) as integer - 16
    fraction = bit.and hf (bit.hexasint "03FF")
    if sign==true then sign = 1 else sign = 0
    exponentF = exponent + 127
    outputAsFloat = bit.or (bit.or (bit.shift fraction 13) \
    (bit.shift exponentF 23)) (bit.shift sign 31)
    return bit.intasfloat outputasfloat*2
    )

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

fseek f 0x0380 #seek_cur
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
unk7=readlong f
faceoff=readlong f

fseek f 0x400 #seek_set

for x = 1 to vertcount do(

vx=readfloat f
vy=readfloat f
vz=readfloat f
p4=readfloat f
p5=readfloat f
p6=readfloat f
p7=readfloat f
p8=readfloat f
append Vert_array([vx,vy,vz]*fscale)
append UV_array[p4,p5,0]
)

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

for x = 1 to face/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

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 » Sat Feb 12, 2011 5:52 am

Wow chrrox
claps slowly
Wooow fantastic

User avatar
chrrox
Moderator
Posts: 2564
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1308 times

Re: Dead Space 2 Suit Models Help Please

Post by chrrox » Sat Feb 12, 2011 6:10 am

try changing some of the flaots your reading to half floats for uv's.
also dante's inferno is the same format
You do not have the required permissions to view the files attached to this post.

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 » Sat Feb 12, 2011 6:21 am

Thanks for the info chrrox

mehdichallenger
ultra-n00b
Posts: 3
Joined: Fri Sep 24, 2010 8:20 pm

Re: Dead Space 2 Suit Models Help Please

Post by mehdichallenger » Sat Feb 12, 2011 9:04 pm

hi everyone, im newbie and i wonder how can i extract the original models from game datas
it would be great if u tell me with full details plz i need to do that,i need models from dead space 1 and 2
and if there is without UV plz tell me cuz i dont have any problem with UV.
thx

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 » Sun Feb 13, 2011 1:22 am

@mehdichallenger

Do you want the models to make a costume?(like me :lol: )

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 » Sun Feb 13, 2011 2:38 am

Chrrox, it seems that I have failed lol
I tried all possible half floats for the uvs, but they either give me nothing or a randomly huge mess. Maybe the half float function is wrong? (the function is in the script above).

I'm so close to finishing, this the only thing that needs to be done.

User avatar
chrrox
Moderator
Posts: 2564
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1308 times

Re: Dead Space 2 Suit Models Help Please

Post by chrrox » Sun Feb 13, 2011 3:09 am

post what you have and i can make some pointers / help

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 » Sun Feb 13, 2011 3:33 am

Thanks chrrox

Still similar to the last one I posted, as I said I tried all half floats so hopefully you'll find something wrong in my script haha.

Code: Select all

f = fopen "C:\\Users\\Paul Mahoney\\Downloads\\0144_torsoupper.geo" "rb"
clearlistener()
fscale=100

fn readHalfFloat fstream = (
    hf=readshort fstream #unsigned
    sign = bit.get hf 16
    exponent = (bit.shift (bit.and hf (bit.hexasint "7C00")) -10) as integer - 16
    fraction = bit.and hf (bit.hexasint "03FF")
    if sign==true then sign = 1 else sign = 0
    exponentF = exponent + 127
    outputAsFloat = bit.or (bit.or (bit.shift fraction 13) \
    (bit.shift exponentF 23)) (bit.shift sign 31)
    return bit.intasfloat outputasfloat*2
	)



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

fseek f 0x0380 #seek_cur
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
unk7=readlong f
faceoff=readlong f

fseek f 0x400 #seek_set

for x = 1 to vertcount do(

vx=readfloat f
vy=readfloat f
vz=readfloat f
p4=readHalfFloat f
p5=readHalfFloat f 
p6=readHalfFloat f
p7=readHalfFloat f
p8=readHalfFloat f
p9=readHalfFloat f
p10=readHalfFloat f
p11=readHalfFloat f
p12=readHalfFloat f
p13=readHalfFloat f


append Vert_array([vx,vy,vz] * fscale)
append UV_array[p4,p5,0]
)

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

for x = 1 to face/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

User avatar
chrrox
Moderator
Posts: 2564
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1308 times

Re: Dead Space 2 Suit Models Help Please

Post by chrrox » Sun Feb 13, 2011 3:46 am

fn convertTo32 input16 = (
inputAsInt = input16
sign = bit.get inputAsInt 16
exponent = (bit.shift (bit.and inputAsInt (bit.hexasint "7C00")) -10) as integer - 16
fraction = bit.and inputAsInt (bit.hexasint "03FF")
if sign==true then sign = 1 else sign = 0
exponentF = exponent + 127
--Ouput 32 bit integer representing a 32 bit float
outputAsFloat = bit.or (bit.or (bit.shift fraction 13) (bit.shift exponentF 23)) (bit.shift sign 31)
--Output Check
return bit.intasfloat outputasfloat
)

fn ReadBEHalfFloat fstream = (
return convertTo32(readshort fstream)
)

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 » Sun Feb 13, 2011 4:02 am

I'm still getting the same results :(

Perhaps the UV info is somewhere else?

User avatar
chrrox
Moderator
Posts: 2564
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1308 times

Re: Dead Space 2 Suit Models Help Please

Post by chrrox » Sun Feb 13, 2011 5:10 am

its stored as floats right after the face data.
You do not have the required permissions to view the files attached to this post.

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 » Sun Feb 13, 2011 7:13 am

I thought that might be it. I've found the offset to the UVs, but it seems that it doesn't match the number of vertices though.

Edit: That can't be it, the section past the faces are the same in each file.

Edit2: Ok I have finally found it. It's in a different file.
torso example: The mesh is in Mesh/0144_torsoupper.geo and the UVs are in MeshVolatile/0145_torsoupper.geo

Post Reply