Join also our Discord channel! Click here.

Midnight Club 3 Dub Edition Research Thread

The Original Forum. Game archives, full of resources. How to open them? Get help here.
ss4gogeta0
beginner
Posts: 26
Joined: Thu Apr 02, 2015 7:06 am
Has thanked: 14 times
Been thanked: 4 times

Midnight Club 3 Dub Edition Research Thread

Post by ss4gogeta0 » Thu Apr 02, 2015 7:49 am

*Moved from Models section*

So, I have been looking through these forums for the past few years on how to extract multiple models from multiple games, it has helped me alot. Especially with my GTA Modding career :keke:

anyway one of the games I have been wanting to extract things from was Midnight club 3... I know there were threads on this site about it back in the mid 2000's but it seems that no one has put really any effort into researching the files other than for the music...

I was wondering if we can get some research into the file formats that are used... I actually conducted some myself, but Im not really smart enough to reverse engineer files... ;)

so far I was able to extract everything from the main archive on the PSP version and have seperated the cities by folder...

Here is the Atlanta city folder

Image

The folders regarding the time and weather cycles contain a single file: global_lighting.gt
which is made up of these lines of code

Code: Select all

ambient {
	color: 0.232352 0.357612 0.548000
}
directional {
	color: 0.936000 0.668901 0.089856
	direction: -0.889713 -0.450294 0.075142
}
then you have the .graph files which contains co-ordinates for the textures aswell as the map itself (Really long file)

Code: Select all

