Author Topic: Need help getting Karpov era 3D models to work with newer SDK revisions  (Read 10726 times)

Offline Luther Blissett

  • Moderator
Originally mentioned in this topic, there were problems in getting the animation of 3D models to work in newer revisions of the SDK. Older snapshots worked fine (these have been used in tutorials and testing so far). However, obviously there would be benefit to getting this stuff to work in newer or newest revisions.

It was suggested to me that the turning point may be from these changes relating to the animation format in the fo3d, where the syntax for the animations was changed.

So lines which used to be :
Code: [Select]
Anim A 1 %anim_file% %anim%_Def_Una_Idle_01
Were changed to :
Code: [Select]
Anim Anim1Unarmed Anim2Idle %anim_file% %anim%_Def_Una_Idle_01
If you go to the bottom of the _FOHuman.fo3d, we're currently using the "older" syntax, i.e.
Code: [Select]
# Unarmed
Anim A 1  %anim%_Idle.x Idle
[...]
Anim A 3  %anim%_Walk.x Walk

In a newer SDK revision, I tried changing these to :
Code: [Select]
Anim Anim1Unarmed Anim2Idle            %anim%_Idle.x Idle
[...]
Anim Anim1Unarmed Anim2Walk            %anim%_Walk.x Walk

However, it makes no difference. In both cases, the model renders correctly, and the unarmed idle pose is correctly read (i.e. whatever you put in the first line is used correctly, arms down instead of T-pose). In both cases, no further animations are read (so he "slides about" instead of walking). The Van Buren human models move and animate correctly - but the only real difference I could spot was that their animations are retrieved from a single master %anim_file% rather than separate %anim%_Idle and %anim%_Walk etc.

Anyone got any ideas or thoughts, or been able to get the animations working in newer versions?

[edit, 23/01/2012] I retested this, and tested further things. The "new format" of animation commands seems to do nothing in fact (not even idle pose - I'm not sure if I was mistaken previously). I tried combining multiple animations into a single animation file, which also did nothing. It seems that the only line it will read is "Anim A 1  [filename] [animation name]". It doesn't seem to want to read any further animation lines.

[edit, 25/01/2012] I tried some extra things and this is now beginning to work. I'd tested several things at once and am not sure which is the key element - so once I've isolated exactly what this is, I'll post full info up here, with corrected files if necessary.
« Last Edit: January 25, 2012, 05:15:50 am by Luther Blissett »

Offline Luther Blissett

  • Moderator
Re: Need help getting Karpov era 3D models to work with newer SDK revisions
« Reply #1 on: February 01, 2012, 04:30:57 pm »
I don't either... or I've got it working, but don't know why :P

What it currently looks like is :
1) Reformat the lines in animation as mentioned above
2) Import and reimport the x animations from Fragmotion, with the settings I was using for test rigging

Then to get the weapons to link :
3) Rename the weapon links from R_Handle_1 to R_handle_1 in the fo3d

This works - I've had a guy running around in game and animating properly. The problem is that I don't know WHY, or which of these steps are definitely necessary. The import/export thing I found whilst trying to combine the animations into a master animation file, which worked - so I tested with separated ones, which still worked. It seems very odd anyway. If I can work out exactly why it's doing this, I can explain something about it.

It would seem that something's changed to make the engine LESS accepting of file formats (which seems the opposite of what you'd expect), though what the specific difference is I don't know. Might be as simple as a tickbox somewhere. Also the case specific reference (Handle/handle) in the fo3d seems a little odd as well. The case specific element also related to the animation names within the .x file (i.e. run/Run needed to be written exactly).

Still a bit of a mystery to me to be honest, and there's probably something really simple that I'm missing somewhere :(

Re: Need help getting Karpov era 3D models to work with newer SDK revisions
« Reply #2 on: February 18, 2012, 02:31:54 pm »
Hi :)

Luther, could you please post links to files you are mentioning? (Import and reimport the x animations from Fragmotion, with the settings I was using for test rigging)

I have followed your guide how to make it work and i got this: http://postimage.org/image/wxhj7445p/

"The Flying Ninja 3064 Mod"  ;D

However, i didint import and reimport animations from fragmotion, as i am not sure where to look :)

Re: Need help getting Karpov era 3D models to work with newer SDK revisions
« Reply #3 on: February 18, 2012, 05:45:47 pm »
Okey, i found your files. I tried a bit more, but all i get is this:

Any ideas?

EDIT

Okey, small advancement: http://postimage.org/image/uwababqqf/

I disabled the effects in _FOHuman.fo3d

But, its till not animating, only floating around... It seems that engine doesint find the animation?
« Last Edit: February 18, 2012, 06:05:47 pm by kttdestroyer »

Offline Luther Blissett

  • Moderator
Re: Need help getting Karpov era 3D models to work with newer SDK revisions
« Reply #4 on: February 18, 2012, 08:25:21 pm »
If you use one of the older SDK revisions, it'll all work anyway (so the "setting up a 3D SDK" tutorial thing should be fine as is). But yeah, as you've noticed with newer ones there are seemingly problems with the animations not being recognised. I've had exactly the same issues as you're having. I'm still not 100% on a proper solution to be honest.

