Important information: this site is currently scheduled to go offline indefinitely by end of the year.

Watch Dogs XBG models

Post questions about game models here, or help out others!
User avatar
Wobble
ultra-veteran
ultra-veteran
Posts: 584
Joined: Tue Jan 04, 2005 9:47 pm
Has thanked: 43 times
Been thanked: 112 times

Re: Watch Dogs XBG models

Post by Wobble »

[out]
Last edited by Wobble on Sat Mar 11, 2017 1:10 pm, edited 1 time in total.
User avatar
Wobble
ultra-veteran
ultra-veteran
Posts: 584
Joined: Tue Jan 04, 2005 9:47 pm
Has thanked: 43 times
Been thanked: 112 times

Re: Watch Dogs XBG models

Post by Wobble »

[out]
Last edited by Wobble on Sat Mar 11, 2017 1:10 pm, edited 1 time in total.
User avatar
cra0
ultra-veteran
ultra-veteran
Posts: 438
Joined: Fri Apr 27, 2012 9:37 am
Has thanked: 29 times
Been thanked: 189 times
Contact:

Re: Watch Dogs XBG models

Post by cra0 »

Wobble wrote:
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.
Since he hasn't posted any information about it, I can't assume he figured out how WatchDog animation works.

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.
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 scale
User avatar
Wobble
ultra-veteran
ultra-veteran
Posts: 584
Joined: Tue Jan 04, 2005 9:47 pm
Has thanked: 43 times
Been thanked: 112 times

Re: Watch Dogs XBG models

Post by Wobble »

[out]
Last edited by Wobble on Sat Mar 11, 2017 1:10 pm, edited 1 time in total.
User avatar
Wobble
ultra-veteran
ultra-veteran
Posts: 584
Joined: Tue Jan 04, 2005 9:47 pm
Has thanked: 43 times
Been thanked: 112 times

Re: Watch Dogs XBG models

Post by Wobble »

[out]
Last edited by Wobble on Sat Mar 11, 2017 1:10 pm, edited 1 time in total.
User avatar
cra0
ultra-veteran
ultra-veteran
Posts: 438
Joined: Fri Apr 27, 2012 9:37 am
Has thanked: 29 times
Been thanked: 189 times
Contact:

Re: Watch Dogs XBG models

Post by cra0 »

Wobble 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:

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)
Actually, I think WORDs #7 and #8 can contain either UV offset/scaling or a 2nd UVset.
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];
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 look
User avatar
Wobble
ultra-veteran
ultra-veteran
Posts: 584
Joined: Tue Jan 04, 2005 9:47 pm
Has thanked: 43 times
Been thanked: 112 times

Re: Watch Dogs XBG models

Post by Wobble »

[out]
Last edited by Wobble on Sat Mar 11, 2017 1:10 pm, edited 1 time in total.
User avatar
cra0
ultra-veteran
ultra-veteran
Posts: 438
Joined: Fri Apr 27, 2012 9:37 am
Has thanked: 29 times
Been thanked: 189 times
Contact:

Re: Watch Dogs XBG models

Post by cra0 »

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.


For stride 44 theres a blank unknown if i can recall but yeah thats the basic format if only I was home and the game was dx9 could easily get the bit values using Microsoft PIX
//POS
//UV
//UV2
//BoneWeights
//BoneIndices
//blankUnknown
//Vertex normal
//Vertex col
//Bi-Normal
//Tangents
User avatar
Wobble
ultra-veteran
ultra-veteran
Posts: 584
Joined: Tue Jan 04, 2005 9:47 pm
Has thanked: 43 times
Been thanked: 112 times

Re: Watch Dogs XBG models

Post by Wobble »

[out]
Last edited by Wobble on Sat Mar 11, 2017 1:11 pm, edited 3 times in total.
User avatar
HeliosAI
mega-veteran
mega-veteran
Posts: 166
Joined: Wed Nov 17, 2010 2:57 pm
Has thanked: 151 times
Been thanked: 62 times

Re: Watch Dogs XBG models

Post by HeliosAI »

Well i can answer this easy cause i posted that model (you should remove the link btw since it's against the rules to provide links to any model files in public =) )

I didn't rip any shaders actually... i only saved some screenshots from the game and tried to adjust the colors on the textures in Photoshop so that they look like ingame. The tangent space maps are already in the game files and you just need to swap some channels around to get them in their usual purple form (they are originally orange because one of the channels is stored in the alpha)
Tbh it is quite some work to set the materials properly because the game uses a lot of shared textures which need the color adjustments and also detail normal maps, which is what gives the pattern on the shirt for eg. I suppose with good mask maps and such you can also set materials without altering texture colors in any other good 3d app but i personally find coloring textures directly way easier.
User avatar
Wobble
ultra-veteran
ultra-veteran
Posts: 584
Joined: Tue Jan 04, 2005 9:47 pm
Has thanked: 43 times
Been thanked: 112 times

Re: Watch Dogs XBG models

Post by Wobble »

[out]
Last edited by Wobble on Sat Mar 11, 2017 1:11 pm, edited 1 time in total.
User avatar
HeliosAI
mega-veteran
mega-veteran
Posts: 166
Joined: Wed Nov 17, 2010 2:57 pm
Has thanked: 151 times
Been thanked: 62 times

Re: Watch Dogs XBG models

Post by HeliosAI »

Yeah it's basically just trying to get close to a screenshot xD

I think it should be okay^^ I'm just not so sure anymore because the rule updates for the forum are really strict about everything. The link should be okay now tho =)
huckleberrypie
ultra-veteran
ultra-veteran
Posts: 351
Joined: Mon Apr 26, 2010 6:51 am
Has thanked: 105 times
Been thanked: 15 times

Re: Watch Dogs XBG models

Post by huckleberrypie »

Any updates on this?
User avatar
cra0
ultra-veteran
ultra-veteran
Posts: 438
Joined: Fri Apr 27, 2012 9:37 am
Has thanked: 29 times
Been thanked: 189 times
Contact:

Re: Watch Dogs XBG models

Post by cra0 »

huckleberrypie wrote:Any updates on this?
I'm back from vacation will resume work soon
Oleg
beginner
Posts: 27
Joined: Mon Feb 14, 2011 1:31 pm
Been thanked: 6 times
Contact:

Re: Watch Dogs XBG models

Post by Oleg »

I personally have to skip the research of character models as these usually contain "extra skinning' mode with 6 bones weights. my software does not support 6 bones weights and even worse, limited to 255 bone indices only :(. So, until I make considerations and upgrade to directx11 (by abandoning support of win XP), I'm pinned to vehicle models only.

I'm very unsure about dual UV layers yet, as I've pre-configured just few shaders for my software that vehicle uses (DriverGeneric. DriverCarGeneric, DriverCarPaint), and in most of cases only one uv channel is used there. I can say the uv scaling is both in a model file (xbg) and in material file for each material. you've seen it in "materialdescriptors" I guess as "NormalUVTiling", "DetailUVTiling" or something like that. the per-model uv scaling gives a "decompression" scaling for UV for entire model, while material UV scaling (tiling) configures scale on per-material level.

here's the muscle/muscle_03.xbg i'm working with:
Image


and the same vehicle with dust/scratch/damage applied:
Image


unfortunately, the xbg model is tightly connected with havok physical model file. Literally, each vertex has bind reference to affecting physical model. I haven't made any physics-file research to the moment, but this might certainly be a serious problem on putting models back to game.

P.S. I'll check the character model and port character materials to inspect the "color" issue you've talked about. may be I could find something on this particular case.
Post Reply