nursetriada.blogg.se

Midtown madness 2 pkg
Midtown madness 2 pkg





The sequel to Midtown Madness, one of IGNPC's favorite racing games of the last few years, finally has a sibling in the bi-continental Midtown Madness 2. So by a simple math you can add the verts and faces together and then create the final mesh at the end of prasing.Don't call it a comeback. And each part contain their own Verts, faces number and Shader ID (In 3dsmax, we call it materialIDs). If I could have it build a separate mesh each time then just attach them into one object, would the export process get screwed up? Or would I still be able to write in a order? If that's all I have to do, great, someone please tell me!Īll help is appreciated! Happy holidays and Merry christmas! Vertices are loaded, but faces are in the wrong order. I have tried EVERYTHING to solve this problem, but it just completely screws up the face order. The reason the meshes get split is because the PKG file format has to offset to an entry in a shaders list, so it splits each "strip" into a separate object based on what material is assigned to it and how it corresponds to a shader entry. My only problem is that each time it recursively searches each "Strip" from a section, it builds an entirely separate mesh based off of the information it was given. MessageBox "No file was selected." title:"PKG Tool"

midtown madness 2 pkg

MessageBox "Unsupported file type, terminating!" title:"PKG Tool" Print ("Last Read 0x"+((bit.intAsHex(ftell f))as string)) Pkg = mesh vertices:curVerts faces:curFacesįor j = 1 to unt do setTVert pkg j curUVsįor j = 1 to unt do setTVFace pkg j curFaces Vert = pVertex x: (ReadFloat f) y: (ReadFloat f) z: (ReadFloat f) nx: (ReadFloat f) ny: (ReadFloat f) nz: (ReadFloat f) u: (ReadFloat f) v: (ReadFloat f) Print ("pkgSEC: "+fStrName+" 0x"+((bit.intAsHex(sectionOffset))as string))įNStrips=ReadShort f #unsigned - Number of strips in this sectionįUnkFlags=ReadShort f #unsigned - Flags (unused in MM2)įToShaders=ReadLong f - Offset to assigned shader in listįPrimType=ReadLong f - Primitive type for this strip (triangle) Print ("pkgDAT: "+fStrName+" 0x"+((bit.intAsHex(dataOffset))as string))įData = pkgDat nSections: (ReadLong f) nVerticesTot: (ReadLong f) nIndiciesTot: (ReadLong f) nSections2: (ReadLong f) fFVF: (ReadLong f)įSection = pkgSec nStrips: (ReadShort f #unsigned) nFlags: (ReadShort f #unsigned) shaderOffset: (ReadLong f)

midtown madness 2 pkg

Print ("Shaders per paintjob: "+(shadersPerPaintjob as string)) Print ("Shaders type: "+(shadersType as string)) ShadersOffset=shadersLength+shadersPosition Print ((numFiles as string)+" Geometry files found!") So recursively read each FILE (this method will not work for PKG2) We need to determine how many occurances of FILE there are MessageBox ("PKG3 file ("+(fPKG)+") loaded") title:"File type" Print "Angel Studios PacKaGe File Format V3" Struct pVertex (x, y, z, nx, ny, nz, u, v) Struct pkgSec (nStrips, nFlags, shaderOffset) Struct pkgDat (nSections, nVerticesTot, nIndiciesTot, nSections2, fFVF) If ((unt != 0) and (pkgTyp = "PKG3")) then ( Print ("Current position: 0x"+((bit.intAsHex(ftell f))as string)) Print ((name)+": 0x"+((bit.intAsHex(ftell f))as string))

midtown madness 2 pkg

Str+= bit.intAsChar (ReadByte bstream #unsigned) Code: Select all fPKG = getOpenFileName caption:"Choose Geometry File:" \







Midtown madness 2 pkg