The Forum is up for sale: XeNTaX Forum looking for new owner

[Request] Sleeping Dogs Model Files

Post questions about game models here, or help out others!
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4231
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1139 times
Been thanked: 2222 times

Re: [Request] Sleeping Dogs Model Files

Post by shakotay2 »

What I could think of is a data error in your downloaded zip.
When you do a RMB click on the SleepDogsExtractor.exe in the zip then properties you should get this checksum:
Image
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
SergeantJoe
mega-veteran
mega-veteran
Posts: 242
Joined: Fri Aug 30, 2013 5:39 am
Has thanked: 57 times
Been thanked: 20 times

Re: [Request] Sleeping Dogs Model Files

Post by SergeantJoe »

No dice. This is really bizarre.

Oh well, don't worry about it. This isn't the first time my computer has mysteriously broken a program for no reason.
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4231
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1139 times
Been thanked: 2222 times

Re: [Request] Sleeping Dogs Model Files

Post by shakotay2 »

SergeantJoe wrote:[...]my computer has mysteriously broken a program for no reason.
Hehehe, with computer errors there is always a reason. You might try chkdsk /f/r c:
for your c drive (or another letter for the drive your running the exe on).
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
SergeantJoe
mega-veteran
mega-veteran
Posts: 242
Joined: Fri Aug 30, 2013 5:39 am
Has thanked: 57 times
Been thanked: 20 times

Re: [Request] Sleeping Dogs Model Files

Post by SergeantJoe »

Process completed successfully, yet it still gives me a blank file.

Oh well, it must be just a Windows 8 thing. Like I said, don't worry about it. I already got someone who can convert the files for me.

EDIT: I don't really know where to put this but I thought I should mention it anyway:

If you open Global.big/Data/Scripts and open one of the .skoo files with Notead, you can find some pretty interesting snippets. (example)

Those seem to be comments from the game code! So theoretically if someone had a copy of the SkookumScript IDE and a .big repacker they could pretty much have full control over nearly all game scenarios. (but not core gameplay I think)
While it's not as good as the alternatives, this still could possibly open up a whole world of modding capabilities. But currently there's no way to mod anything unless we get a .big repacker, but I'm being overly optimistic here.

Anyway, sorry for rambling. Good luck with those faces.
SergeantJoe
mega-veteran
mega-veteran
Posts: 242
Joined: Fri Aug 30, 2013 5:39 am
Has thanked: 57 times
Been thanked: 20 times

Re: [Request] Sleeping Dogs Model Files

Post by SergeantJoe »

I just got it to work!

Turns out I was opening the model, but I never pressed the "go" button. I feel really stupid now.

EDIT: And it works perfectly. Thank you so much once again.
SergeantJoe
mega-veteran
mega-veteran
Posts: 242
Joined: Fri Aug 30, 2013 5:39 am
Has thanked: 57 times
Been thanked: 20 times

Re: [Request] Sleeping Dogs Model Files

Post by SergeantJoe »

shakotay2 wrote:Well, with the faces of the vehicles it's a little bit complicated.
For bisai01.perm.bin for example I found 193, 1321 and 4529 faces (LOD1,2,3?).
But if you display 3 models there are weird faces for example in LOD2 model.

With the help from Mariusz Szkaradek I understood that the 3 submeshes have to be devided up.

In fact there seem to be 8 submeshes.
SM 0 having 193 faces
no 1 to 3 have 99, 535+579+50 and 46+12 faces (1321 in sum)
The 4529 faces split up on submeshes 4..7

So the riddle is solved thanks Mariusz.

edit: hmm, I've made a comparison between the faces in the submeshes 1 to 3 and the ones of the errorness LOD2 SM.
They are identical!
So my error seems to be in the relation to the vertices list. Sure it's a rather simple one but I have to stick to RL again...
So, are vehicles now supported or am I being hasty again?

Also, if you have the time could you take a look at these bins? They all give me a "no mesh found error", even though they do in fact contain a model.
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4231
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1139 times
Been thanked: 2222 times

Re: [Request] Sleeping Dogs Model Files

Post by shakotay2 »

SergeantJoe wrote:So, are vehicles now supported or am I being hasty again?
Will take some time.
Also, if you have the time could you take a look at [...]these bins? They all give me a "no mesh found error", even though they do in fact contain a model.
Some don't contain the full "Buffer" string. further analysis is required.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
SergeantJoe
mega-veteran
mega-veteran
Posts: 242
Joined: Fri Aug 30, 2013 5:39 am
Has thanked: 57 times
Been thanked: 20 times

