Users browsing this thread: 2 Guest(s)
Xenoblade X unknown model format (example files inside)
#1
Hello there,

I'm currently trying to get the 3D models from Xenoblade X (mostly for Cosplay references).
I think I found the models but don't know how to convert the files in something usable.

For example I got:
dl019100.camdo - most likely the vertex/polygon coordinates
dl019100.camtp - guess this is the info which material/texture belongs to which part of the 3D Model
dl019100.casmt - Textures maybe
dl019100.efp - no idea
dl019100_rig.hkt - bone rigging I guess

Here are some example files.

Maybe someone knows this format or has an idea how to convert it?
Many thanks in advance Big Grin
Reply
Thanked by:
#2
camdo -model
camtp - not sure... has some reference to bone names
casmt - textures (MTXT format)
efp - effect particle maybe
hkt - bones
Reply
Thanked by: Knoskoloz
#3
I don't really have the time to go reverse it entirely but if anyone is interested in doing so, I'll share my notes


Notes:
Code:
// Xenoblade Chronicles X .camdo
// File is in big endian
// Offsets are relative to the start of the struct pointed to in the CamdoHeader

struct CamdoHeader
{
char[4] magic; // MXMD
u32 unk_int_0x04; // 0x2738
u32 unkStruct1Off; // 0x44
u32 unkStruct2Off; // 0x597C
u32 unk_off_0x10; // 0x6A80
u32 bufferDescriptorOff; // 0x6DA4
u32 unk_off_0x18; // 0x78400
u32 unk_off_0x1C; // 0x83400
u32 unk_int_0x20; // 0x00
u32 unk_off_0x24; // 0x6660
}

struct UnkStruct1
{
f32[6] bbox;
u32 unk_off_0x18; // 0x9C
u32 unk_int_0x1C; // 0x01
u32 unk_off_0x20; // 0xE60
u32 unk_int_0x24; // 0x01
u32[10] unk_0x28; // 0x00
u32 unk_off_0x50; // 0x3090
u32 unk_int_0x54; // 0x35
u32 unk_off_0x58; // 0xED4
u32 unk_int_0x5C; // 0x6B
u32 unk_int_0x60; // 0x00
u32 unk_off_0x64; // 0xFA8
u32 unk_int_0x68; // 0x35
u32 unk_int_0x6C; // 0x40
u32 unk_off_0x70; // 0x1288
u32 unk_int_0x74; // 0x31
u32 unk_off_0x78; // 0x1598
u32 unk_int_0x7C; // 0x30
u32[3] unk_0x80; // 0x00
}

struct UnkStruct2
{
u32 unk_off_0x00; // 0x68
u32 unk_int_0x04; // 0x05
u32 unk_int_0x08; // 0x63
u32 unk_int_0x0C; // 0x0B
u32 unk_off_0x10; // 0x310
u32 unk_int_0x14; // 0x3C
u32 unk_off_0x18; // 0x400
u32 unk_int_0x1C; // 0x0E
u32 unk_int_0x20; // 0x00
u32 unk_off_0x24; // 0x5A0
u32 unk_int_0x28; // 0x0B
u32[5] unk_0x2C; // 0x00
// might be bigger, idk
}

struct BufferDescriptor
{
u32 vertBufDescriptorArrayOffset; // 0x30
u32 numVertBuffers; // 0x04
u32 faceBufDescriptorArrayOffset; // 0x90
u32 numFaceBuffers; // 0x6B
u16 unk_int_0x10; // 0x02
u16 unk_int_0x14; // 0x03
}

struct VertBufDescriptor
{
u32 vertBufOffset;
u32 numVertices;
u32 vertStride;
u32 unkIndicesOffset;
u32 numUnkIndices;
u32 unk_int_0x14; // 0x00
}

struct FaceBufDescriptor
{
u32 faceBufOffset;
u32 numFaces;
u32 unk_0x08; // 0x00
}

Preliminary MaxScript (Very WIP)
Code:
gc()

