Ok, so V1.0 of the importer is released. But there's a lot of issues still, which I will go over. However, it will import about 80% of things, and I've hit a wall so I figure I will release it at this stage.
The importer is for Blender 2.70 and above, and if you need to know how to install, see my previous tutorial here:
viewtopic.php?p=103131#p103131
What the importer can do:
- Import all static meshes.
- Import all rigged meshes.
- Import Weapons.
- Import some car accessories.
What the importer can't do:
- Import base vehicles (explained below)
- Import full characters (explained below)
- Import full maps (don't even ask about this)
First Off: you need to unpack all the data, it's scattered around. So this means unpacking the following FAT/DAT files into the *same* directory:
common.fat
worlds/installpkg.fat
worlds/farcry5.fat
patch.fat
You need to do it in this order so the patch overwrites the base data. I can't tell you what you'll get if you do it in some other order, probably old/out ofdate files.
Then it's simply a matter of loading an XBG and profit.
I know most want the characters, so I'll show you a little about that:
Far Cry 5 uses a 'parts' based system, so there's no real characters, everything is made up of a collection of generic reusable parts, and unique characters just have their own set of unique parts called a 'suit'. which is applied to a generic body.
So for "Faith" for instance, her 'suit' is here: "\graphics\_common\characters\fc5\wardrobe\suit\suit_avatar_faith_aver_f.xbg"
It looks like this:
As you see the body and head are missing, and this is why I say "can't import full characters." because those are one of the generic parts, with a body/face morph applied (Body: graphics\_common\characters\fc5\wardrobe\body\_items\lieu\body_lieu003_faith_5f4_aver_f.item.bwsk") (Face: graphics\_common\characters\fc5\wardrobe\head\_facebuilder\head_lieu003_faith_aver_f.dpdx")
I have no way of doing this, writing a whole mesh morph system is way outside the realm of an importer. Maybe someone else can do this.
You can import the generic bodies/ Heads but they will not fit the clothes correctly because of the lack of morphing.
Now, about vehicles. Why can't they be imported? Well they probably can, EXCEPT for the fact their vertex storage format is a mystery. There is a Two Byte flag that determines the format of the Vertex Block bit 2 set = normal vertex storage for nearly 80% of everything. This is what everything uses. but bit 2 is NOT set for vehicles, instead bit 32768 is set. And that told me something changed. And sure enough, the data won't decode in any way I tried, Not floats, not half floats, not integers divided by a factor. Not even UVs will decode. You can try importing a vehicle, and it will complete successfully, but this is what you'll see:
So I know i have the vertex block right, and the stride right, and I know the vertex data is still X,Y,Z,W and each is 2 bytes like the normal data, but it's not decodable by any method *I* know. So if anyone can figure out how it's stored, I can add support. But I've hit the wall on figuring it out.
An example file is graphics\vehicles\land\heavy\veh_heavy_truck\veh_heavy_truck.xbg
I can tell you the simplest block of vertex data in that file starts at 0x13BB0, is 0x146 blocks long, and each block is 16 bytes long.
Each block is:
short x;
short y;
short z;
short w;
short uv1-u;
short uv1-v;
byte color-r;
byte color-g;
byte color-b;
byte color-a;
However, i just can't decode it.
Vehicle accessories, such as truck beds and tanks (like \graphics\vehicles\land\heavy\veh_heavy_truck\att_heavy_truck_tanker_fuel_tank.xbg ) are stored normally and decode fine:
(while on this subject, they often combine repaired and damaged parts as one mesh, you just select by material to separate, like the last two materials here.
Oh and finally about textures. The importer will try to find the Xbt files and convert them to DDS asd save them in the same directory as the original XBG. but it's imperfect, and Like Primal/4 these XBT files are not the top MIP, they are small (usually 256 x 256). So you'll need to find the large MIP by using a dedicated texture converter, nothing new about that. But just a reminder.
Also the Normal maps are saved in a funky channel order:
You should paste the red channel into a file and use it as specular/AO (I'm not positive but I think it's specular/metallic), and move the Alpha channel to the red channel to make it a 'regular' normal map. (and as mentioned before they are using DX10 format for the DDS files, so use an appropriate converter.
So without further ado, here you go. As always if you find problems (outside the limitations mentioned here), let me know and preferably with the name of a file as an example of the problem.
Enjoy.
Edit: latest here:
viewtopic.php?p=141959#p141959