ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Sun Jul 22, 2018 10:34 pm

All times are UTC




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Mon Jun 25, 2018 7:14 pm 

Joined: Mon Jun 25, 2018 6:40 pm
Posts: 3
Hello all, i'm new here.
Does anyone know how to import models from Kao the Kangaroo?
Maybe DGlorio?
Here is link to demo:
http://download.gamesurf.tiscali.it/demo/kao_demo.zip
and Blender script, some specification:
Code:
import Blender
import struct

def load_bin(filename):

   scn = Blender.Scene.GetCurrent()
   if scn == None:
      return "No scene to import to!"

   file = open(filename, 'rb')

   scn.objects.selected = []
   mesh = Blender.Mesh.New("name")
   meshOb = scn.objects.new(mesh)

   file.seek(12,0)

   numobjects = struct.unpack('L', file.read(4))[0]

   file.seek(16,0)

   numFaces = struct.unpack('L', file.read(4))[0]

   file.seek(76,0)

   numVerts = struct.unpack('L', file.read(4))[0]

   file.seek(120,0)

   faces = []
   for i in xrange(numFaces):
      x = struct.unpack('H',file.read(2))[0]
      file.read(2)
      y = struct.unpack('H',file.read(2))[0]
      file.read(2)
      z = struct.unpack('H',file.read(2))[0]
      file.read(2)
      file.read(2)
      file.read(2)
      faces.append([x,y,z])

   verts = []
   for i in xrange(numVerts):
      verts.append(struct.unpack('fff', file.read(3*4)))
      file.read(4)

   mesh.verts.extend(verts)
   mesh.faces.extend(faces)

Blender.Window.FileSelector(load_bin, 'import kao bin', '*.bin')

and script to quickbms for kao.pak:
Code:
get pEOCDR asize
math pEOCDR -= 12
goto pEOCDR

get CDR_NUM long
get CDR_PTR long
idstring "T8FM"   ## assumed magic

goto CDR_PTR

for i = 1 to CDR_NUM

  getdstring R_NAME 80
  get R_POS long
  get R_SIZE long

  log R_NAME R_POS R_SIZE

next i

If Windows is 64-bit, you need to download is3Engine.zip http://toastytech.com/files/Is3Engine.zip, put setup32.exe and launch.


Top
   
PostPosted: Wed Jun 27, 2018 2:36 pm 

Joined: Fri Dec 15, 2017 1:42 pm
Posts: 26
You should have uploaded the pak files instead of expecting people to install the game for your sake.


Top
   
PostPosted: Wed Jun 27, 2018 6:13 pm 

Joined: Mon Jun 25, 2018 6:40 pm
Posts: 3
ok, i send file
https://www.sendspace.com/file/4f9kvq

3d files are output.bin, T83d header, number of meshes, number of vertices, number of faces, number of frames etc


Top
   
PostPosted: Thu Jun 28, 2018 9:00 pm 
User avatar

Joined: Sun Dec 27, 2015 10:22 pm
Posts: 62
Ironically enough, I was just looking at this format the other day... Glad someone got to it!!! However, I don't think this supports UV-coordinates at all


Top
   
PostPosted: Thu Jun 28, 2018 9:37 pm 

Joined: Mon Jun 25, 2018 6:40 pm
Posts: 3
Is kao_tools.exe on xentax forum, only animation not convert, convert .bin file to .obj, but latest version crash, even with xp compatibility mode, this model supports UV mapping, in this models are numbers of objects, numbers of faces, numbers of motions for animation, next onknown values some commands?
0x4c offset, for each object, numbers of vertices, unknown values maybe group number, object name 32 bytes, unknown values 4 bytes, next faces data, vertices data, next unknown values, next animation data, next maybe UV mapping data.
I write import script for noesis, but is not easy, because null bytes are in each vertices and faces.
edit:
Mistake, i discovered, that faces are on end of file with UV mapping, before vertices i not know what is this.
edit2:
On begin file are faces with unknown values before vertices, on end of file are faces with UV mapping in groups.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 5 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