Re: Watch Dogs XBG models
Posted: Wed Jul 02, 2014 3:17 am
[out]
I'm currently on vacation I'll post research/info when im back home but yes your right that animation isn't from watch dogs I simply applied it to the skeleton to test the skinning and bone weights. As for the material bin files yeah the shader controls the color and such xbgs have shader indices inside too which reference shader parameters. Have you figured out UV scaling yet? Last I checked I couldn't find anything in the xbg which defined the scaleWobble wrote:Since he hasn't posted any information about it, I can't assume he figured out how WatchDog animation works.huckleberrypie wrote:Afaik cra0's working on it, as shown in his video where he managed to load up what appears to be Aiden being rigged and animated.
Once you get a model rigged, it would be easy to remap the skeleton to your own custom animation.
So, is it really WatchDog animation or something else? Who knows. Maybe post some info about the MAB format.
That would shed some light.
Well I have no research on me (typing this from my phone)currently however the vertex structures for now im parsing with a giant select switch and size 36 and 40 seems to be dynamic (like normals are swapped with the vertex color. ) But yeah I think your right the drawcall table or vertex descriptor which describes what VBO,iBO and material file for set drawcall or primative mesh piece must somehow state what values are contained in the vertex structure being some FVF flags or something else. What interested me is bits.fx in the shader source code it proves that theres some bit flags in there, once again when im back home ill take another lookWobble wrote:I think I found the UV scaling, but I haven't figured out how it works yet.
For some parts, it's turned on. For other parts, it's turned off, as those same fields contain data
that would mess up the UVs. I'm guessing the vertex format flags control it, but I've found some
cases where that fails too.
Compare bike_01.xbg and speed_01.xbg. They have the same format flags (0x07CA, 0x17CA, 0x91CA),
but speed_01.xbg needs to be scaled, while bike_01.xbg does not.
The interesting bits are right next to the UVs:
Actually, I think WORDs #7 and #8 can contain either UV offset/scaling or a 2nd UVset.Code: Select all
Vertex Format ============= WORD position[4]; WORD uvs[2]; WORD uv_offset; WORD uv_scale; BYTE bone_weights[4]; // sum to 255 BYTE bone_indices[4]; WORD unk[4]; Dump: [ 0]: (02EA, 06F4, 6D71, 0001) (2A34, 1AF3, 8000, 2AAA) (250, 5, 0, 0) ( 6, 9, 0, 0) (DECF, C762, A3A3, FDA3) [ 1]: (02E2, 06F0, 6D78, 0001) (2A34, 15FC, 8000, 2AAA) (250, 5, 0, 0) ( 6, 9, 0, 0) (CD4F, C728, A3A3, FDA3) [ 2]: (02E3, 06EE, 6D73, 0001) (2873, 15FC, 8000, 2AAA) (229, 26, 0, 0) ( 6, 10, 9, 0) (E09D, C732, A3A3, FDA3) [ 3]: (02E5, 06FA, 6D6B, 0001) (27D2, 1B54, 8000, 2AAA) (229, 26, 0, 0) ( 6, 10, 9, 0) (D7DB, C789, A3A3, FDA3) [ 4]: (02EF, 06F9, 6D67, 0001) (2A34, 1FEB, 8000, 2AAA) (250, 5, 0, 0) ( 6, 9, 0, 0) (DEBB, C7BC, A3A3, FDA3) [ 5]: (02EB, 0701, 6D60, 0001) (26FB, 1FEB, 8000, 2AAA) (229, 26, 0, 0) ( 6, 10, 9, 0) (DBB4, C7C7, A3A3, FDA3) ... 0x8000 = 16383 / 32768 = 0.5 (offset) 0x2AAA = 16383 / 10922 = 1.5 (scale)
The vertex format flags may tell you what type of data is stored here, but that is only a guess.Code: Select all
Vertex Format (Alternate) ============= WORD position[4]; WORD uvset1[2]; WORD uvset2[2]; // either uvset2 or uv offset/scaling BYTE bone_weights[4]; // sum to 255 BYTE bone_indices[4]; WORD unk[4];
Wobble wrote:I found the vertex format here:
vertexdeclaration.inc.fx
VERTEX_DECL_POSITIONCOMPRESSED
VERTEX_DECL_POSITIONFLOAT
VERTEX_DECL_UV0
VERTEX_DECL_UV1
...
They don't say what the actual bits are for each flag, but just looking at the order of things gives
a basic layout of the format:
position | uv0 | uv1 | blend_weights | blend_indices | normal | color | tangent | binormal | ...
Perhaps these flags are defined in an XBOX or PS3 SDK that is only available to Developers.
I'm back from vacation will resume work soonhuckleberrypie wrote:Any updates on this?