Anyway, here's a handful of the files I was playing with. Can't guarantee they're all doing what they're meant to, as it's a right mess to be honest (the folder looks like a madman's workshop) but you should be able to copy a few bits over from these and see if you can get stuff working :
A few animation test bits (about 500kb)
Image of export settings I was using in fragmotion
Should include a particularly messy fohuman.fo3d and some of the .x files for walk, run, idle and a couple of others. If you drop those over your existing walk and run etc, then copy and paste a handful of lines from the fo3d (animation stuff is all at the bottom), you might be able to get something working. Note that the fo3d is certainly not finished, so probably won't go much beyond walking and running - but if you understand the syntax etc, you can probably finish it off yourself.

Hopefully you can make some sense of all that :)

Re: Need help getting Karpov era 3D models to work with newer SDK revisions
« Reply #5 on: February 18, 2012, 09:13:43 pm »
Thanks for quick respons, i will check it out and write back :)

Re: Need help getting Karpov era 3D models to work with newer SDK revisions
« Reply #6 on: February 18, 2012, 10:49:52 pm »
Allright, i got it to work, thanks again, but i run into another problem, this time i cannot load any textures with the commands you mentioned in your tutorial. Are commands diffrent? Or are layers unlinked somehow? any idea?

The only body type/skin i am getting is the one i showed picture one above :/
« Last Edit: February 18, 2012, 10:52:10 pm by kttdestroyer »

Offline Luther Blissett

  • Moderator
Re: Need help getting Karpov era 3D models to work with newer SDK revisions
« Reply #7 on: February 19, 2012, 01:24:59 am »
The codes etc should be the same - though it depends where you got your source files from. You need equivalent texture files to link to the stuff indicated in the fo3d. Basically, if you look in the _FOHuman.fo3d, there's a section for "ArmorClothing", which is Layer 5 (param code 155). Each of the numbers beneath will correspond to a set of textures, e.g.

Code: [Select]
Value 10   Root Subset 1 Texture 0 %anim%_cljacket_clothing.png
                Subset 6 Texture 0 %anim%_cljacket_clothing.png
                Subset 3 Texture 0 %anim%_cljacket_clothing.png
                Subset 8 Texture 0 %anim%_cljacket_clothing.png
                Subset 10 Texture 0 %anim%_cljacket_clothing.png

So with the command param 0 155 10, it would change to this texture, reading %anim%_cljacket_clothing.png. If you're using the male hero human, this is specified in "VbMaleStrong.fo3d" as "anim male", therefore it will look for the file male_cljacket_clothing.png, which should be located in the \Client\data\textures folder. If you don't have these files, they can be downloaded through the "snapshot" link mentioned in the tutorial, or via the 3D dev SVN thing.

[edit] Note that there are gaps with some of these currently, so texture 1 might work, 2 and 3 might not, 4 may do etc. Generally speaking, the fo3d is fairly "human readable", so hopefully you can work something out by reading this, seeing the value numbers then seeing if they refer to files which exist in the texture folder.

You may also want to play with layer 0 (param 0 150 x) to change the base skin. I have a feeling this vault suit is a skin texture rather than a clothing texture. As said, it's all messy test files at the moment. Another consideration is that it may be using the "lower" and "upper" clothing layers (13 / 163 and 14 / 164) which you'll need to turn off with param 0 16x -1. If it's using the "use armour from armour slot", you can turn this off with param 0 153 -1.

Hope you can make sense of this, it's quite difficult to explain sometimes :)
« Last Edit: February 19, 2012, 01:29:26 am by Luther Blissett »

Re: Need help getting Karpov era 3D models to work with newer SDK revisions
« Reply #8 on: February 19, 2012, 11:12:08 pm »
Hmm... Allright, maybe i should tell my source files first  8)

I downloaded SDK through SVN (so i guess its the newest)

Also 3D from SVN (so i guess the newest aswell)

So, i tried a lot of things, the ones you mentioned aswell. The animations are working fine, but the weird thing is that all those commands exept "~run debug body 1 292 1" and the "body 1 295 1". When ever i use any of "~param 0 xxx x" nothing happends at all. Its like the skin is merged with this dude forever.

I tried to see where the character gets his skin from, and it is indeed "Textures\male_jmpsuit.tga". So, i made a little test and took diffrent skin file from Textures folder renamed it to "male_jmpsuit.tga" and it worked, the character got diffrent skin. But its locked just like the jumpsuit.

I tried also to manipulate CR_HumanMaleStrong.x with fragmotion, but it seems that fragmotion corrupts the file when exporting, i might have looked for error in wrong direction but what i tried to do is to remove the standard skin that CR_HumanMaleStrong.x seems to have. But everytime i exported, the character appeared all black (still animating through) and when i tried to load back the file i just exported, fragmotion gets fatal error and quits everytime... I was using the export settings you mentioned above, tried few others, but its more like a blind man trying to cross a highway really  :P

