Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Costume Quest 2 (.mesh)

Featured Replies

  • Author
  • Localization

Doctor Loboto, posted Sun Aug 23, 2015 9:55 pm (6911)


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
  • Author
  • Localization

finale00z, posted Mon Aug 24, 2015 2:30 am (6913)


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.
  • Author
  • Localization

Doctor Loboto, posted Mon Aug 24, 2015 3:07 am (6915)


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.
  • Author
  • Localization

Szkaradek123, posted Sat Aug 29, 2015 1:36 pm (6978)


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

Blender249[CustomQuest2][mesh.header][2015-08-29].zip

  • Author
  • Localization

Doctor Loboto, posted Sat Aug 29, 2015 10:29 pm (7006)


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!
  • Author
  • Localization

CriticalError, posted Sun Aug 30, 2015 10:19 pm (7039)


ummm very interesting, you can provide the unpacker of this game?
  • Author
  • Localization

CriticalError, posted Mon Sep 07, 2015 3:30 pm (7266)


thanks for that bro, grateful for share.
  • Author
  • Localization

TGE, posted Mon Oct 19, 2015 10:29 am (8626)


I'm interested to know how you scaled the model to its stored bounding box
  • Author
  • Localization

Szkaradek123, posted Mon Oct 19, 2015 5:49 pm (8650)


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()   
  • Author
  • Localization

Doctor Loboto, posted Sat Feb 09, 2019 7:56 am (43303)


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
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.