Far Cry Primal models

Post questions about game models here, or help out others!
daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1766
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 38 times
Been thanked: 1212 times

Re: Far Cry Primal models

Post by daemon1 » Fri Jan 20, 2017 8:39 pm

You don't have to look into code if animation is using normal floats. Its only required if some crazy non-standard types are used. Like variable bit integers or quaternions packed with special math.

User avatar
volfin
ultra-veteran
ultra-veteran
Posts: 417
Joined: Sun Jul 06, 2014 6:30 am
Has thanked: 100 times
Been thanked: 260 times

Re: Far Cry Primal models

Post by volfin » Fri Jan 20, 2017 11:02 pm

ok, Importer is complete.

Image

Imports all mesh, with original scale, original skeleton, original weights, and UVs. Also option to import vertex colors if desired.
After trying quite a few models, as you see above, there doesn't seem to be textures for the 'hair'. I suspect because it's generated on the GPU. those are just guide vertices. They do have UVs though, so perhaps there are 'hair' texture hiding somewhere. If someone finds them, please let me know. Oh yeah and Eye textures seem missing too.

Image
Completely posable and animatable. :bleh:

There's some room for improvement, such as above the 'back hair' is a separate mesh, and when imported it brings in a second copy of the armature, instead of using the existing. I may try to make it a bit smarter. But otherwise seems working well.

The importer is for Blender 2.63 and above, and if you need to know how to install, see my previous tutorial here:
viewtopic.php?p=103131#p103131

Enjoy.
Last edited by volfin on Sat Jan 21, 2017 7:01 pm, edited 1 time in total.

TheMask85
advanced
Posts: 76
Joined: Sun May 19, 2013 12:55 am
Has thanked: 79 times
Been thanked: 2 times

Re: Far Cry Primal models

Post by TheMask85 » Fri Jan 20, 2017 11:50 pm

daemon1 wrote:ok this is first test. This tool (with dictionary) will unpack all compressed files from fat/dat pairs. Dictionary includes all names for primal_main. Other files will be extracted names as hashes.

https://mega.nz/#!YY5UgagB!waUFhD03EACg ... heZ6HN63ds

That means uncompressed files (and there are many of them) will not be extracted for now. They are all tiny, no more than 1k in size.
are you planning to enhance support for you extractor in the future? so far it works pretty well for a lot of files, though most of them (as you mentioned) aren't working.
good work so far and thank you for the unpacker!

bouvrie
advanced
Posts: 52
Joined: Sat Mar 18, 2006 5:29 pm
Has thanked: 13 times
Been thanked: 1 time

Re: Far Cry Primal models

Post by bouvrie » Sat Jan 21, 2017 1:27 am