Any more ideas? :) Lets solve this!

Offline Luther Blissett

  • Moderator
Re: Need help getting Karpov era 3D models to work with newer SDK revisions
« Reply #9 on: February 20, 2012, 10:16:51 am »
Ooh. I wonder if they've changed it again to make things more difficult for us? :P

There should be equivalent "run debug" codes to the param ones :

Code: [Select]
~run debug SetCritParam x y z

x = character ID. Use 1 for this.
y = parameter number. 150-165 are our appearance parameters.
z = value of parameter y

So the equivalent to "~param 0 155 10" would be "~run debug SetCritParam 1 155 10". Not sure if that'll make any difference or not, but is worth trying.

Regarding the texture stuff, I could be very wrong, but I would firstly check if it's related to the path to the file somehow. Fragmotion says "Location of the texture image.  This path can be relative to the file path of the character where '..' means up one level and any path that is not fully qualified will be assumed to be relative to the folder containing the model file. (e.g. '..\textures\image.bmp' will move up one level from the folder containing the model file and look for 'image.bmp' in the 'textures' folder)".

The .x file should be in \Client\data\art\critters and it should draw the texture from \Client\data\textures, so I'd guess it needs to go up twice, then follow the path to "..\..\textures". However, I'm pretty sure this hasn't worked exactly as imagined for me though - like I had to do one extra or one less ".." bit for it to work correctly.

The export settings might not be 100% correct either - though they did work for me getting models and animations in game, so I thought I should use them since. The crashing I have no idea about, unfortunately. What might be useful (though I'm probably not going to have time to do this during this week) is for me to download/update to the newest SVN files myself, and see if I can replicate the issues you're having. I think the "newer" SDK I was testing with is already a little out of date. Also noticed that I'm still using Fragmotion 1.1.3, rather than 1.1.6. They could have changed something in there too. Looks like I need to update everything :)

Basically, I'll try and do a thorough investigation of things once I'm free from my current batch of "real life work".

Re: Need help getting Karpov era 3D models to work with newer SDK revisions
« Reply #10 on: February 20, 2012, 02:55:43 pm »
Allright  :) I gonna try again with your tips, meanwhile, i just drop by to inform that i am using Fragmotion 1.1.1 (hell, maybe i should upgrade it? hah).

EDIT

I tested a bit more, still no progress... About the commands, i tried both, still nothing happends, exept the run debug body 1 292 1 and run debug body 1 295 1 ones. The texture path you are mentioning i think is not the issue, becouse as i wrote above, it seems to be finding this one texture in the standard path you mentioned. I mean, as i replaced the male_jmpsuit.tga with another texture by deleting original male_jmpsuit.tga and rename diffrent texture to male_jmpsuit.tga and it responded corrently, i think this means that the path does work as it is this male_jmpsuit.tga the engine is reading from the texture folder, no matter whats in it.

I downloaded the newest fragmotion, and it seems that i can export/import without the crash, however, files still becomes currupted a bit, eitherway, i tried to remove texture that is in the model, but it didint change anything, exept the dude going all black...

EDIT 2

I tried few things, i noticed that weapon skins are not loading aswell... I am animating idle club animation for exemple, but there is no club! same with knife and pistols, i guess this points to all textures got same problem?  :P Some little code somewhere is playing very dirty trick.
« Last Edit: February 20, 2012, 07:51:47 pm by kttdestroyer »

Re: Need help getting Karpov era 3D models to work with newer SDK revisions
« Reply #11 on: February 21, 2012, 05:23:44 pm »
I made another test today, i simply used the newest sdk without changing anything, and guess what, the skins wont load even there on the default vb model.

Re: Need help getting Karpov era 3D models to work with newer SDK revisions
« Reply #12 on: February 29, 2012, 05:11:39 pm »
Hi again, i got it to work  ;) But now i run into diffrent problem... With weapon textures and maybe models aswell, they are simply not showing, the character does animation but there is no weapon. One important thing in this is that van buren weapons are appearing for standard van buren character, with van buren models, not sure yet where engine takes those from... Any ideas?

Offline Luther Blissett

  • Moderator
Re: Need help getting Karpov era 3D models to work with newer SDK revisions
« Reply #13 on: April 10, 2012, 10:56:12 pm »
Hi, sorry about disappearing for a month - had a very busy "real life work" period. I'm still pretty busy now, but I at least have a little time to look at things :)

Anyway, have you tested anything further on this? Any interesting tests / results / workarounds? If you let us know what you've tried so far, then I can look at downloading the newest SDK etc, and see what I can get with a little copying, pasting, and swearing at my computer :)

Offline Luther Blissett

  • Moderator
Hi again, further to conversation we had about this stuff - I tried the newest SDK, but can't even get it to run properly to test anything (as mentioned here) did you by any chance come across this "Connection timeout, client kicked, maybe bot" thing? If so, did you find a solution for it?