Page 6 of 9
Re: [Request] Sleeping Dogs Model Files
Posted: Sat Nov 23, 2013 12:53 pm
by shakotay2
SergeantJoe wrote:Any news on the bones/weighting?
As you know from Mariusz' py script he's building a weightslist. But I don't know why there are four values (last two always 0.0) per vertex:
6838 0x54760L
1.0 0.0 0.0 0.0
6839 0x54768L
1.0 0.0 0.0 0.0
6840 0x54770L
1.0 0.0 0.0 0.0
6841 0x54778L
0.83137254902 0.16862745098 0.0 0.0
6842 0x54780L
0.972549019608 0.0274509803922 0.0 0.0
6843 0x54788L
1.0 0.0 0.0 0.0
6844 0x54790L
0.564705882353 0.435294117647 0.0 0.0
6845 0x54798L
0.741176470588 0.258823529412 0.0 0.0
6846 0x547a0L
0.572549019608 0.427450980392 0.0 0.0
6847 0x547a8L
0.733333333333 0.266666666667 0.0 0.0
6848 0x547b0L
0.623529411765 0.376470588235 0.0 0.0
6849 0x547b8L
0.83137254902 0.16862745098 0.0 0.0
6850 0x547c0L
1.0 0.0 0.0 0.0
6851 0x547c8L
1.0 0.0 0.0 0.0
6852 0x547d0L
0.980392156863 0.0196078431373 0.0 0.0
6853 0x547d8L
0.980392156863 0.0196078431373 0.0 0.0
6854 0x547e0L
0.611764705882 0.388235294118 0.0 0.0
6855 0x547e8L
0.839215686275 0.160784313725 0.0 0.0
6856 0x547f0L
0.729411764706 0.270588235294 0.0 0.0
6857 0x547f8L
0.866666666667 0.133333333333 0.0 0.0
6858 0x54800L
0.725490196078 0.274509803922 0.0 0.0
6859 0x54808L
1.0 0.0 0.0 0.0
6860 0x54810L
Maybe you simply try out the first one?
(You used a custom skeleton, did you? How did you calculate the weights? Or did you take the ones of an other game's model?)
It's just a regular .perm.bin model file, but it contains over a hundred submeshes!
didn't expect more than 20, yep. These are the two biggest, uvs completely missing:

Re: [Request] Sleeping Dogs Model Files
Posted: Sat Nov 23, 2013 8:48 pm
by SergeantJoe
shakotay2 wrote:Maybe you simply try out the first one?
How exactly? I don't know ANYTHING about programming, at least not yet. The only thing I know how to do is use the Weight Paint tool in Blender. And even then,
I suck at it.
shakotay2 wrote:didn't expect more than 20, yep. These are the two biggest, uvs completely missing:

That looks like the skybox! Don't know what that giant sphere is though.
Re: [Request] Sleeping Dogs Model Files
Posted: Sat Nov 23, 2013 11:18 pm
by shakotay2
you didn't answer my question concerning the skeleton. And I don't have an idea whether you started with a weight of 1.0 on all of the vertices for example.
ok, anyway, we have the amanda skeleton as an xml and some wild guesses about the weighting.
I didn't find a simple way to import the xml into 3dsmax.
Before it comes to skinning you'll need a properly rigged character.
Atm I don't see any easy solution for the skinning of Sleeping Dogs models.
Re: [Request] Sleeping Dogs Model Files
Posted: Sat Nov 23, 2013 11:57 pm
by SergeantJoe
shakotay2 wrote:you didn't answer my question concerning the skeleton. And I don't have an idea whether you started with a weight of 1.0 on all of the vertices for example.
Oh, yeah, I'm using a Source Engine skeleton. And I think that may be my problem, I'm not really adjusting any of the values. I need to learn how to do that.
Re: [Request] Sleeping Dogs Model Files
Posted: Sun Nov 24, 2013 7:37 am
by shakotay2
It's about 5 years ago I read a fantastic 3dsmax (3dsmax 2009 ?) tutorial about copying the skinning from one model to a similar one.
Sadly I don't find it any more on my drives nor I had a google hit
because I'm not even sure whether they used the Skin Utility.
What I remember is that the models have to be very similar. Nearly same vertex count for example.
Also there were three (mercenary?) models in the viewport.
Re: [Request] Sleeping Dogs Model Files
Posted: Sun Nov 24, 2013 8:40 am
by SergeantJoe
Hmm, I don't know if that's going to help me much. SD models t-pose is different than most games, and I'm too incompetent to move the vertices into the correct positions.
I've even tried bribing people to do the rigging, but it seems that truly nobody cares about models from this game except for you and me.
Re: [Request] Sleeping Dogs Model Files
Posted: Sun Nov 24, 2013 10:44 pm
by shakotay2
SergeantJoe wrote:[...], and I'm too incompetent to move the vertices into the correct positions.
I'm pretty sure you could learn it with little efforts.
For me I'm circulating through 4 .. 5 projects of mine (just releaxing in a forum like this one)
and have little time to focus on rigging/skinning. Thinking if you want to do it in a decent manner
you'll have to spend at least 4 weeks to learn the basics only.
BUT I found this 6 year old project on my hard disk:
http://www.mit.edu/~ibaran/autorig/index.html
http://www.mit.edu/~ibaran/autorig/pinocchio.html
Maybe it has improved meanwhile.
So far I tested the rigging only:

Maybe more to come...
edit: ah, well, this is what Ilya Baran wrote:
Using your own motion data
The short answer is that unfortunately, with DemoUI, you can't. The package comes with several sequences that DemoUI can read, but my skeleton is hard-coded in the code and the format is non-standard. If you would like to animate meshes rigged by Pinocchio with your own motions, you have to write your own front end. If you don't care about skeleton embedding, but only skinning weights, Blender's "Bone Heat" and the PM_heatWeight plugin for Maya are implementations of my algorithm
edit2: well, the walking is a little bit curious (the walking data is for another mesh I think):

(Think I will weld Jackie and give it another try...)
edit 3: oops, even with a welding threshold of 0.05 Jackie's getting crunchy fingers. Too bad.
Also DemoUI needs "a single connected component". I used the main submesh only so don't know what this means exactly.
All I know that in
Mesh::integrityCheck() edges
.twin is -1 (0xFFFFFFFF)
Seems you'll have to "prepare" your mesh before it can be autoweighted.
edit4: when comparing Jackie's fingers to the ones of the test sample things are becoming clearer...

Re: [Request] Sleeping Dogs Model Files
Posted: Sat Nov 30, 2013 3:56 am
by SergeantJoe
Since bones were a bust, what about the buildings?
I really hate to keep bothering you, but it's best to get as much done as possible right now. Once you're finished there's nobody else to work on this.
Re: [Request] Sleeping Dogs Model Files
Posted: Sat Nov 30, 2013 7:17 am
by shakotay2
SergeantJoe wrote:Since bones were a bust, what about the buildings?
The uvs, forgot them?
Did you try Mariusz' script on the buildings?
(I'm working on dozens of models but some guys seem to expect me remembering every aspect of them
even after 3 weeks.

So sorry, case that suggestion is a "known fail".)
Re: [Request] Sleeping Dogs Model Files
Posted: Sat Nov 30, 2013 8:10 am
by SergeantJoe
shakotay2 wrote:Did you try Mariusz' script on the buildings?
Oh yeah, I completely forgot about that.
Well, it works, but all the UVs are broken. You're right, the UVs are the most problematic part of this game. Even Direct X ripping programs can't figure them out.
Also, I just noticed something: that script supports weighting. Could I theoretically attach those weight groups to a custom skeleton?
EDIT:
Yeah, look at that! If someone could figure out how to convert that xml we could get full bones and weighting!
But like I said, I know that you're doing this out of good will and on your own free time, so I don't want to press you.
In the meantime I can use my custom skeleton. It'll take a lot of shuffling and renaming, but it's possible!
Re: [Request] Sleeping Dogs Model Files
Posted: Sat Nov 30, 2013 1:35 pm
by shakotay2
SergeantJoe wrote:Also, I just noticed something: that script supports weighting.
Did I miss something? (You didn't read my first post of Nov. 23th, did you?)
Re: [Request] Sleeping Dogs Model Files
Posted: Sat Nov 30, 2013 7:35 pm
by SergeantJoe
I did, but at the time I thought you were referring to something else. I'm really angry at myself now, I should've made that connection sooner.
This is almost as bad as the time I thought the extractor wasn't working when I just wan't pressing the Go button. Ugh.
Re: [Request] Sleeping Dogs Model Files
Posted: Sun Dec 01, 2013 3:54 am
by SergeantJoe
So I tacked the weights onto the skeleton,
and the end result isn't half bad.
So, I suppose that's it then. We can take out HD textures, and models with rigging.
Of course we still need the original skeleton for vehicles and faces, but other than that and the building UVs there's really not much else. Well, there's also animations, but that's a bit extreme.
Re: [Request] Sleeping Dogs Model Files
Posted: Sun Dec 01, 2013 10:11 am
by shakotay2
Very fine!
How about sharing the result as a small tutorial: "How to apply weights on a sleeping dogs character model"?
Then I could try to assign the original skeleton.
Re: [Request] Sleeping Dogs Model Files
Posted: Sun Dec 01, 2013 10:36 am
by SergeantJoe
Well, I'm using a custom skeleton, so I had to rename all the vertex groups for it to work.
Theoretically if you had the original skeleton you can just assign it to the model via the Armature modifier and the vertex groups will be automatically applied.