Re: [Request] Sleeping Dogs Model Files

Post by SergeantJoe »

Alright, take your time. Meanwhile I'll get to work converting these 100+ character models.
SergeantJoe
mega-veteran
mega-veteran
Posts: 242
Joined: Fri Aug 30, 2013 5:39 am
Has thanked: 57 times
Been thanked: 20 times

Re: [Request] Sleeping Dogs Model Files

Post by SergeantJoe »

Once again, big thanks to Shako for the mesh support.

However, now we need the model skeleton. We are really close to creating the very first mod for this game, and if one day it will be possible to make a .perm.bin repacker then bones will be very important.

Is there anyone here who's good at extracting bones? Howfie said he would look at it a month ago but I haven't really heard anything since then.
howfie
double-veteran
double-veteran
Posts: 929
Joined: Fri Jul 08, 2011 12:06 pm
Location: Torrance, CA
Has thanked: 10 times
Been thanked: 274 times

Re: [Request] Sleeping Dogs Model Files

Post by howfie »

i can get em, will take a little more time (my time is a little limited the last month... as u can see i dont even have time to play the game lmao).
SergeantJoe
mega-veteran
mega-veteran
Posts: 242
Joined: Fri Aug 30, 2013 5:39 am
Has thanked: 57 times
Been thanked: 20 times

Re: [Request] Sleeping Dogs Model Files

Post by SergeantJoe »

Wait, really? I kind of assumed you lost interest since you haven't really responded to any of my PMs.

If you can still get the bones that'd be truly amazing. Sorry for jumping to conclusions.
howfie
double-veteran
double-veteran
Posts: 929
Joined: Fri Jul 08, 2011 12:06 pm
Location: Torrance, CA
Has thanked: 10 times
Been thanked: 274 times

Re: [Request] Sleeping Dogs Model Files

Post by howfie »

no i havent lost interest hehehe, its just my gf doesnt share my love of extracting models so if i get caught on my laptop working on those asian prostitutes hahaha....

btw shakotay, is mariusz going to help you do the bones? if you dont mind sharing ur code i can help you get the bones and weights. but i know mariusz is helping you so no biggie if he wants to help you finish it as well.
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4231
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1139 times
Been thanked: 2222 times

Re: [Request] Sleeping Dogs Model Files

Post by shakotay2 »

howfie wrote:btw shakotay, is mariusz going to help you do the bones? if you dont mind sharing ur code i can help you get the bones and weights. but i know mariusz is helping you so no biggie if he wants to help you finish it as well.
Mariusz send me his SleepingDogs blend file (including python code) when I was stuck wtih vehicles.

I was wondering why he didn't release it on Xentax himself and I promissed him to respect this.
So I don't know why he didn't, I ask him whether he is active in any forum but there was no response.

So maybe someone (SergantJoe?) is kindly going to ask him for some support.