fn GetOpenFile = 
(
clearlistener()
local fname = getOpenFileName \ 
caption:"Open Model" \
types:"Model (*.camdo)|*.camdo" \
historyCategory:"XENBLADECHRX Object Presets"
if (fname == undefined) then
(
return undefined
)
else
(
--globalImportedFilePath = fname
local f = fopen fname "rb"
return f
)
)

-- Reading functions

fn ReadBEShort fstream = 
(
return bit.swapBytes (ReadShort fstream #unsigned) 1 2
)

fn ReadBELong fstream = 
(
return bit.swapBytes (bit.swapBytes (ReadLong fstream #unsigned) 1 4) 2 3
)

fn ReadBEFloat fstream = 
(
return bit.intAsFloat (bit.swapBytes (bit.swapBytes (ReadLong fstream #unsigned) 1 4) 2 3)
)

fn ReadBEVector2 fstream =
(
return [(ReadBEFloat fstream), ((ReadBEFloat fstream) * -1) + 1, 0]
)

fn ReadBEVector3 fstream =
(
return [(ReadBEFloat fstream), (ReadBEFloat fstream), (ReadBEFloat fstream)]
)

struct VertBufDescriptorStruct
(
/* u32 */ vertBufOffset,
/* u32 */ numVertices,
/* u32 */ vertStride,
/* u32 */ unkIndicesArrayOffset,
/* u32 */ numUnkIndices,
/* u32 */ unk0x14
)

struct FaceBufDescriptorStruct
(
/* u32 */ faceBufOffset,
/* u32 */ numFaces,
/* u32 */ unk0x08
)

file = GetOpenFile()

if (file != undefined) then
(
fseek file 0x14 #seek_cur
bufferDescriptorOffset = ReadBELong file

fseek file bufferDescriptorOffset #seek_set

vertBufDescriptorArrayOffset = ReadBELong file
numVertexBuffers = ReadBELong file
faceBufDescriptorArrayOffset = ReadBELong file
numFaceBuffers = ReadBELong file

fseek file (bufferDescriptorOffset + vertBufDescriptorArrayOffset) #seek_set
vertDescriptorArray = #()
for i = 1 to numVertexBuffers do
(
vtxDesc = VertBufDescriptorStruct()
vtxDesc.vertBufOffset = ReadBELong file
vtxDesc.numVertices = ReadBELong file
vtxDesc.vertStride = ReadBELong file
vtxDesc.unkIndicesArrayOffset = ReadBELong file
vtxDesc.numUnkIndices = ReadBELong file
vtxDesc.unk0x14 = ReadBELong file
vertDescriptorArray[i] = vtxDesc
)

fseek file (bufferDescriptorOffset + faceBufDescriptorArrayOffset) #seek_set
faceDescriptorArray = #()
for i = 1 to numFaceBuffers do
(
faceDesc = FaceBufDescriptorStruct()
faceDesc.faceBufOffset = ReadBELong file
faceDesc.numFaces = ReadBELong file
faceDesc.unk0x08 = ReadBELong file
faceDescriptorArray[i] = faceDesc
)

posArray = #()
uvArray = #()
for i = 1 to numVertexBuffers do
(
if (vertDescriptorArray[i].vertStride == 0x10) then continue -- Weight data
for j = 1 to vertDescriptorArray[i].numVertices do
(
fseek file (bufferDescriptorOffset + vertDescriptorArray[i].vertBufOffset + ((j - 1) * vertDescriptorArray[i].vertStride)) #seek_set
append posArray (ReadBEVector3 file)
fseek file 0x04 #seek_cur
append uvArray (ReadBEVector2 file)
)
)

faceArray = #()
for i = 1 to numFaceBuffers do
(
fseek file (bufferDescriptorOffset + faceDescriptorArray[i].faceBufOffset) #seek_set
for j = 1 to faceDescriptorArray[i].numFaces/3 do
(
append faceArray [(ReadBEShort file) + 1, (ReadBEShort file) + 1, (ReadBEShort file) + 1]
)
)

msh = mesh vertices:posArray faces:faceArray tverts:uvArray
buildTVFaces msh
for j = 1 to faceArray.count do setTVFace msh j faceArray[j]
)

gc()
Reply
#4
Oh thanks a lot for the info about mtx and of course for the script Smile
I will try if I can get any results with the script and 3DSMax2012 after work.

You guys are a big help for sure Big Grin
Reply
Thanked by:
#5
i already tested the WIP script for the camdo model, and it imports properly, just has no material names, or separated meshes.
Reply
Thanked by:
#6
Oh neat! I tested the script with some enemy and Skell/Mecha files and works really well.
For human characters it looks like the bones get in the way.

Archive with a Skell, Enemy(well enemy skell) and Normal Character

Guess I have to take a deep look into Max scripting.

I'm really thankfull for the help so far Big Grin

I'could upload the complete model archives on sunday if someone is intrested.

€dit:
ok guess it will take me some years until I will achieve something with scripting and encoding seems like a really not so easy topic.
But the weapon models look fine already and should be a big help.
Couldn't find much info about the mtxt texture format so I guess it's a propertyformat as well.
Reply
Thanked by:
#7
Heres a link to all the model files I could find.
https://mega.nz/#!1hEylICT!8g0yaun4ll9Kl...xLa_-9SEek

TGEs script can extract most of the models fine. Well no bones or Textures and female armor is bugged (maybe due to the changable chest value?)
Reply
Thanked by:
#8
(01-31-2016, 02:16 PM)Knoskoloz Wrote: Heres a link to all the model files I could find.
https://mega.nz/#!1hEylICT

TGEs script can extract most of the models fine. Well no bones or Textures and female armor is bugged (maybe due to the changable chest value?)

There's an encryption key for this.

Reply
Thanked by:
#9
(01-31-2016, 02:22 PM)OS-PRIME Wrote:
(01-31-2016, 02:16 PM)Knoskoloz Wrote: Heres a link to all the model files I could find.
https://mega.nz/#!1hEylICT

TGEs script can extract most of the models fine. Well no bones or Textures and female armor is bugged (maybe due to the changable chest value?)

There's an encryption key for this.

Oh my bad I messed up x_X
Just fixed the link.
Reply
Thanked by:
#10
Smile 
Hey guys, how's it going?

I've been trying to model and texture a Skell/Mech for studying purposes, but I believe I need some help. 

The idea is to make a highpoly version of the URBAN skell (my favorite), but it's been really hard to do a good model without the proper concepts/blueprints... I took a series of screenshots from the game model I'm trying to do ( https://www.tumblr.com/blog/mkleine ) but it has too many "layers" of armor and weapons, and the WiiU's resolution also doesn't help.

So I'd like to ask you guys, if possible, in case any of you end up converting some skell models to fbx or obj, could you please share? 

I use Blender for modeling/animating and have no idea how to convert the encrypted files, otherwise I'd try to find the models myself Smile





PS. Just to make it clear, I won't use any parts of the original/ripped model or textures in my own model, the ripped model will be used only to provide proper visual reference. 

You can see some of my 3D work on the link below, if you want Smile

https://sketchfab.com/murilo.kleine 




Thanks a lot guys! Smile
Reply
Thanked by:
#11
(02-01-2016, 09:42 PM)mkleine Wrote: Hey guys, how's it going?

I've been trying to model and texture a Skell/Mech for studying purposes, but I believe I need some help. 

The idea is to make a highpoly version of the URBAN skell (my favorite), but it's been really hard to do a good model without the proper concepts/blueprints... I took a series of screenshots from the game model I'm trying to do ( https://www.tumblr.com/blog/mkleine ) but it has too many "layers" of armor and weapons, and the WiiU's resolution also doesn't help.

So I'd like to ask you guys, if possible, in case any of you end up converting some skell models to fbx or obj, could you please share? 

I use Blender for modeling/animating and have no idea how to convert the encrypted files, otherwise I'd try to find the models myself Smile





PS. Just to make it clear, I won't use any parts of the original/ripped model or textures in my own model, the ripped model will be used only to provide proper visual reference. 

You can see some of my 3D work on the link below, if you want Smile

https://sketchfab.com/murilo.kleine 




Thanks a lot guys! Smile



Urban.zip

How about this? No textures though
Reply
Thanked by:
#12
(02-02-2016, 04:48 PM)Knoskoloz Wrote:
(02-01-2016, 09:42 PM)mkleine Wrote: Hey guys, how's it going?

I've been trying to model and texture a Skell/Mech for studying purposes, but I believe I need some help. 

The idea is to make a highpoly version of the URBAN skell (my favorite), but it's been really hard to do a good model without the proper concepts/blueprints... I took a series of screenshots from the game model I'm trying to do ( https://www.tumblr.com/blog/mkleine ) but it has too many "layers" of armor and weapons, and the WiiU's resolution also doesn't help.

So I'd like to ask you guys, if possible, in case any of you end up converting some skell models to fbx or obj, could you please share? 

I use Blender for modeling/animating and have no idea how to convert the encrypted files, otherwise I'd try to find the models myself Smile





PS. Just to make it clear, I won't use any parts of the original/ripped model or textures in my own model, the ripped model will be used only to provide proper visual reference. 

You can see some of my 3D work on the link below, if you want Smile

https://sketchfab.com/murilo.kleine 




Thanks a lot guys! Smile



Urban.zip

How about this? No textures though


Wow, thank you, man!! It already helps me a lot!!

I can reproduce the textures and normals from the visual reference I have, so no problem Smile


Thanks a lot! Let me know if you need anything!  Wink
Reply
Thanked by:
#13
Just wanted to say a huge thanks for all the help  Big Grin
The 3D models were a great help especially for the weapon.
Just in case there is someone intrested in cosplay this is how it turned out.
Even more
Reply
Thanked by: redblueyellow, TGE
#14
(01-13-2016, 08:54 AM)Knoskoloz Wrote: Hello there,

I'm currently trying to get the 3D models from Xenoblade X (mostly for Cosplay references).
I think I found the models but don't know how to convert the files in something usable.

For example I got:
dl019100.camdo - most likely the vertex/polygon coordinates
dl019100.camtp - guess this is the info which material/texture belongs to which part of the 3D Model
dl019100.casmt - Textures maybe
dl019100.efp - no idea
dl019100_rig.hkt - bone rigging I guess

Here are some example files.

Maybe someone knows this format or has an idea how to convert it?
Many thanks in advance Big Grin

I have to wonder about the UVmaps. Anyway, who or what are you trying to rip?
Edit: Never mind. I see you got what you were going for. Not bad.
SCP...
Secure... Contain... Protect...
Special Containment Procedures...
Reply
Thanked by:
#15
(05-07-2016, 03:07 PM)Jinzo-Advance Wrote:
(01-13-2016, 08:54 AM)Knoskoloz Wrote: Hello there,

I'm currently trying to get the 3D models from Xenoblade X (mostly for Cosplay references).
I think I found the models but don't know how to convert the files in something usable.

For example I got:
dl019100.camdo - most likely the vertex/polygon coordinates
dl019100.camtp - guess this is the info which material/texture belongs to which part of the 3D Model
dl019100.casmt - Textures maybe
dl019100.efp - no idea
dl019100_rig.hkt - bone rigging I guess

Here are some example files.

Maybe someone knows this format or has an idea how to convert it?
Many thanks in advance Big Grin

I have to wonder about the UVmaps. Anyway, who or what are you trying to rip?
Edit: Never mind. I see you got what you were going for. Not bad.
Thanks Big Grin
Do you have an idea about the texture format and/or uvmapping? Retexturing the weapon with screenshots worked suprisingly well. Still getting the original textures would be kinda nice for future projects. So far I couldn't make sense of the mtx textures.
Reply
Thanked by:


Forum Jump: