Jump to content

Animation Pipeline


Gen.Kenobi
 Share

Recommended Posts

haha, correct. it's good we have him around ... his logos are famous. :D

Okay, to be clear on the units:

  • Max -> inch (imperial)
  • Maya -> inch (imperial)
  • Pyrogenesis -> inch (imperial)
  • Blender -> m (meter)
Thus to get the correct units from blender to game engine, we need to work/model in blender in inches (2.54cm) or at least export as such. Can this explain you inches, Stan? Anyone sees errors? it's getting dark too early ...

empty-problem: write a script to assign new empties to the parent bones ... or convert those empty-after-import-becoming-bones into empties automatically (any unique naming scheme/id?).

The alternative is to ask blender's GaiaClary to fix broken empties, I guess this will be comparably easy ... if we consider the screwed animations.

Finally we have two bug reports:

  • broken empty-parented-to-bone-COLLADA-import.
  • broken animation after import?? or has this changed and now it's export that makes trouble again?

I've been trying an smd exporter for Max, best one you can find on the internet. Blender imports it correctly but screw everything when exporting to collada.

Tried with the OX cart too rigging is lost and moreover scale too.

So SMD importer is not working too? Results worse than with newest COLLADA it seems if it weren't for the missing empties/prop-points?
Link to comment
Share on other sites

haha, correct. it's good we have him around ... his logos are famous. :D

Okay, to be clear on the units:

  • Max -> inch (imperial)
  • Maya -> inch (imperial)
  • Pyrogenesis -> inch (imperial)
  • Blender -> m (meter)
Thus to get the correct units from blender to game engine, we need to work/model in blender in inches (2.54cm) or at least export as such. Can this explain you inches, Stan? Anyone sees errors? it's getting dark too early ...

I'm not sure if I understand the question. What happens is that by default max is set up to work with inches. You can change the parameter to meters, but that's kind of annoying since you have to rescale all your files that way. So exporting to inches, and when you open it in Blender make sure it scale it right and you're done, nothing really problematic here unless you don't know it.

empty-problem: write a script to assign new empties to the parent bones ... or convert those empty-after-import-becoming-bones into empties automatically (any unique naming scheme/id?).

The alternative is to ask blender's GaiaClary to fix broken empties, I guess this will be comparably easy ... if we consider the screwed animations.

I guess it has to do with the SMD format, in valve games I don't think they use some kind of prop support since it is mostly FPS games.

Finally we have two bug reports:

  • broken empty-parented-to-bone-COLLADA-import.
  • broken animation after import?? or has this changed and now it's export that makes trouble again?

So SMD importer is not working too? Results worse than with newest COLLADA it seems if it weren't for the missing empties/prop-points?

Okay I need to explain a bit further here. In max I use the Worm Wall plugin to export in SMD. You have three options :

- VTA (Don't know that format, and blender can't import it)

- Reference SMD (Guess that's for non-rigged models)

- Sequence SMD (For Animations).

What happens during importations in Blender (Using the Ox cart as reference);

- Using Reference SMD :

post-12287-0-34192900-1394783373_thumb.p

- As you see Scale went wrong. Everything is one object, and there is no animation stored.

- Using Sequence SMD

post-12287-0-80816100-1394784101_thumb.p

- Animation only with armature.

  • Like 2
Link to comment
Share on other sites

Thank you. Yes the question was missing an "r" at "you".

The ox cart really looks amazing. Okay. So that's the import.

Anyone tried the official way to get 3DS to blender 2.62 including animations?

It doesn't help finally if I don't try the pipeline myself. Have to add it to my growing list ... :omg:

It textured waiting for someone to get it game.

.3DS exportation is really bad. Most of the models don't get right But you seem nice so I'll show you :)

So... Armature is fine.

Missing one Bone (the wheel)

No animation survived the exportation

post-12287-0-48973300-1394825485_thumb.p

Link to comment
Share on other sites