volfin wrote:I saw someone worked out the Metal Gear Solid V animations recently (first time in years I've seen It done I might add.)
Haha, reminds me of https://www.youtube.com/watch?v=Sl9H6iexJWI . Without ripping Norman Reedus' model from a reverse engineered demo sample, this wouldn't have been possible. It's almost an art form. ;)
volfin wrote:For a long time games were using Havok for animation, so they were stored in HKX files, which were nearly impossible to figure out (nearly).
AFAIK, Far Cry games use hkx along with xbg and xbt files. But now you're saying the game doesn't use them for the animation then? Or did you manage to reverse those?

User avatar
volfin
ultra-veteran
ultra-veteran
Posts: 417
Joined: Sun Jul 06, 2014 6:30 am
Has thanked: 100 times
Been thanked: 260 times

Re: Far Cry Primal models

Post by volfin » Sat Jan 21, 2017 3:05 am

bouvrie wrote:
volfin wrote:I saw someone worked out the Metal Gear Solid V animations recently (first time in years I've seen It done I might add.)
Haha, reminds me of https://www.youtube.com/watch?v=Sl9H6iexJWI . Without ripping Norman Reedus' model from a reverse engineered demo sample, this wouldn't have been possible. It's almost an art form. ;)
LOL, that's hilarious.
bouvrie wrote:
volfin wrote:For a long time games were using Havok for animation, so they were stored in HKX files, which were nearly impossible to figure out (nearly).
AFAIK, Far Cry games use hkx along with xbg and xbt files. But now you're saying the game doesn't use them for the animation then? Or did you manage to reverse those?
I've noticed it does use HKX. There's other games that don't lately, was just speaking in general. I started a project to reverse the HKX format, years ago, but never finished it. It's my curse, always moving on to new projects, even if some don't get finished. :lol:

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1766
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 38 times
Been thanked: 1212 times

Re: Far Cry Primal models

Post by daemon1 » Sat Jan 21, 2017 8:03 am

volfin wrote:I've noticed it does use HKX.
From the first look, HKX is only used for physics, but animation system is their own.

TheMask85
advanced
Posts: 76
Joined: Sun May 19, 2013 12:55 am
Has thanked: 79 times
Been thanked: 2 times

Re: Far Cry Primal models

Post by TheMask85 » Sat Jan 21, 2017 8:18 am

TheMask85 wrote: are you planning to enhance support for you extractor in the future? so far it works pretty well for a lot of files, though most of them (as you mentioned) aren't working.
good work so far and thank you for the unpacker!
okay, that's strange. apparently you need to have each .dat + its belonging .fat file in seperate folders, otherwise the unpacker will crash after trying to extract more than 2 or 3 files.

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1766
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 38 times
Been thanked: 1212 times

Re: Far Cry Primal models

Post by daemon1 » Sat Jan 21, 2017 8:55 am

yes i plan to support more files. And also repacker. What do you mean under "in seperate folders" ? What do you need to separate? It works on my side.

TheMask85
advanced
Posts: 76
Joined: Sun May 19, 2013 12:55 am
Has thanked: 79 times
Been thanked: 2 times

Re: Far Cry Primal models

Post by TheMask85 » Sat Jan 21, 2017 9:08 am

what i did first was grabbing all .dat+.fat files and threw them into a "working folder" for extraction. (since i don't like messing in its original install path), than drag and dropped .fat files onto the fcp_unpack.exe. worked for "common.fat" and also for "installpkg.fat" but all the other files then refused to unpack (fcp_unpack.exe just crashed with all the other files).
but as soon as you have common.dat+.fat in its own single folder, primal_main.dat+fat in its own folder, etc., it will exract all the packages just fine.
after export i threw them all in one single big folder and the game seems now to be fully extracted.

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1766
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 38 times
Been thanked: 1212 times

Re: Far Cry Primal models

Post by daemon1 » Sat Jan 21, 2017 9:29 am

It can be that with all subfolders the name is too long, so tool crashes on some file. So if your "separate" folder name is shorter, it works and then, when you move them, windows automatically cuts the names at some point.

TheMask85
advanced
Posts: 76
Joined: Sun May 19, 2013 12:55 am
Has thanked: 79 times
Been thanked: 2 times

Re: Far Cry Primal models

Post by TheMask85 » Sat Jan 21, 2017 10:05 am

volfin wrote:ok, Importer is complete.
may i post a little bug report here? it'd be cool, if you could fix these things.

- faces of the meshes are inverted
- vertex normals seem to be missing
- Uv's are "cut" onto the mesh. for example, where there's one single UV for the skin part of the body, there's more than one selection on the mesh, causing nasty vertex normals seams on the mesh (untill smoothed out in a 3d application manually)
- bone rotations and positions are off. for example (using the great "Urki" model as a reference), the bones are on positions of their parents. means: "RightShoulder" is on position of "Spine2", "RightArm" is on poition of "RightShoulder", "RightForeArm" is on position of "RightArm" and so on.
- material names/paths are missing

i know vertex normals can be hard to implement but it'd be amazing if you could tackle the bone rotations/positions and the flipped faces. otherwise it's one useful importer. thank you!!

User avatar
SoldierTODD
beginner
Posts: 31
Joined: Fri Oct 24, 2014 10:15 pm
Has thanked: 6 times

Re: Far Cry Primal models

Post by SoldierTODD » Sat Jan 21, 2017 1:36 pm

ok, Importer is complete.
Enjoy.
No animation importer has not been completed. :[

User avatar
volfin
ultra-veteran
ultra-veteran
Posts: 417
Joined: Sun Jul 06, 2014 6:30 am
Has thanked: 100 times
Been thanked: 260 times

Re: Far Cry Primal models

Post by volfin » Sat Jan 21, 2017 5:44 pm

SoldierTODD wrote:
ok, Importer is complete.
Enjoy.
No animation importer has not been completed. :[
Sorry but as I said, I'm not going to do that. This isn't some Dictarorship. I donate my time freely, and you get what I decide to give.
TheMask85 wrote: may i post a little bug report here? it'd be cool, if you could fix these things
*LIST*
hehe, I knew when I used the term 'complete', I would regret it. I should have said 'functional'. It's still rough around the edges I know. I'll resolve what I can, Normals I can probably say won't happen. I'm still trying to find a way to reliably get Blender to accept those (it hates them). And auto-materials is a big ask, don't expect that either. I didn't notice any problems with the skeleton, at least on the Chicken/Tiger/Mammoth and other animals I tried. I'll have to find that specific model and see what you mean. flipped faces should be an easy fix. Seams is how the data is stored, can't do anything about that. you just need to join the parts, and remove duplicate vertices, it's simple mesh editing.

TheMask85
advanced
Posts: 76
Joined: Sun May 19, 2013 12:55 am
Has thanked: 79 times
Been thanked: 2 times

Re: Far Cry Primal models

Post by TheMask85 » Sat Jan 21, 2017 6:44 pm

it's cool. you pointed out already, it yet has some flaws. totally fine with me.
volfin wrote:I didn't notice any problems with the skeleton, at least on the Chicken/Tiger/Mammoth and other animals I tried.
as it seems, this problem goes for all models. yes, the bone structure is there, however the position and bone rotations for all joints is unfortunately incorrect.
you can also check on the sabertooth for example. as a test, just rotate "LeftForeArm" for example, or better yet "LeftHand" and you will see what i mean.

User avatar
volfin
ultra-veteran
ultra-veteran
Posts: 417
Joined: Sun Jul 06, 2014 6:30 am
Has thanked: 100 times
Been thanked: 260 times

Re: Far Cry Primal models

Post by volfin » Sat Jan 21, 2017 6:54 pm

TheMask85 wrote:may i post a little bug report here? it'd be cool, if you could fix these things.
Ok here's the status:
- faces of the meshes are inverted * Fixed *
- vertex normals seem to be missing * no fix at this time *
- Uv's are "cut" onto the mesh. * how models are stored, no fix *
- bone rotations and positions are off. * Checked, no issues *
- material names/paths are missing * no fix at this time *

About the skeleton. I see no issues with rotation or with naming. To specifically point out what you mentioned:

You may not like Ubisoft's names for things, but they are what they should be. I only do it how Ubisoft defines it.

All bones are in rest position, and match up to rest pose of the mesh.

If you're seeing something different than shown here, please give more info, such as model, what version of blender you use, and any other information that can help me figure it out. otherwise I have to assume all is well. :)

as stated on the list, Normals, and material paths, i'll continue to look into. I may have something down the road. :)

Edit: newer version below.
Last edited by volfin on Sun Jan 22, 2017 5:01 am, edited 1 time in total.

Post Reply