XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Tue Oct 24, 2017 12:39 pm

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 123 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next
Author Message
 Post subject: Re: Far Cry Primal models
PostPosted: Mon Jan 23, 2017 6:07 pm 
Offline
double-veteran
double-veteran

Joined: Tue Mar 24, 2015 8:12 pm
Posts: 1209
Has thanked: 20 times
Have thanks: 574 times














You can make the ads go away by registering

bouvrie wrote:
So, this means you have only the modified texture in a BRAND NEW sound_patch file?

Yes


Top
 Profile  
 
 Post subject: Re: Far Cry Primal models
PostPosted: Mon Jan 23, 2017 9:15 pm 
Offline
double-veteran
double-veteran

Joined: Tue Mar 24, 2015 8:12 pm
Posts: 1209
Has thanked: 20 times
Have thanks: 574 times
Packer. Place it where you have extracted files and run. Will only work with named files now. "Unknown" support later.


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.



Top
 Profile  
 
 Post subject: Re: Far Cry Primal models
PostPosted: Tue Jan 24, 2017 6:20 am 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Sun Jul 06, 2014 6:30 am
Posts: 344
Has thanked: 73 times
Have thanks: 219 times
Ok, game normal and auto texture assignment are done. But a lot of caveats of course!

First Normals:

Image
You remember my earlier pics, the tiger looked all cut up. well it still is. but since normal are now assigned, the cuts appear healed. This is the only proof I have that i'm importing normal correctly, since I have no way to know what they should be. But every other method appeared a mess, so I'll assume this is right.

They look imperfect in places:
Image
But I have no way to know if this is just a flaw from the devs, or what. So that's all I can say on that. :)

Now, auto texture. It works, but with a lot of conditions. Firstly, the model file must be opened from it's original folder it was extracted to. And the contents of the _materials folder must also be in it's original location. And the xbt textures must also be in their original locations as well. The importer will convert the xbt files to dds if not already converted. but if you already have the DDS there, it will use those instead.

when you load you'll get this automatically if those conditions are met:
Image
As mentioned, you need to add lights to the scene to see the textures. You also have to switch it to "Material" display mode at the bottom. You can find the texture names and locations in the Texture pane on the right.

Now, you see this really crazy glitch on the model. This is because, the normal maps as stored in the game are not normal (LOL a joke :lol: )
They have their layers all mixed up. so you have to edit it in your favorite texture editor. (mine is photoshop)

Image
First you'll notice the image has alpha, so if you're using Intel Textureworks, you have to use a handy Transparency to Alpha action to convert it to an alpha layer. Now you can see what is going on:
Image
They put the R and G channels of the Normal map into Alpha and G.

Channel B should be white, instead it's has what may be the actual specular map, I'm not sure really:
Image