Thank you Stan, it shows again all the pitfalls of programming. Breaking is easy, for fixing everything needs to be right. :down:
A neverending story ... :swoon:
Today working, tomorrow useless. Did I mention I really dislike technology? But we will fight on, art and magic will get us through .. :: :notworthy::gossip:

Need to find a way next month when I have more resources available, my main-project is giving severe trouble ... without any signs or reasons. This is programming too ... really love it. :inlove:

If Einstein and Planck only were still around. :celt::brow: We had quantuum systems then probably already fully working. :shrug:Then we'd no longer need to strive for performance. And the easiest and most long-living solution would be adopted instead of optimizing and optimizing. There is no other way then to fight, we must not give up. Nothing is impossible. :1eye:

Wo has done all those smileys? Never seen so many available ... :worship:

@Stan: Could you post a COLLADA file for the ox-cart and the biped rig you wanted to get into blender? I will give it a try and create error reports.

  • Like 1
Link to comment
Share on other sites

Wow, you guys have been busy since the last time I looked at the forums. Nice work. :D

FYI, I never had any luck using the default .dae file export out of 3ds Max. Back in the day (2006 - when most models and all animations were from 3ds Max for 0 A.D.) we always instructed people to export the .dae file from Max using ColladaMax. Pyrogenesis didn't like the native .dae export. So we used the plugin, which did work. I'm not sure if blender might have issues with the native 3ds Max .dae export as well?

Last time we made a run at this - I thought we were super close to getting this to work. I successfully got the rig into Blender and I thought it would work, but I'm not familiar enough with Blender to know how the export animation works. Check that out here. Enrique didn't have any luck with the file.

http://www.wildfiregames.com/forum/index.php?showtopic=15552&p=245561

I think it has a really simple test animation applied to it too.

  • Like 1
Link to comment
Share on other sites

Okay so here is the new rotatory file in FBX format, you'll why below

post-12287-0-69785300-1394877433_thumb.p

Here is the file in Max. Animation is fine and everything is fine. Missing only the donkeys.

post-12287-0-73584500-1394877438_thumb.p

Here is the file after export/import to FBX. As you see everything is fine

post-12287-0-11021500-1394877436_thumb.p

And now here is the file after export/import from Dae. As you see... Well there is nothing to say. Animation was lost.

I attached the FBX file

RotaryMill.7z

Edited by stanislas69
Link to comment
Share on other sites

Thanks a lot .. trying to get it ingame starting from blender using dude_4 currently.

What I did:

  • put the exported COLLADA .dae into .../meshes/skeletal folder.
  • Modify an existing actor xml file to use this skeletal/dude_4.dae .
  • Trying to figure which animation to assign (must be biped I guess).
Or does the .dae go into the animation folder. What's the difference between how the .dae are exported for the two possibilities (mesh & animation). Both the same? Edited by Hephaestion
Link to comment
Share on other sites

Okay, will give this a try too.

As for now the skeleton can't be recognised, the common case. Looks like it can't find the root skeleton:

const Skeleton* skeleton = NULL;        const FCDSceneNode* joint = controllerInstance.GetJoint(0);        while (joint && (skeleton = Skeleton::FindSkeleton(joint->GetName().c_str())) == NULL)        {                joint = joint->GetParent();        }        REQUIRE(skeleton != NULL, "recognised skeleton structure");
This can have many causes, one thing I realized when following the FindSkeleton from the while loop above, is this anomaly:<--it's correct, I missed a negation!!

.../art/skeleton/biped.xml

<standard_skeleton title="Standard biped" id="biped">...</standard_skeleton>
But in the engine:

.../collada/StdSkeleton.cpp

 if (IsEquivalent((*skeletonNode)->name, "standard_skeleton"))                        {                                skeleton->m->target = NULL;                                LoadSkeletonBones(*skeletonNode, skeleton->m->bones, NULL, "");                                std::string id (FUXmlParser::ReadNodeProperty(*skeletonNode, "id"));                                REQUIRE(! id.empty(), "standard_skeleton has id");                                g_StandardSkeletons[id] = skeleton.release();                        }
