ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Sat Aug 24, 2019 9:52 pm

All times are UTC




Post new topic  Reply to topic  [ 11 posts ] 
Author Message
 Post subject: Costume Quest 2 (.mesh)
PostPosted: Sun Aug 23, 2015 9:55 pm 

Joined: Sun May 31, 2015 2:23 am
Posts: 340
I'm pretty much out of ideas with this project so far, so now I need a little help. So far they seems fairly organized. I just need a way to get them out with proper shape and UV's. The textures are simple DDS files. Even a proper OBJ would be fine with me.

https://www.dropbox.com/s/pq0w2d1qja1280e/CQ2-files.zip?dl=0


Top
   
PostPosted: Mon Aug 24, 2015 2:30 am 

Joined: Thu Aug 13, 2015 8:19 pm
Posts: 6
The header files hold metadata, while the actual data is stored in the corresponding names.

eg: .mesh.header will define materials, vertex counts, and index counts, among other things, while .mesh holds vertex and indices.


Top
   
PostPosted: Mon Aug 24, 2015 3:07 am 

Joined: Sun May 31, 2015 2:23 am
Posts: 340
Any way we can stick them together to be converted into something like an OBJ or something? I've been trying this for a while with no results.


Top
   
PostPosted: Sat Aug 29, 2015 1:36 pm 

Joined: Sat Aug 29, 2015 1:13 pm
Posts: 117
Hi

To get correct meshes and shapes you must use:

- short floats for vertex position
- 48 bytes for vertex stride
- half floats for vertex uv
- send all meshes to bounding box for correct shapes

Here is a python script for Blender old version 249 for import skinned and rigged (if *.rig.header file exists) models.
How use:
-install Blender 249 and Python 2.6.6.
-click on Blender249.blend
-in Blender Text Window press alt+p
-select files with *.mesh.header extension


Attachments:
Blender249[CustomQuest2][mesh.header][2015-08-29].zip [57.38 KiB]
Downloaded 144 times
Top
   
PostPosted: Sat Aug 29, 2015 10:29 pm 

Joined: Sun May 31, 2015 2:23 am
Posts: 340
That is AWESOME. Thank you SO MUCH. I wish I could get this sort of solution for my Magicka Wizard Wars project. Thank you very very much, this really helps!


Top
   
PostPosted: Sun Aug 30, 2015 10:19 pm 
User avatar

Joined: Thu Aug 14, 2014 8:52 pm
Posts: 187
ummm very interesting, you can provide the unpacker of this game?


Top
   
PostPosted: Mon Sep 07, 2015 3:11 pm 

Joined: Sun May 31, 2015 2:23 am
Posts: 340
Certainly, here is what I used to get all data from it's files.

https://www.dropbox.com/s/y8p9h5aq0ursiwg/doublefinetool2.zip?dl=0


Top
   
PostPosted: Mon Sep 07, 2015 3:30 pm 
User avatar

Joined: Thu Aug 14, 2014 8:52 pm
Posts: 187
thanks for that bro, grateful for share.


Top
   
PostPosted: Mon Oct 19, 2015 10:29 am 

Joined: Sat Dec 20, 2014 5:14 pm
Posts: 38
I'm interested to know how you scaled the model to its stored bounding box


Top
   
PostPosted: Mon Oct 19, 2015 5:49 pm 

Joined: Sat Aug 29, 2015 1:13 pm
Posts: 117
Code:
def setBox(box,meshList):
   E=[[],[],[]]
   for mesh in meshList:
      for n in range(len(mesh.vertPosList)):
         x,y,z=mesh.vertPosList[n]
         E[0].append(x)
         E[1].append(y)
         E[2].append(z)   
   skX=(box[3]-box[0])/(max(E[0])-min(E[0]))
   skY=(box[4]-box[1])/(max(E[1])-min(E[1]))
   skZ=(box[5]-box[2])/(max(E[2])-min(E[2]))
   sk=min(skX,skY,skZ)
   trX=(box[3]+box[0])/2
   trY=(box[4]+box[1])/2
   trZ=(box[5]+box[2])/2
   
   
   for mesh in meshList:
      for n in range(len(mesh.vertPosList)):
         x,y,z=mesh.vertPosList[n]
         mesh.vertPosList[n]=[trX+x*skX,trY+y*skY,trZ+z*skZ]
      #mesh.draw()   


Top
   
PostPosted: Sat Feb 09, 2019 7:56 am 

Joined: Sun May 31, 2015 2:23 am
Posts: 340
Hey uh, I seem to recall this at one point working with Costume Quest 1 as well, however now, even with the same setup directed for use, Costume Quest 1 models fail with an error similar to:
"Traceback (most recent call last):
File "starter.py", line 168, in Parser
headerParser(filename,g)
File "starter.py", line 107, in headerParser
g.f(10)
File "C:\Users\User\Downloads\Blender249[CustomQuest2][mesh.header][2015-08-29]\newGameLib\myLibraries\binaresLib.py", line 212, in f
data=struct.unpack(self.endian+n*'f',self.inputFile.read(n*4))
File "C:\Python25\Lib\struct.py", line 87, in unpack
return o.unpack(s)
struct.error: unpack requires a string argument of length 40"

Tested it with python 2.5.2 and blender2.4.9, as well as python 2.6.6 and blender 2.4.9b.

Here's a sample file.

https://www.dropbox.com/s/luuegkrxrhhrp ... a.zip?dl=0


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 11 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited