painkiller pkmdl

All questions and discussions about file format analysis are welcome in this forum.

Moderators: Alhexx, mirex

painkiller pkmdl

Postby dany25 » Mon Apr 16, 2007 11:08

i'm looking on an pkmdl exporter but dreamcatcher does not realease anything about this file format

http://rapidshare.com/files/26285119/pa ... s.zip.html

i'm only know the hke file

http://www.dreamcatchergames.com/forums ... hp?t=30138
dany25
 
Posts: 37
Joined: Sat Apr 08, 2006 9:32
Location: France

Postby dany25 » Tue Apr 17, 2007 9:08

dany25
 
Posts: 37
Joined: Sat Apr 08, 2006 9:32
Location: France

Postby OmegaThree » Fri Apr 20, 2007 23:13

Extremely cool.
OmegaThree
 
Posts: 18
Joined: Mon Oct 30, 2006 2:25

Postby fatduck » Mon Apr 23, 2007 22:46

There is a official mod tool for you guys to edit/create new mods, isn't it!?
fatduck
 
Posts: 2
Joined: Mon Apr 23, 2007 22:45

Postby dany25 » Sat Feb 02, 2008 15:12

a guy made an importer exporter script but only for blender
http://rapidshare.com/files/87949927/pk ... s.zip.html

Mirex can you add the export support of this file format please :wink:

http://rapidshare.com/files/89371873/pk ... s.zip.html
dany25
 
Posts: 37
Joined: Sat Apr 08, 2006 9:32
Location: France

Postby mirex » Wed Feb 06, 2008 11:11

Hi, I'd like to add the exporter support, but I'm kinda short on time ... I'll try. But I can't promise anything, as I see that my progress on Biturn is like one update per year :(
User avatar
mirex
Administrator
Administrator
 
Posts: 119
Joined: Sat Oct 15, 2005 11:20
Location: SVK

Postby OmegaThree » Sun Mar 02, 2008 20:45

Awesome! Thanks for the heads-up, danny. If possible, I may try to convert this to MAXScript, but I'd have to learn a great deal. I've only peeked at MAXScript thus far. Shouldn't be terribly difficult.
OmegaThree
 
Posts: 18
Joined: Mon Oct 30, 2006 2:25

Postby OmegaThree » Thu Mar 06, 2008 16:11

Rather than messing with MAXScript, I've started writing a converter that imports header-3 (PKMDL and certain DAT's) and ANI files and exports Source SMD files. So far I've got everything done except the actual import/export. :P Hopefully I'll have it tackled before the weekend is over. Gotta get some sleep right now. Spent the last 16 hours straight working on this.
OmegaThree
 
Posts: 18
Joined: Mon Oct 30, 2006 2:25

Help request

Postby OmegaThree » Mon Mar 10, 2008 13:53

