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

[request]Voltron xbox360 cmfh to obj

Post questions about game models here, or help out others!
Post Reply
alon
mega-veteran
mega-veteran
Posts: 163
Joined: Mon Nov 29, 2010 10:38 am
Has thanked: 32 times
Been thanked: 2 times

[request]Voltron xbox360 cmfh to obj

Post by alon »

The game developer is "THQ"
Textures: *.jpg
Mesh: *.cmfh
I was wondering if someone could create a Noesis plugin to import these files


Thanks in advance!
Last edited by alon on Fri Apr 13, 2012 6:59 pm, edited 1 time in total.
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: [request]Voltron xbox360 cmfh to obj

Post by finale00 »

It's a simple format (parsing-wise), except in big endian........but I don't seem to be able to bind the buffers correctly.
Anyone have ideas?

http://db.tt/VkHl0r2Q

Code: Select all


struct Vertex {
   float[3] vx, vy, vz
   dword[12] ?
   float[3] nx, ny, nz
   float[2] tu, tv
}

struct Face {
   int16[3] v1, v2, v3
}

char[4] idstring
int32 ?
int32 numVerts
int32 numFaces

numVerts Vertex
numFaces Face

#a bunch of 4-byte integers afterwards
Last edited by finale00 on Thu Feb 16, 2012 7:57 pm, edited 3 times in total.
Karpati
ultra-veteran
ultra-veteran
Posts: 467
Joined: Thu Dec 07, 2006 11:25 pm
Has thanked: 9 times
Been thanked: 95 times

Re: [request]Voltron xbox360 cmfh to obj

Post by Karpati »

Vertex structure:
3 floats (X,Y,Z)
15 floats unknown
2 floats (U,V)

I did try on all sample files with my program, but I can't load the desmodus.cmfh and the zarkon.cmfh files correctly.
Karpati
ultra-veteran
ultra-veteran
Posts: 467
Joined: Thu Dec 07, 2006 11:25 pm
Has thanked: 9 times
Been thanked: 95 times

Re: [request]Voltron xbox360 cmfh to obj

Post by Karpati »

Is the full name of the game Voltron: Defender of the Universe ?
alon
mega-veteran
mega-veteran
Posts: 163
Joined: Mon Nov 29, 2010 10:38 am
Has thanked: 32 times
Been thanked: 2 times

Re: [request]Voltron xbox360 cmfh to obj

Post by alon »

Yes.
The title of the game is 'Voltron: Defender of the Universe'
I uploaded some more sample files
Last edited by alon on Fri Apr 13, 2012 6:59 pm, edited 1 time in total.
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: [request]Voltron xbox360 cmfh to obj

Post by finale00 »

Cool, all I had to do was set BIG_ENDIAN option in noesis and it worked.

Code: Select all

rapi.rpgSetOption(noesis.RPGOPT_BIGENDIAN, 1)
Right now I'm just assuming texName = {filename}, but that's not true. The material library is stored in {filename}_mat.txt, but I haven't bothered to look at it. If someone tells me the exact format I can just add a parser quickly.

There's also a second mesh format which I guess is for static meshes (you can see those in vehicles, rvm format)

Which is also pretty straightforward.

Image
alon
mega-veteran
mega-veteran
Posts: 163
Joined: Mon Nov 29, 2010 10:38 am
Has thanked: 32 times
Been thanked: 2 times

Re: [request]Voltron xbox360 cmfh to obj

Post by alon »

Image
Thank you for your support.
Do you know how to fix this model?
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: [request]Voltron xbox360 cmfh to obj

Post by finale00 »

Nope. Not sure why some of the models are different. Not sure what the issue might be either.
alon
mega-veteran
mega-veteran
Posts: 163
Joined: Mon Nov 29, 2010 10:38 am
Has thanked: 32 times
Been thanked: 2 times

Re: [request]Voltron xbox360 cmfh to obj

Post by alon »

desmodus.cmfh(zarkon.cmfh, voltron_synthoid.cmfh, voltron.cmfh) was different from any other cmfh.
Last edited by alon on Fri Apr 13, 2012 6:59 pm, edited 1 time in total.
Karpati
ultra-veteran
ultra-veteran
Posts: 467
Joined: Thu Dec 07, 2006 11:25 pm
Has thanked: 9 times
Been thanked: 95 times

Re: [request]Voltron xbox360 cmfh to obj

Post by Karpati »

finale00 wrote:Nope. Not sure why some of the models are different. Not sure what the issue might be either.
You wrote: #a bunch of 4-byte integers afterwards

I think (hope) this format stores the model in the following format like this:

Vertexbuffer
Face buffer

Part Counter (4 bytes LongInt)

Parts:
Vertex_index_from (4 bytes LongInt)
Vertex_count (4 bytes LongInt)
Face_index_from (4 bytes LongInt)
Face_count (4 bytes LongInt)
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: [request]Voltron xbox360 cmfh to obj

Post by finale00 »

Ya, you're right.

Code: Select all

int32 numGroups

numGroups {
    int32 offset into vertex buffer
    int32 numVerts
    int32 offset into index buffer
    int32 numFaces
    int32 unk
    int32 count
    int32[count] ?
}
byte[2] 01 01
Image

I don't know what all those other integers could mean though.

Btw, the material info is not really stored in the .mat file.
Unless it's incomplete.

I actually have no idea where the material info is.
But script is updated to load the meshes properly.
Karpati
ultra-veteran
ultra-veteran
Posts: 467
Joined: Thu Dec 07, 2006 11:25 pm
Has thanked: 9 times
Been thanked: 95 times

Re: [request]Voltron xbox360 cmfh to obj

Post by Karpati »

Btw, the material info is not really stored in the .mat file.
Unless it's incomplete.
I actually have no idea where the material info is.
npc_arus.mat.txt file:

ch/human/npc/arus/arus_npc
endmats

arus_npc is the texture filename without file extension I think.
The real filename is arus_npc.jpg
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: [request]Voltron xbox360 cmfh to obj

Post by finale00 »

For desmodus, it has _d and _a and _nm for the different types of texture maps.
Its mat.txt file only has that one line also.

There doesn't seem to be consistency either. If you look at zarkon it says _dm instead of _d lol
Post Reply