MinExtents -1210.000000	-4.000001	-870.534790 
MaxExtents 609.999695	10.814615	946.128052 
Graphs 1
{
	Graph a_graph
	{
		VertexArray 931
		{
			-733.138123	0.149985	224.996307 
			-736.299561	0.149987	228.158539 
			-637.677734	0.149985	326.820007 
			-634.482117	0.150000	323.624847 
			-715.106934	0.149985	206.965118 
			-718.288879	0.149985	210.147095 
			-619.646545	0.149985	308.788818 
			... 
then you have the .occlude file which is pretty obvious what it has...

Code: Select all

version: 3
num_geoms: 340
num_primitives: 30

;|occluders|boxOccluders|box_0	[0]
verts: 8
activate: 40
sphere: -409.6565552 -36.6345892 424.0878754 129.0808293
-418.4957275	-100	503.6173706
-330.1471558	-100	415.2690735
-418.4957275	26.73082161	503.6173706
-330.1471558	26.73082161	415.2690735
-489.1659546	26.73082161	432.8664551
-401.072937	26.73082161	344.5583801
-489.1659546	-100	432.8664551
-401.072937	-100	344.5583801
edges: 12
then there are the .ait files... which contain paths and object placement coords

.ait

Code: Select all

Nodes 54
{
Node 737
	{
		Position -437.101379	-0.000001	-900.352417 
		Normal -0.708640	0.000000	-0.705570 
	}
Node 738
	{
		Position -513.089905	-0.000001	-976.011719 
		Normal -0.708640	0.000000	-0.705570 
	}
Node 739
	{
		Position -386.044067	0.281514	-432.800873 
		Normal 0.708955	-0.002212	-0.705250 
	}
Node 740
	{
		Position -318.834564	0.071816	-499.659149 
		Normal 0.708955	-0.002212	-0.705250 
	}
Node 741
	{
		Position -313.560181	0.150000	-78.123131 
		Normal -0.032571	0.000000	0.999469 
	}
Node 742
	{
		Position -316.227448	0.150000	3.723971 
		Normal -0.032571	0.000000	0.999469 
	}
Node 743
	{
		Position -415.321320	0.150000	-130.042221 
		Normal -0.002003	0.000000	-0.999998 
	}
Node 744
	{
		Position -415.543762	0.150000	-241.106598 
		Normal -0.002003	0.000000	-0.999998 
	}

I have not been able to access the .aib files... nor do I have the experience to check em with a hex editor...

the texture folder just has a_shared_particle.tex

anyway moving on...

Here is what is in the props folder...

Image

I have yet to open any of them due to being unfamiliar with the psppck file architecture...

same for the cities themselves

Image


if anyones interested in looking at the psppck files, I can upload one of them (as long as its not against the rules, which I doubt but its always good to be safe and check)
Just a Modder of GTA SA and Resident Evil 4

barti
veteran
Posts: 148
Joined: Sun Apr 01, 2012 12:44 pm
Has thanked: 51 times
Been thanked: 101 times

Re: Midnight Club 3 Dub Edition Research Thread

Post by barti » Thu Apr 02, 2015 11:21 am

As the extension .psppck would imply, I believe it's some kind of a package which holds both the model and the textures for that model.

Interestingly, the models for traffic cars in vehicle folder are stored in a plaintext format (here's part of the va_cranetruck_sh\whl0_h.mesh file):

Code: Select all

{
	Skinned 0 
	PosSkin 0 
	Pos 24 { 
		-0.150614	0.475711	0.475832 
		-0.150613	0.475711	-0.475831 
		-0.150613	-0.475941	-0.475832 
		-0.150613	-0.475941	0.475832 
		0.150614	0.475711	-0.475831 
		0.150613	0.475711	0.475832 
		0.150614	-0.475942	0.475831 
		0.150614	-0.475941	-0.475832 
		0.150342	0.000702	-0.474956 
		-0.149259	-0.335341	-0.335766 
		-0.149259	0.000702	-0.474956 
		0.150342	-0.335341	-0.335766 
		-0.149260	-0.474536	0.000283 
		0.150342	-0.474536	0.000283 
		-0.149260	-0.335341	0.336325 
		0.150342	-0.335341	0.336325 
		-0.149260	0.000705	0.475514 
		0.150342	0.000706	0.475513 
		-0.149260	0.336747	0.336324 
		0.150342	0.336748	0.336323 
		-0.149260	0.475941	0.000286 
		0.150342	0.475942	0.000285 
		-0.149260	0.336751	-0.335778 
		0.150342	0.336751	-0.335778 
	}

	Nrm 18 { 
		-1.000000	0.000000	0.000000 
		1.000000	0.000000	0.000000 
...

ss4gogeta0
beginner
Posts: 26
Joined: Thu Apr 02, 2015 7:06 am
Has thanked: 14 times
Been thanked: 4 times

Re: Midnight Club 3 Dub Edition Research Thread

Post by ss4gogeta0 » Sat Apr 04, 2015 7:31 am

:mrgreen: sorry I got distracted trying to fix some model errors while extracting the cities from Driver 2...

right now im trying out a couple texture converters for the .tex files

Image

and yea, I noticed that too, although I didnt really go through it in greater detail lol... Is there any way we can load the mesh file up into 3DSMax?

actually I will try that and post an update if it works or not
Just a Modder of GTA SA and Resident Evil 4

barti
veteran
Posts: 148
Joined: Sun Apr 01, 2012 12:44 pm
Has thanked: 51 times
Been thanked: 101 times

Re: Midnight Club 3 Dub Edition Research Thread

Post by barti » Sat Apr 04, 2015 1:02 pm

The texture format is more or less the same as in previous games by Angel Studios / Rockstar San Diego. I'm working on a Python plugin for Noesis for importing them. The whole format is documented here: http://mm2kiwi.apan.is-a-geek.com/index.php?title=TEX

Image

I'll mess around with the model formats later.

ss4gogeta0
beginner
Posts: 26
Joined: Thu Apr 02, 2015 7:06 am
Has thanked: 14 times
Been thanked: 4 times

Re: Midnight Club 3 Dub Edition Research Thread

Post by ss4gogeta0 » Tue Apr 07, 2015 7:09 am

barti wrote:The texture format is more or less the same as in previous games by Angel Studios / Rockstar San Diego. I'm working on a Python plugin for Noesis for importing them. The whole format is documented here: http://mm2kiwi.apan.is-a-geek.com/index.php?title=TEX

Image

I'll mess around with the model formats later.
alright, I found this earlier which pertains to a program that would be used to read tex files aswell... but anyway let me know how it goes...
http://forum.mm2c.com/viewtopic.php?t=1 ... d9f080313c

also here is the atlanta_dawn_clear.parfileio file I was looking through...

Code: Select all

type: a
parFileIO {
  fog_color 0.173510	0.189537	0.221654 
  fog_start 0.000000 
  fog_end 831.142150 
  fog_threshold 0.000000 
  fog_clamp 0.467000
  lightfog_scale 0.999922 
  indoor_fog_color 0.173510	0.189537	0.221654 
  indoor_fog_start 0.000000 
  indoor_fog_end 831.142150 
  indoor_fog_threshold 0.000000 
  indoor_fog_clamp 0.467800 
  mAmbientTweakRadius 20.000000 
  mAmbientTweakConstant 0.100000 
  mAmbientVehicleModifier 0.839981 
  refl_bk_color 0.000000	0.000000	0.000000	1.000000 
  refl_dist 400.000000 
  light_glow_intensity 0.699909 
  light_glow_size 1.399932 
  flare_on 1 
  flare_intensiry 0.500000 
  flare_size 0.899917 
  flare_distance 1500.000000 
  m_staticLightYOffset 0.449999 
  m_staticLightColor 0.4050000	0.428000	0.440000
  m_ambientScale 0.100 
  mAmbientLight 0.499184	0.499185	0.500122	1.000000 
  mDirectionalRot -157.000000 
  mDirectionalElevation 163.000000 
  mDirectionalLightColor 0.850057	0.641960	0.238247	1.000000 
  m_skylightRot 0.000000 
  m_skylightElevation 90.000000 
  m_drawSkylightPos 0 
  m_skylightColor 0.200000	0.200000	0.229967	1.000000 
  m_useSkylight 0 
  mLightAttenuation 1.000000 
  mLightFalloff 1.000000 
  m_roadShiniess 0.609979 
  m_reflectedObjectColorMod 0.468750	0.468750	0.468750	1.000000 
  m_reflectionWidthMod 3.634041 
  m_reflectionHeightMod 0.479997 
  m_globalLightMod 0.299990 
  Brightness 0.448
  Hue 1.000000 
  Saturation 0.799967 
  Value 1.048
}
aswell as atlanta_dawn_clear_hdrparam0.mcfbglowparams

Code: Select all

type: a
mcFbGlowParams {
  m_minLevels 0.452937	0.453142	0.454061	0.000000 
  m_addSmooth 1 
  m_blurRadius 20 
  m_numGaussians 2 
  radius_scale0 0.179998 
  amp0 0.129997 
  radius_scale1 4.500000 
  amp1 0.739998 
  m_baseAtten 1.000000 
  m_horizAlpha 0.124997 
  m_vertAlpha 0.200000 
  m_useFbAlpha 1 
}
Just a Modder of GTA SA and Resident Evil 4

barti
veteran
Posts: 148
Joined: Sun Apr 01, 2012 12:44 pm
Has thanked: 51 times
Been thanked: 101 times

Re: Midnight Club 3 Dub Edition Research Thread

Post by barti » Tue Apr 07, 2015 11:25 am

Alright, here's my Python script. It works just fine with Midnight Club 3, as well as Midtown Madness 2 and Midnight Club Street Racing. I tried to add Midnight Club 2 support as well, but it's not fully functional yet.
Save it as "tex_angelstudios_tex.py" and put it in the "plugins/pyton" folder in Noesis.

Code: Select all

# Midtown Madness / Midnight Club .TEX
# Reference from http://mm2kiwi.apan.is-a-geek.com/index.php?title=TEX
# and http://forum.xentax.com/viewtopic.php?f=10&p=9670

from inc_noesis import *

import noesis
import rapi

def registerNoesisTypes():
	handle = noesis.register("Midtown Madness / Midnight Club", ".tex")
	noesis.setHandlerTypeCheck(handle, texCheckType)
	noesis.setHandlerLoadRGBA(handle, texLoadRGBA)
	return 1

def texCheckType(data):
	return 1

def texLoadRGBA(data, texList):
	tex = AGETexture(NoeBitStream(data))
	texList.append(tex.parseTexture())
	return 1

class AGETexture:

	def __init__(self, reader):
		self.reader = reader

	def parseTexture(self):
		texWidth   = self.reader.readUShort()
		texHeight  = self.reader.readUShort()
		texType    = self.reader.readShort()
		texMips    = self.reader.readShort()
		texUnknown = self.reader.readShort()
		texFlag1   = self.reader.readUByte()
		texFlag2   = self.reader.readUByte()
		texFlag3   = self.reader.readUByte()
		texFlag4   = self.reader.readUByte()
				
		if texType == 1: # P8
			palMap = self.reader.readBytes(256*4)
			pixMap = self.reader.readBytes(texWidth * texHeight)
			pixData = rapi.imageDecodeRawPal(pixMap, palMap, texWidth, texHeight, 8, "b8g8r8p8")
		if texType == 14: # PA8
			palMap = self.reader.readBytes(256*4)
			pixMap = self.reader.readBytes(texWidth * texHeight)
			pixData = rapi.imageDecodeRawPal(pixMap, palMap, texWidth, texHeight, 8, "b8g8r8a8")
		if texType == 15: # P4_MC
			palMap = self.reader.readBytes(16*4)
			pixMap = self.reader.readBytes(int(texWidth * texHeight / 2))
			pixData = rapi.imageDecodeRawPal(pixMap, palMap, texWidth, texHeight, 4, "b8g8r8p8")
		if texType == 16: # PA4_MC
			palMap = self.reader.readBytes(16*4)
			pixMap = self.reader.readBytes(int(texWidth * texHeight / 2))
			pixData = rapi.imageDecodeRawPal(pixMap, palMap, texWidth, texHeight, 4, "b8g8r8a8")
		if texType == 17: # RGB888
			pixMap = self.reader.readBytes(texWidth * texHeight * 3)
			pixData = rapi.imageDecodeRaw(pixMap, texWidth, texHeight, "r8g8b8")
		if texType == 18: # RGBA8888
			pixMap = self.reader.readBytes(texWidth * texHeight * 4)
			pixData = rapi.imageDecodeRaw(pixMap, texWidth, texHeight, "r8g8b8a8")
		# Midnight Club 2 support (textype 26 not fully functional)
		if texType == 22: # DXT1
			pixMap = self.reader.readBytes(int(texWidth * texHeight * 4 / 8))
			pixData = rapi.imageDecodeDXT(pixMap, texWidth, texHeight, noesis.NOESISTEX_DXT1)
		if texType == 26: # DXT5
			pixMap = self.reader.readBytes(int(texWidth * texHeight * 4 / 4))
			pixData = rapi.imageDecodeDXT(pixMap, texWidth, texHeight, noesis.NOESISTEX_DXT5)
			
		pixData = rapi.imageFlipRGBA32(pixData, texWidth, texHeight, 0, 1)
		return NoeTexture("tex", texWidth, texHeight, pixData, noesis.NOESISTEX_RGBA32)

ss4gogeta0
beginner
Posts: 26
Joined: Thu Apr 02, 2015 7:06 am
Has thanked: 14 times
Been thanked: 4 times

Re: Midnight Club 3 Dub Edition Research Thread

Post by ss4gogeta0 » Wed Apr 08, 2015 11:45 pm

python script works beautifully on my end lol

just bought the remixed version of Midnight Club 3 on PSN and am going to try to get the files by using my friends modded PS3...

how is the model extraction going?
Just a Modder of GTA SA and Resident Evil 4

barti
veteran
Posts: 148
Joined: Sun Apr 01, 2012 12:44 pm
Has thanked: 51 times
Been thanked: 101 times

Re: Midnight Club 3 Dub Edition Research Thread

Post by barti » Fri Apr 10, 2015 12:17 pm

.mesh extraction is coming along nicely:
Image

But I couldn't make anything out of the .psppck files. Maybe they're compressed - I tried aluigi's compression scanner and it didn't find anything interesting.

ss4gogeta0
beginner
Posts: 26
Joined: Thu Apr 02, 2015 7:06 am
Has thanked: 14 times
Been thanked: 4 times

Re: Midnight Club 3 Dub Edition Research Thread

Post by ss4gogeta0 » Mon Apr 13, 2015 3:42 am

barti wrote:.mesh extraction is coming along nicely:
Image

But I couldn't make anything out of the .psppck files. Maybe they're compressed - I tried aluigi's compression scanner and it didn't find anything interesting.
yea I think the psppck files are compressed... maybe with a similar structure to a normal pck file...

*Edit* I can pretty much confirm thay psppck is just a compressed pck file

Image

I got the files from Dub Edition Remix for PS2 and am extracting everything in the dats with Iripper

Image

anyway, keep up the good work
Just a Modder of GTA SA and Resident Evil 4

barti
veteran
Posts: 148
Joined: Sun Apr 01, 2012 12:44 pm
Has thanked: 51 times
Been thanked: 101 times

Re: Midnight Club 3 Dub Edition Research Thread

Post by barti » Tue Apr 14, 2015 11:32 pm

As I don't have as much time to work on the .mesh files as I'd like, here's the MaxScript I wrote a few days ago. It doesn't support automatic texturing, or positioning of objects - it's definitely possible to do that manually though. Feel free to modify it, etc.

Code: Select all

g = getOpenFileName()
if g != undefined then
(
	Vertex_Array = #()
	Normals_Array = #()
	UV_Array = #()
	UV2_Array = #()
	Colors_Array = #()
	Adjuncts_Array = #()
	Face_Array = #()
	MatID_Array = #()
	
	f = openFile g
	
	skipToString f "Pos "
	numVerts = readValue f
	readline f
	
	for i = 1 to numVerts do
	(
		verts = filterstring (readline f) " \t"
		append Vertex_Array [-verts[1] as float, verts[3] as float, verts[2] as float]
	)
	
	skiptostring f "Nrm "
	numNorms = readValue f
	readline f
	
	for i = 1 to numNorms do
	(
		norms = filterstring (readline f) " \t"
		append Normals_Array [-norms[1] as float, norms[3] as float, norms[2] as float]
	)
	
	skiptostring f "Cpv "
	numColors = readValue f
	readline f
	
	for i = 1 to numColors do
	(
		colors = filterstring (readline f) " \t"
		append Colors_Array [colors[1] as float, colors[2] as float, colors[3] as float, colors[4] as float]
	)
	
	skiptostring f "Tex0 "
	numUVs = readValue f
	readline f
	
	for i = 1 to numUVs do
	(
		uvs = filterstring (readline f) " \t"
		append UV_Array [uvs[1] as float, uvs[2] as float,0]
	)
	
	skiptostring f "Tex1 "
	numUV2s = readValue f
	
	if numUV2s > 0 do
	(
		for i = 1 to numUV2s do
		(
			uvs = filterstring (readline f) " \t"
			append UV2_Array [uvs[1] as float, uvs[2] as float,0]
		)
	)
	
	skiptostring f "Adj "
	numAdjs = readValue f
	readline f
	
	for i = 1 to numAdjs do
	(
		pos = filterstring (readline f) " \t"
		nrm = filterstring (readline f) " \t"
		c0 = filterstring (readline f) " \t"
		t0 = filterstring (readline f) " \t"
		append Adjuncts_Array [1+pos[2] as number,1+nrm[2] as number,1+c0[2] as number,1+t0[2] as number]
	)
	
	skiptostring f "Mtl "
	numMats = readValue f
	
	for i = 1 to numMats do
	(
		skiptostring f "Name "
		matName = readValue f
		
		skiptostring f "Prim "
		numPrims = readValue f
		
		for j = 1 to numPrims do
		(
			skiptostring f "Type "
			primType = readline f
			skiptostring f "Idx "
			numIndices = readValue f
			skiptostring f "{ "
			
			local tristrip = #()
			for k = 1 to numIndices do append tristrip (readValue f)
			
			case primtype of
			(
				default: print "Unsupported primtype " + primType + ". Contact me."
				"TRISTRIP":
				(
					for j=1 to tristrip.count - 2 do
					(
					   fa = tristrip[j]
					   fb = tristrip[j+1]
					   fc = tristrip[j+2]
					   if ((fa!=fb) and (fa!=fc) and (fc!=fb)) do
					   (
						  if mod j 2 == 0  then append Face_Array [fc+1,fb+1,fa+1]
						  else append Face_Array [fb+1,fc+1,fa+1]
						  
						  append MatID_Array i
					   )
					)
				)
				"TRISTRIP2":
				(
					for j=1 to tristrip.count - 2 do
					(
					   fa = tristrip[j]
					   fb = tristrip[j+1]
					   fc = tristrip[j+2]
					   if ((fa!=fb) and (fa!=fc) and (fc!=fb)) do
					   (
						  if mod j 2 == 0  then append Face_Array [fb+1,fc+1,fa+1]
						  else append Face_Array [fc+1,fb+1,fa+1]
						  
						  append MatID_Array i
					   )
					)
				)
			)
		)
	)
	
	msh = mesh name:(getFilenameFile g)
	
	setNumVerts msh Adjuncts_Array.count
	setNumTVerts msh Adjuncts_Array.count
	setNumCPVVerts msh Adjuncts_Array.count
	setNumFaces msh Face_Array.count
	buildTVFaces msh
	
	for i = 1 to Face_Array.count do
	(
		setFace msh i Face_Array[i]
		setTVFace msh i Face_Array[i]
	)
	meshop.setMapSupport msh 0 true
	meshop.setMapSupport msh 1 true
	
	for i = 1 to Adjuncts_Array.count do
	(
		setvert msh i Vertex_Array[Adjuncts_Array[i][1]]
		setNormal msh i Normals_Array[Adjuncts_Array[i][2]]
		setVertColor msh i Colors_Array[Adjuncts_Array[i][3]]
		setTVert msh i UV_Array[Adjuncts_Array[i][4]]
	)
	
	for i = 1 to Face_Array.count do
	(
		setFaceMatID msh i (MatID_Array[i])
	)
	update msh
)

ss4gogeta0
beginner
Posts: 26
Joined: Thu Apr 02, 2015 7:06 am
Has thanked: 14 times
Been thanked: 4 times

Re: Midnight Club 3 Dub Edition Research Thread

Post by ss4gogeta0 » Tue Apr 21, 2015 5:37 pm

sorry for the long break without a reply, I got stuck studying for a test today aswell as spent time with my family...

anyway im still here and I will be taking a look at this later on today :wink:
Just a Modder of GTA SA and Resident Evil 4

ss4gogeta0
beginner
Posts: 26
Joined: Thu Apr 02, 2015 7:06 am
Has thanked: 14 times
Been thanked: 4 times

Re: Midnight Club 3 Dub Edition Research Thread

Post by ss4gogeta0 » Tue Apr 28, 2015 10:22 am

ok so I wanted to test something out and I was able to replace some of the ingame tracks with my own music...

also I was searching through the files and figured out where the text strings were stored for menus and dialog...

Image

they are stored in strtbl files which I assume are similar to GTA's GXT file...

Image

I tried opening with Hex Workshop and this is what I got...

Image
Just a Modder of GTA SA and Resident Evil 4

RacingFreak
veteran
Posts: 136
Joined: Fri Feb 11, 2011 10:44 am
Location: Bulgaria
Has thanked: 50 times
Been thanked: 19 times

Re: Midnight Club 3 Dub Edition Research Thread

Post by RacingFreak » Mon Mar 28, 2016 5:50 pm

That's impressive work! The script works flawless~ Shame that there isn't support for multiple materials and object positioning yet :(

Would anyone look into the compressed pck files in MCLA?

ss4gogeta0
beginner
Posts: 26
Joined: Thu Apr 02, 2015 7:06 am
Has thanked: 14 times
Been thanked: 4 times

Re: Midnight Club 3 Dub Edition Research Thread

Post by ss4gogeta0 » Thu Jun 23, 2016 12:05 pm

RacingFreak wrote:That's impressive work! The script works flawless~ Shame that there isn't support for multiple materials and object positioning yet :(

Would anyone look into the compressed pck files in MCLA?
dont got it. Just wanted the MC3 maps since I have the game and the maps are in a similar design to what a GTA map would look like
Just a Modder of GTA SA and Resident Evil 4

deadly202
ultra-n00b
Posts: 1
Joined: Sun Oct 09, 2016 1:30 am

Re: Midnight Club 3 Dub Edition Research Thread

Post by deadly202 » Sun Oct 09, 2016 1:55 am

I can't seem to extract the assets file properly in MC3, ps2 version with iripper. I checked the files with with hxd and they're all blank files (most of them). I then tried Game Extractor and it seems to work but the filenames and folders are messed up. Is there something i missed or forgot to do?

Image

Post Reply