Note the REQUIREMENT for the standard_skeleton (the root node) not to have an id.

Can anyone with a debugger working check it, i.e. that this helper method really is reached. Or has anyone a hint how to debug such a big program?

A reason for why this did not give trouble for 3DSMax could be that you used a PMD/PSA exporter there, so no need to convert from .dae to PMD/PSA? I'm aware of that PSA is a custom format, and it's quite cool (because so simple).

Any help appreciated.

Edited by Hephaestion
Link to comment
Share on other sites

Okay, I see we need a custom skeleton model for blender, have to check all bone names ... eventhough the PSA format does not store bone names. strange.

I know it has been worked on the blender-skeleton biped.xml. Will look for it or try to make it compatible.

Well you could try replacing an existing skeleton, for instance, m_tunic_short and see what that does

I realised it's not possible, because we don't have any prop points in the dude_4, at least we don't export it currently to test the basics only. So if we simply swap it then the engine will try to attach props where there are no prop points ... no good. :/

Or is it not possible to have a model/mesh without any prop points? <-No this can't be the problem.

Link to comment
Share on other sites

Ok, a few things. You can use an export of dude_4 for both the mesh and the animation file in your actor xml file. The engine will only reference the mesh data when loading the mesh from the .dae file - and when doing the animation, it will only reference the animation data stored in the .dae. So you can actually used an animated mesh for your mesh.

The other thing is the skeleton. I would imagine that exporting the rig from blender will require a new skeleton. This file will need to be appended:

http://trac.wildfiregames.com/browser/ps/trunk/binaries/data/mods/public/art/skeletons/biped.xml

Note there is 2 basic versions of biped - one for max (line 58 - 115) and one for xsi (line 117 - 186). There will probably need to be one created for blender that names the rigging bones correctly per the blender file.

The difference could be as subtle as duplicating the structure of max one and just renaming the root. Lines 1- 56 in the file define the skeleton and will never change. The other blocks are basically translators for the various 3d software programs to define equivalent bone names.

Edit: I see your comments about prop points... was there no prop points in dude 4? I thought I brought those over (might they perhaps be hidden in blender? It shouldn't be to difficult to recreate new prop points or import them into blender and re-attach them with appropriate parent/child relationships.)

Edited by Wijitmaker
Link to comment
Share on other sites

Thanks, that helps.

Wait, the prop points were there. It's just that I didn't select them - because i read somewhere they have to be selected too, in the 3DS part of the i think. There we also find blenderspecific:

Isn't that a contradiction, select the prop point objects and only 1 object per COLLADA?

Link to comment
Share on other sites

Hmm, I'm trying to remember what I selected in max when I exported. I can't recall. You might want to try a few different combinations. I'm not even sure if you can do this in blender. But, in max you have the option of "export" which exports the whole scene, or "export selected" - which only exports selected objects (of course ;)). I don't remember if I just selected the root, or just the root and the mesh, or the root, the mesh, and the props (I suspect the later). Or maybe it was the root, all the bones, all the props and the mesh... You might want to try a few different combinations.

Link to comment
Share on other sites

The bone root you mean?

I also guess it's the latter: mesh[, armature/bone_root], props

Though it could be that the Armature is already exported through the armature modifier that is registered to the mesh in the modifier tab of the properties panel (within blender at the right the wrench).

Will try it.

Also I realised one problem. In blender, the hierarchy is not completely right. The l_clavicle and the r_clavicle are not children of the head! Nevertheless the animation plays very well (in daily blender build).

I will fix the skeleton mapping. (or best use the default names, why didn't we use those? are the bone names generated by the 3D program?)

Link to comment
Share on other sites

Yes bone root :)

Yeah please review and fix the hierarchy in blender as needed.

Yes in 3dmax, there is a plugin (now a part of max) that auto generates bipeds. It is called character studio. You can change the names of the bones, but I left them in there system generated names. The idea behind these skeletons was to allow people to use whatever software they wanted to use and name their bones whatever they wanted and still be able to map them to the master biped skeleton to take full advantage of all the existing biped compatible meshes and animations.

I think you can ignore the fingers and toes and nubs that you might see. Just don't apply a target like in rows 84 and 85. Those are relics from the pre-collada days. Back when we used the custom 3ds Max plugin to export directly to a .psa and .pmd file.

Stan, I'll check out your .fbx file now

Link to comment
Share on other sites

Yes bone root :)