Channel R has a different map, PBR metalness maybe? (that splotch on the neck, that's why the normal seemed off)
Image

Ok, so basically, you need to fill channel B with white (255), and move Alpha channel to R channel. Do your magic as you please.
Then you'll have a proper normal map:
Image

Save it to disk as DDS (if using Intel Textureworks, save as Color/ BC1, Blender doesn't read DX10 formats), and reload the model in blender (it will use your custom DDS this time.)

no more odd splotch:
Image
(yes it's a chrome chicken, you can adjust the specular of course, I just use defaults :mrgreen: )

I would probably recommend dumping the contents of the HD texture archive into the Main archive directory, so highest rez textures are used. But there are still a number of missing textures and given the "*.material.bin" files are 1k to 2k in size, I can't say with certainty they were all extracted.
If anything is missing, it will simply skip the step for that item. I hope the unpacker is eventually updated to extract everything.

Enjoy.

Edit: new version Below.


Last edited by volfin on Tue Jan 24, 2017 10:44 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Far Cry Primal models
PostPosted: Tue Jan 24, 2017 10:24 am 
Offline
advanced

Joined: Sun May 19, 2013 12:55 am
Posts: 68
Has thanked: 66 times
Have thanks: 1 time
hmm, that's strange. the new plugin version is causing an error on import. :(
with and without a light in the scene.

https://picload.org/image/roagclrw/blender_error.jpg


Top
 Profile  
 
 Post subject: Re: Far Cry Primal models
PostPosted: Tue Jan 24, 2017 6:51 pm 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Sun Jul 06, 2014 6:30 am
Posts: 344
Has thanked: 73 times
Have thanks: 219 times
TheMask85 wrote:
hmm, that's strange. the new plugin version is causing an error on import. :(
with and without a light in the scene.

https://picload.org/image/roagclrw/blender_error.jpg


it is strange, since that line changes the context to Object, which is a command that should work in any context. :mrgreen: So it saying 'wrong context' makes no sense at all. I'd recommend deleting the whole plugin folder and re-installing the plugin.

C:\Users\Mask\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\io_scene_FCP directory is the one to delete.

Barring that fixing it, i'd then have to say something is wrong with your copy of blender. I tested on 2.77 and 2.78, and works fine on both.


Top
 Profile  
 
 Post subject: Re: Far Cry Primal models
PostPosted: Tue Jan 24, 2017 7:28 pm 
Offline
advanced

Joined: Sun May 19, 2013 12:55 am
Posts: 68
Has thanked: 66 times
Have thanks: 1 time
man, i hate to be that guy ... but ... :(

- if i change anything of the "new scene" (like deleting the cube for example), the importer will spit out an error and won't let me import a mesh
- the skeleton is off now
and the vertex normals are weirdly rotated. means - if you look at the mesh from the front, it will look fine but as soon as you change the camera you can see the lighting is off due to "weirdly rotated normals". see how the arms are rather dark while the front of the body is correct?

Image

i re-installed blender (and deleted remaining folders), just to be sure - so it's a brand new installation with nothing changed in the app itself.
sorry for the trouble.


Top
 Profile  
 
 Post subject: Re: Far Cry Primal models
PostPosted: Tue Jan 24, 2017 9:25 pm 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Sun Jul 06, 2014 6:30 am
Posts: 344
Has thanked: 73 times
Have thanks: 219 times
Ok so you put in a cube then delete it. That's an important detail you didn't mention the first time. Now I can reproduce.

Also it seems the skeleton problem is only with that particular model. So i'll have to see why it's special. Stay tuned.

As for Normals, as I stated, I have no way to know what is 'right' or not. They appear smooth across edge breaks, which is the only indication I have they are 'right'. I can't say anything else beyond that. there is no original sample from the studio for me to compare against, nor a manual to tell me their encoding method. All of this stuff is guess work. It's the best I can do. It may be correct (because many studios do bake in artificial normal directions to simulate lighting effects), or it may not. I simply have absolutely no way to know one way or the other. (and this is why generally I do not import game normal, it's a complete crapshoot). From my best knowledge and observations, it appears they are right.

This is what completely mis-interpreted normal looks like:
Image

So you see the difference. The fact it's actually smooth is the one case of order out of chaos. And laws of entropy say, order never happens by chance.


Top
 Profile  
 
 Post subject: Re: Far Cry Primal models
PostPosted: Tue Jan 24, 2017 9:39 pm 
Offline
advanced

Joined: Sun May 19, 2013 12:55 am
Posts: 68
Has thanked: 66 times
Have thanks: 1 time
volfin wrote:
Ok so you put in a cube then delete it. That's an important detail you didn't mention the first time. Now I can reproduce.


no i'm talking about the "startup scene". there's a light, a camera and a cube. and as soon as i change anything there (deleting this stuff before import - because it's not just unneeded but rather unwanted), i can't import.

about the vertex normals, don't sweat it. yeah, the edges are gone. these are just rotated. you're doing great work here!!


Top
 Profile  
 
 Post subject: Re: Far Cry Primal models
PostPosted: Tue Jan 24, 2017 10:03 pm 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Sun Jul 06, 2014 6:30 am
Posts: 344
Has thanked: 73 times
Have thanks: 219 times
the error will be fixed, I know why it's happening now. in fixing one issue I made another. :mrgreen:
P.S. delete the cube, save as "Startup Scene", then you don't have to delete it anymore.

And I see what is going on with the skeleton, that file is special:
Image

All models up til now had this quaternion as 0,0,0,1 which means 'no rotation'. So I just ignored it. But Mr. nean seems to have 0,0,0.1401341,0.9901325, which is exactly 16.11 degrees of rotation on Z axis. which is exactly the error seen. So I just need to factor in this value and problem solved. I see the vector also has a very tiny value. I may need to see if it's a translation. New version shortly.


Top
 Profile  
 
 Post subject: Re: Far Cry Primal models
PostPosted: Tue Jan 24, 2017 10:43 pm 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Sun Jul 06, 2014 6:30 am
Posts: 344
Has thanked: 73 times
Have thanks: 219 times
Ok, invalid context problem is fixed. Won't be any problems with deleting objects.

Skeleton rotation fixed:
Image

And I fixed an unreported issue I noticed with alpha transparency settings for materials when no textures are found. Fixed. :mrgreen:

Enjoy.

Edit: New version below.


Last edited by volfin on Wed Jan 25, 2017 1:51 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Far Cry Primal models
PostPosted: Tue Jan 24, 2017 10:55 pm 
Offline
advanced

Joined: Sun May 19, 2013 12:55 am
Posts: 68
Has thanked: 66 times
Have thanks: 1 time
thank you for your steady support! really appreciated.
well, you'll probably hate me now ...

https://picload.org/image/roadacaw/blen ... _v1.04.jpg

that goes for almost all the european models :/
also mesh isn't bind to the skeleton anymore for the ones with the rotated bones.


Top
 Profile  
 
 Post subject: Re: Far Cry Primal models
PostPosted: Tue Jan 24, 2017 11:44 pm 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Sun Jul 06, 2014 6:30 am
Posts: 344
Has thanked: 73 times
Have thanks: 219 times
TheMask85 wrote:
thank you for your steady support! really appreciated.
well, you'll probably hate me now ...

https://picload.org/image/roadacaw/blen ... _v1.04.jpg

that goes for almost all the european models :/
also mesh isn't bind to the skeleton anymore for the ones with the rotated bones.


Seems the *material.bin file format is more convoluted than it first seemed. Will take awhile.

As for not binding skeleton, I don't see that on "Nean" which was a rotated model. If you mean no binding on the ones that crash the script, that's normal, the script can't finish the job. If you mean something else, give me an example.


Top
 Profile  
 
 Post subject: Re: Far Cry Primal models
PostPosted: Tue Jan 24, 2017 11:49 pm 
Offline
advanced

Joined: Sun May 19, 2013 12:55 am
Posts: 68
Has thanked: 66 times
Have thanks: 1 time
volfin wrote:
the script can't finish the job


nah, that's probably why. since the ones without error message and correct skeleton are bind just fine.


Top
 Profile  
 
 Post subject: Re: Far Cry Primal models
PostPosted: Wed Jan 25, 2017 1:51 am 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Sun Jul 06, 2014 6:30 am
Posts: 344
Has thanked: 73 times
Have thanks: 219 times
Ok, crafter guy now loads and processes materials properly. I changed how it determines what texture is specular/diffuse/normal, it should do a better job of guessing.

Edit: new version below.


Top
 Profile  
 
 Post subject: Re: Far Cry Primal models
PostPosted: Wed Jan 25, 2017 8:12 am 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Sun Jul 06, 2014 6:30 am
Posts: 344
Has thanked: 73 times
Have thanks: 219 times
Updated version. Fixed some problems with material.bin processing, a mesh validation issue, a skeleton offset issue, and added a new feature:

Image

You can now check "Use Existing Skeleton" at the import pane, and instead of building a skeleton with the import, it will use the existing skeleton. If an existing skeleton doesn't exist, it will go ahead and build one (if the model has one). Undestand it's not smart, so if you load in two meshes that don't use the same skeleton and use this feature, it will put them on the same skeleton anyway. So use wisely. It's off by default.


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.



Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 123 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: dropoff, TSelman61X and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group