My focus is not on SleepingDogs (because of my limited bandwith I even don't want download the steam demo).

I append the starting part of my first code which was capable of extracting characters. The format is a little bit confusing so is my code. So it won't help you either I guess

It was just searching for "xBuf" in the model data to determine the startaddresses of indexBuffers and VertexBuffers.

If you have a look at Jackie.perm.bin: there are two index- and two vertexBuffers. But they don't seem to contain bones info.

There's some kind of bones list from 0x0C10 to 0x1E0F (Bip01 Head, ..., Bip01 R Toe0) but it's not very helpful to me. There's no "parenting data" but maybe one could build the skeleton just from the sequential hierarchy.
Maybe more bones info to be contained in the animation files.
But Cop.bin for example does not contain any "xBuf" string so my code will not be useful for this kind of files.

The python code mainly did a 4 bytes pattern search for the different data buffers. But if I recall correctly it couldn't handle bones data.

Code: Select all

// main()
/*				das ist der erste SleepingDogs extractor code für char model; ziemliche probs mit vehicles
					offs = 1 ; l= 0 ; lastFaceNo= 0 ; cnt= 0 ; VBl_cnt=0 ;
						do {		// ja, super! Der algo versagt, wenn er auf einer Fundstelle startet! Weil offs2 dann =0
							bGetMesh= false ;			//lastFaceNo= 0 ; // for debug only
							nValue[0]= 0x78; nValue[1]= 0x42; nValue[2]= 0x75; nValue[3]= 0x66; // "xBuf"
							if ((*(pFBuf+offs)&255)==nValue[0]) offs-- ;	// gegen Algoversagen
							offs2 = FindStringInBuf_contDECO(offs, dwFileSize, nValue, 4) ;
							if (offs2!=0)	{
								offs += offs2 ; 
								if ((*(pFBuf+offs-4)&255)==0x49) {		// 'I'
									l++ ; VBl_cnt=0 ;
									offs3 = offs-6 ;	cnt= 0 ;	// zurück auf Submesh name
									while (*(pFBuf+offs3)!=0) {offs3-- ; cnt++ ;}
									offs3 += 5 ; cnt -= 4 ; fprintf( stream, "g submesh_%d\n# ", l) ;
									if (cnt>255) chMB("Submeshname too long!") ;
									else for (k=0;k<cnt;k++) fprintf( stream, "%c", *(pFBuf+offs3+k)) ;
									dwStartI= offs + 47 - cnt ;		// addr of faceIndices cnt
									fprintf( stream, "\n") ;
								}
								else if ((*(pFBuf+offs-5)&255)==0x56) {		// 'V'
									VBl_cnt++ ;
									if (cnt==0) {						// wenn vorher kein "I" gefunden
										// if start with VertexBlock
										offs3 = offs-7 ;				// zurück auf Submesh name Ende
										while (*(pFBuf+offs3)!=0) {offs3-- ; cnt++ ;}	// Anfang suchen
										offs3 += 6 ; cnt -= 5 ; fprintf( stream, "g submesh_%d\n# ", l) ;
										if (cnt>255) chMB("Submeshname too long!") ;
										else for (k=0;k<cnt;k++) fprintf( stream, "%c", *(pFBuf+offs3+k)) ;
										fprintf( stream, "\n") ;
										cnt++ ;				// magic, ask Dr. Ferguson
										// end if
									}
									offs3 = offs + 46 - cnt ;				// same SubMeshname expected!!
									type = *(pFBuf+offs3-4) ;				// zurück auf type; skip type 8
									if (!bType12) bType12 = (type==12) ;
									if (!bSearchType12) {
										if (type==16) dwStartV= offs3 ;
									}
									else
										if (bType12 && (bType12First)) { dwStartV= offs3 ; bType12First= false ; }	// 									
									if (type==4) {					// skip 2, whatever it is
										dwStartVt= offs3 ; 
										bType12First= true ;			// für nächstes Submesh
										if (l<999) dwSM_WEverCnt[l]= offs ; else offs2= 0 ;		// for loop break
										if (bSearchType12&&(!bType12))
											chMB("no Vertexblock type 12 contained!") ;
										else bGetMesh= true ;		// Ausgabe des Sub-Meshes
									}
									fprintf( stream, "# Vertexblock %d: type %d after 0x%x (count: %d)\n", VBl_cnt, type, offs3, (*(pFBuf+offs3) &255)+(*(pFBuf+offs3+1) &255)*256) ;
								}
								if (bGetMesh) FindStringInBuf_SleepingDogs(dwStartV, dwStartVt, dwStartI, dwFileSize, nValue, 4, lastFaceNo, bSearchType12, xFac, yFac, zFac) ;
								//fprintf( stream, "# 0x%x\n", offs) ;
								offs += 100 ;		// 
								//fprintf( stream, "\n\n") ;
							}
						} while (offs2!=0) ;
					if (l==0) { chMB("no mesh found! Try other button.") ; return true ;}
					//lastSM = l ; cnt= 0 ;  
					return true ;
*/
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
SergeantJoe
mega-veteran
mega-veteran
Posts: 242
Joined: Fri Aug 30, 2013 5:39 am
Has thanked: 57 times
Been thanked: 20 times

Re: [Request] Sleeping Dogs Model Files

Post by SergeantJoe »

Problem is, I don't know this Mariusz fellow. Where can I find him?

Also, Cop.bin probably doesn't have any vertices since it's an animation file:
Cop_Arrest_Counter_Cuff_GIV
hkClassEnumItem
hkaAnimationBinding
hkaSplineCompressedAnimation
hkaDefaultAnimatedReferenceFrame
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4231
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1139 times
Been thanked: 2222 times

Re: [Request] Sleeping Dogs Model Files

Post by shakotay2 »

SergeantJoe wrote:Problem is, I don't know this Mariusz fellow. Where can I find him?
Marisuz is szkaradek123, one of my heroes in this forum. Last post to be found here:
viewtopic.php?f=16&t=7259&p=84226#p84226

(Really don't know why he has 49 thanks only. Should be 4900 or so. :) He solved the very difficult model formats.)
Last edited by shakotay2 on Wed Oct 30, 2013 12:47 am, edited 1 time in total.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
Post Reply