Having trouble with this one. Using Boksha's script and format description, I've got PKMDL import working, and the converter and exporter to SMD is also working. Unfortunately, when I import the result into 3ds max (using Cannonfodder's plugin) or view it with fragMotion, the skeleton looks disjointed and out of whack, and the mesh itself doesn't look like much of anything at all: just a few random triangles.

The bone hierarchy is intact, and the correct number of vertices is being imported, but obviously not in the right places. Someone with the right tools and resources (i.e., Painkiller and/or one of the expansions, 3ds max or another SMD viewer, and reasonable knowledge with VB6) is welcome to take a look at my source and try to figure out what I'm doing wrong. For all intents and purposes, this should be working!

Anyway, it means the converter is going to be delayed.

EDIT: Never mind. Two minutes after I posted this, I figured out the problem. One of my iterators in the triangle block was mislabeled. Below you can see a shot of the converter in its present state. Some polysurfaces are missing in this one, but the door I tested was perfect. I'll get some more of the bugs worked out and hopefully release a beta soon.

Alastor (183 KB, PNG)
Apocalypse zombie (285 KB, PNG)
OmegaThree
 
Posts: 18
Joined: Mon Oct 30, 2006 2:25

Postby KZ_3D » Thu Mar 27, 2008 17:08

This morning I released the 3D Object Converter for Windows V4.20 with the Painkiller .pkmdl loader module.

http://web.t-online.hu/karpo
KZ_3D
 
Posts: 2
Joined: Thu Mar 27, 2008 17:03
Location: Hungary

Postby dany25 » Fri Apr 04, 2008 15:31

i made some modding stuff with pkmdl script

http://www.dreamcatcherinteractive.com/ ... hp?t=32684

also the pkmdl script wrote some other data into the .blend file
look like textures bones...
dany25
 
Posts: 37
Joined: Sat Apr 08, 2006 9:32
Location: France

Postby OmegaThree » Sat Apr 19, 2008 17:48

@KZ_3D: Does it import bones and animation?

Progress on my own converter has been halted for a while because I ran into a matrix transformation problem that I couldn't resolve. I'm going to start over from scratch in VS2005 and try to design better from the ground up. Been busy with work lately, and I'm still learning .NET programming, so it may take a little while. (Fortunately, learning .NET is also part of my job.)
OmegaThree
 
Posts: 18
Joined: Mon Oct 30, 2006 2:25

Postby KZ_3D » Sun Apr 20, 2008 6:35

My program does not support the bone and animation datas.
KZ_3D
 
Posts: 2
Joined: Thu Mar 27, 2008 17:03
Location: Hungary

Postby OmegaThree » Wed Sep 23, 2009 15:28

Updated with complete specification

I've been refining Boksha's format specification as I continue work on a new PKMDL converter. An updated spec is provided below. This is a work in progress.

Code: Select all
struct string
{
   int length
   char carray[length] (always ends with \0)
}

struct model
{
   int identifier (= 3 for AnimatedMesh)
   string filename
   string pathname
   string ameshtext = "AnimatedMesh"
   int ????[4] (== 0,0,0,1) (always 1,0,2,1 for me)
   int restoffilesize (== the actual filesize minus restoffilestart)
   int restoffilestart (== &restoffilestart + 4)
   string pathname2
   short ????

   struct skeleton
   {
      int numbones
      struct bone
      {
         string bonename
         float localmatrix[16]
         unsigned char numchildren
      } bones[numbones]
   } animskeleton
   
   int numpolysurfaces
   struct polysurface
   {
      string surfacename
      int ????[3] (== 0,0,0)

      int numtextures
      struct texturesurface
      {
         struct texturegroup
         {
            string texturefilename
            int dataoffset
            int numtriangles
         } texturegroups[numtextures]

         int numvertindices (== 3 * totalnumtriangles)
         
         struct triangle
         {
            ushort vertex0
            ushort vertex1
            ushort vertex2
         } triangles[numvertindices / 3]
         
         int ???? (== 0)
         
         int numvertices
         struct vertex
         {
            float position[3]
            float normal[3]
            float uvcoordinates[2]
         } vertices[numvertices]
         
         int ????[2] (== 0,0)
         
         int numskininfos (== numvertices)
         struct skininfo
         {
            ushort numbonesaffectedby
            ushort skeletonindex
            struct
            {
               ushort boneindex
               float weight
            } boneinfo [numbonesaffectedby]
            
         } skininfos[numvertices]
         
      } texturesurfaces[numtextures]
      
   } polysurfaces[numpolysurfaces]
}

struct animation
{
   char skel[4] = "skel"
   float animlength
   int numboneanims
   struct boneanim
   {
      string bonename
      int numframes
      struct frame
      {
         float timestamp
         float matrix[16]
      } frames [numframes]
   } boneanims [numboneanims]
}


Edit #1: Aside from a few unknowns (which don't seem to affect imports), this spec is more or less complete. Thanks to Boksha for providing a very generous starting point. I'm going to clean this up and write some C# source to import PKMDL models.

Edit #2: Another day, another update. My goal with this new project is to build a universal model loader/converter, integrating whatever types I can (i.e., model formats for which I have detailed specs). There are plenty of ASC, ASE, 3DS, OBJ, etc. converters out there. My attention is focused solely on game formats.

So far i can import PKMDL and SMD files, with bones and skinning but without animations. I need to completely refactor the PKMDL code module and pretty it up. My next major step is to implement a preview window. After that I'll work on exports, and then animations, and then I'll keep adding formats. When I'm satisifed with it, I'll release the complete source.
OmegaThree
 
Posts: 18
Joined: Mon Oct 30, 2006 2:25

Postby mirex » Tue Oct 13, 2009 11:32

OmegaThree: I wish you good luck on creating your convertor ! I have started the same way as you when I started programming Biturn convertor. First it was only about Final Fantasy 7 formats and converting them to OBJ format. Then I added preview window pane and more formats, and as the time passes I try to add as many formats as I can. Keep it up !
User avatar
mirex
Administrator
Administrator
 
Posts: 119
Joined: Sat Oct 15, 2005 11:20
Location: SVK

Postby OmegaThree » Thu Oct 15, 2009 14:35

Thanks, mirex. I've got SMD import/export working perfectly, but no format conversions yet. I've been breaking down other formats lately: STALKER, Two Worlds, and World of Warcraft. I have STALKER OMF more or less deciphered, but there are all sorts of values that don't make sense to me. Two Worlds was easier to decipher but harder to parse, and I'm almost done with WoW M2, using Darjk's MAXScript importer as a solid starting point. Fun!
OmegaThree
 
Posts: 18
Joined: Mon Oct 30, 2006 2:25


Return to File Format Analysis

Who is online

Users browsing this forum: No registered users and 2 guests

cron