Yeah please review and fix the hierarchy in blender as needed.

Yes in 3dmax, there is a plugin (now a part of max) that auto generates bipeds. It is called character studio. You can change the names of the bones, but I left them in there system generated names. The idea behind these skeletons was to allow people to use whatever software they wanted to use and name their bones whatever they wanted and still be able to map them to the master biped skeleton to take full advantage of all the existing biped compatible meshes and animations.

I think you can ignore the fingers and toes and nubs that you might see. Just don't apply a target like in rows 84 and 85. Those are relics from the pre-collada days. Back when we used the custom 3ds Max plugin to export directly to a .psa and .pmd file.

Stan, I'll check out your .fbx file now

This one should be compatible with Max 2009 I can make it compatible with max 2006

Test.7z

Link to comment
Share on other sites

Okay, if it's autogenerated, then it's cool.

Appended the blender specific skeleton-XML to biped.xml. --> GitHub

I also have written a blender python script for renaming bones automatically to fit our engine's standard_skeleton: <-- this is useless, see here

  • biped

    # Blender Python script - Tested with v2.70, should work with 2.6+.import bpy#------- FUNCTIONS ------------------------------------------------------------##ACTdef act():#context):    #a = context.armature    #print(a)    #if a is None:    a = bpy.data.armatures['Armature']    #TODO better use 0 as index?    remove_pattern = "root_"    if not a:        print("Armature still not found!")        return False    for b in a.bones:        old_name = b.name        print(b.name)        if b.name.find(remove_pattern) != -1:            print('found prepended ' + remove_pattern)            b.name = b.name.replace(remove_pattern, "")        b.name = b.name.lower()        if (old_name != b.name):            print('bone renamed to:' + b.name)        else:            print('nothing to do - report bug in blenderartists or wildfireforums if you think something is wrong.\r\nhttp://www.wildfiregames.com/forum/index.php?showtopic=15552&page=19#entry286903')        print("\r\n")    return Trueact()#context)
  • ... for other skeletons this can easily be adapted.
Most recent version (GitHub)

So I will continue my tests..

Edited by Hephaestion
Link to comment
Share on other sites

This one should be compatible with Max 2009 I can make it compatible with max 2006

Your right this one worked, it didn't error out - but it appears to be empty. There was no geometry included?

Okay, if it's autogenerated, then it's cool.

Appended the blender specific skeleton-XML to biped.xml.

I also have written a blender python script for renaming bones automatically to fit our engine's standard_skeleton:

  • biped

    # Blender Python script - Tested with v2.70, should work with 2.6+.import bpy#------- FUNCTIONS ------------------------------------------------------------##ACTdef act():#context):    #a = context.armature    #print(a)    #if a is None:    a = bpy.data.armatures['Armature']    #TODO better use 0 as index?    remove_pattern = "root_"    if not a:        print("Armature still not found!")        return False    for b in a.bones:        old_name = b.name        print(b.name)        if b.name.find(remove_pattern) != -1:            print('found prepended ' + remove_pattern)            b.name = b.name.replace(remove_pattern, "")        b.name = b.name.lower()        if (old_name != b.name):            print('bone renamed to:' + b.name)        else:            print('nothing to do - report bug in blenderartists or wildfireforums if you think something is wrong.\r\nhttp://www.wildfiregames.com/forum/index.php?showtopic=15552&page=19#entry286903')        print("\r\n")    return Trueact()#context)
  • ... for other skeletons this can easily be adapted.
  • Most recent version (GitHub)

    So I will continue my tests..

    Nice work - carry on!

    Link to comment
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Reply to this topic...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

     Share

    ×
    ×
    • Create New...