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

Dark Horizon and Tarr Chronicle - PC - .CM files

Post questions about game models here, or help out others!
Post Reply
CZW
veteran
Posts: 151
Joined: Thu May 05, 2005 3:15 pm
Has thanked: 117 times
Been thanked: 15 times

Dark Horizon and Tarr Chronicle - PC - .CM files

Post by CZW »

hello
can anyone help me to convert this format ??? to obj or 3ds ...
it seems Dark Horizon and Tarr Chronicle share the same format of models, from Paradox games

http://www.filedropper.com/darkhorizon

thx
chrrox
Moderator
Posts: 2602
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1422 times

Re: Dark Horizon and Tarr Chronicle - PC - .CM files

Post by chrrox »

The contents of this post was deleted because of possible forum rules violation.
CZW
veteran
Posts: 151
Joined: Thu May 05, 2005 3:15 pm
Has thanked: 117 times
Been thanked: 15 times

Re: Dark Horizon and Tarr Chronicle - PC - .CM files

Post by CZW »

The contents of this post was deleted because of possible forum rules violation.
chrrox
Moderator
Posts: 2602
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1422 times

Re: Dark Horizon and Tarr Chronicle - PC - .CM files

Post by chrrox »

If no one helps you before i get to it i can convert this mesh into max but i am buys with a project at the moment.
But the format is very basic and should be easy for most people who know about models.
User avatar
Rimbros
ultra-veteran
ultra-veteran
Posts: 495
Joined: Fri Jul 09, 2010 12:23 am
Has thanked: 41 times
Been thanked: 16 times

Re: Dark Horizon and Tarr Chronicle - PC - .CM files

Post by Rimbros »

he chrox and wath you think abouth this files are from Saint Seiya Hades, files extracted i post a download of the files and preview in txt of the files content.

viewtopic.php?f=16&t=5644&start=15
Renders Art by Rimbros
http://s303.photobucket.com/albums/nn12 ... E/Renders/

Personal Game repository samples, send PM
nightFlarer
beginner
Posts: 33
Joined: Thu May 13, 2010 8:25 am
Has thanked: 4 times
Been thanked: 2 times

Re: Dark Horizon and Tarr Chronicle - PC - .CM files

Post by nightFlarer »

I'll have a go at it, I haven't done this before but thanks to mariokart64n for his tutorials I am pretty confident that I can do it :)

The model file seems pretty straight forward. This is what I've done so far, just give a couple hours and I'll be done.
Image
CZW
veteran
Posts: 151
Joined: Thu May 05, 2005 3:15 pm
Has thanked: 117 times
Been thanked: 15 times

Re: Dark Horizon and Tarr Chronicle - PC - .CM files

Post by CZW »

it look promising .. thx
Karpati
ultra-veteran
ultra-veteran
Posts: 467
Joined: Thu Dec 07, 2006 11:25 pm
Has thanked: 9 times
Been thanked: 95 times

Re: Dark Horizon and Tarr Chronicle - PC - .CM files

Post by Karpati »

CZW wrote:it look promising .. thx
Are you Thierry M. from France ?
CZW
veteran
Posts: 151
Joined: Thu May 05, 2005 3:15 pm
Has thanked: 117 times
Been thanked: 15 times

Re: Dark Horizon and Tarr Chronicle - PC - .CM files

Post by CZW »

Karpati wrote:
CZW wrote:it look promising .. thx
Are you Thierry M. from France ?
look on your PM ...
CZW
veteran
Posts: 151
Joined: Thu May 05, 2005 3:15 pm
Has thanked: 117 times
Been thanked: 15 times

Re: Dark Horizon and Tarr Chronicle - PC - .CM files

Post by CZW »

nightFlarer wrote:I'll have a go at it, I haven't done this before but thanks to mariokart64n for his tutorials I am pretty confident that I can do it :)

The model file seems pretty straight forward. This is what I've done so far, just give a couple hours and I'll be done.
Image

no news ???
nightFlarer
beginner
Posts: 33
Joined: Thu May 13, 2010 8:25 am
Has thanked: 4 times
Been thanked: 2 times

Re: Dark Horizon and Tarr Chronicle - PC - .CM files

Post by nightFlarer »

It's almost finished, thanks to mario for fixing up my script.
There's supposed to be multiple meshes in each model file but we only know how to read the first mesh, hopefully chrrox can finish up the script so it can read the other meshes.

Here's the maxscript:

Code: Select all

-- .CM converter v0.5


fname = getOpenFileName \ 
caption:"Quazar Studio's Model File" \
types:"Quazar Studio's Model File(*.cm)|*.cm" \
f = fopen fname "rb"

clearlistener()

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

ukn1=readlong f #unsigned
ukn2=readlong f #unsigned
ukn3=readlong f #unsigned
ukn4=readlong f #unsigned

fseek f 196 #seek_cur -- skips over stuff I don't know yet


count=1 --sets loop to only execute once
for y = 1 to count do( -- master loop, will build for each new set of verts.. but wont be able to loop yet due to too many ukns
ukn5=readlong f #unsigned
ukn6=readlong f #unsigned
ukn7=readlong f #unsigned
sectionID=readlong f #unsigned --?? ID's which Section the cursor is at?
pad=readlong f #unsigned -- always 0 ??
sectionCount=readlong f #unsigned
sectionSize=readlong f #unsigned --??

for x = 1 to sectionCount do( -- vertex loop
vx=readfloat f
vy=readfloat f
vz=readfloat f
nx=readfloat f
ny=readfloat f
nz=readfloat f
tv=readfloat f
tu=readfloat f
        
append Vert_array[vx,vy,vz]
append UV_array[tv,tu,0]
)

fseek f (288*2) #seek_cur -- skips random section?? repeats twice between verts and faces


ukn8=readlong f #unsigned
ukn9=readlong f #unsigned
ukn10=readlong f #unsigned
sectionID=readlong f #unsigned --?? ID's which Section the cursor is at?
pad=readlong f #unsigned -- always 0 ??
sectionCount=readlong f #unsigned
sectionSize=readlong f #unsigned --??

for x = 1 to sectionCount/3 do( -- vertex loop. divide by 3 because we are reading 3 values each time wee loop
fa=readlong f #unsigned +1
fb=readlong f #unsigned +1
fc=readlong f #unsigned +1
append Face_array[fa,fb,fc]
)       
        
        

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]
) --end of master loop

Print ("Last Read @ 0x"+((bit.intAsHex(ftell f))as string))
gc()
fclose f
Post Reply