Jump to content
Sign in to follow this  
Gen.Kenobi

Animation Pipeline

Recommended Posts

For those that wonder, my script is quite useless, as it does not remap the hierarchy. :) And that's exactly what is done by defining another

<skeleton title="blender biped" target="biped">...</skeleton>

Share this post


Link to post
Share on other sites

Can find the blender specific skeleton mapping in this biped.xml on GitHub.

Note, that strangely the ForeArm is written Forearm in blender though UpperArm is not written Upperarm. Might be that that's normal (any native speakers around?). So I've to edit that in the biped.xml. Or you rename the bone in blender via double click onto the bone in the outliner before exporting.

Btw. this now looks much better, I tried several options and finally the not recognised skeleton is gone

Must have broken something in the biped.xml. Will compare to SVN version now.

Now I have a problem with a missing texture (as I didn't specify any). Will try to fix this:

ERROR: Actor 'trader_h' has no textures.ERROR: art/animation/biped/inf_pack_idle.dae: Assertion not satisfied (line 393): failed requirement "recognised skeleton structure"ERROR: Could not load animation 'art/animation/biped/inf_pack_idle.dae'ERROR: CSkeletonAnimManager::GetAnimation(art/animation/biped/inf_pack_idle.dae): Failed loading, marked file as badERROR: art/meshes/skeletal/m_pants_tunic.dae: Assertion not satisfied (line 393): failed requirement "recognised skeleton structure"ERROR: Could not load mesh 'art/meshes/skeletal/m_pants_tunic.dae'ERROR: CObjectEntry::BuildVariation(): Model art/meshes/skeletal/m_pants_tunic.dae failed to loadERROR: Failed to build prop model "units/celts/trader_r.xml" on actor "trader"ERROR: art/meshes/skeletal/m_pants_tunic.dae: Assertion not satisfied (line 393): failed requirement "recognised skeleton structure"ERROR: Could not load mesh 'art/meshes/skeletal/m_pants_tunic.dae'ERROR: CObjectEntry::BuildVariation(): Model art/meshes/skeletal/m_pants_tunic.dae failed to loadERROR: Failed to build prop model "units/celts/trader_r.xml" on actor "trader"
That I chose a composite model for testing is a bit unlucky ...

Okay, fixed the texture error ... now it's about a file, I never changed anything: (I use dude_4.dae not any of the below .. and there seems to be no more error with dude_4.dae .. unbelievable)

ERROR: art/animation/biped/inf_pack_idle.dae: Assertion not satisfied (line 393): failed requirement "recognised skeleton structure"ERROR: Could not load animation 'art/animation/biped/inf_pack_idle.dae'ERROR: CSkeletonAnimManager::GetAnimation(art/animation/biped/inf_pack_idle.dae): Failed loading, marked file as badERROR: art/meshes/skeletal/m_pants_tunic.dae: Assertion not satisfied (line 393): failed requirement "recognised skeleton structure"ERROR: Could not load mesh 'art/meshes/skeletal/m_pants_tunic.dae'ERROR: CObjectEntry::BuildVariation(): Model art/meshes/skeletal/m_pants_tunic.dae failed to loadERROR: Failed to build prop model "units/celts/trader_r.xml" on actor "trader"ERROR: art/meshes/skeletal/m_pants_tunic.dae: Assertion not satisfied (line 393): failed requirement "recognised skeleton structure"ERROR: Could not load mesh 'art/meshes/skeletal/m_pants_tunic.dae'ERROR: CObjectEntry::BuildVariation(): Model art/meshes/skeletal/m_pants_tunic.dae failed to loadERROR: Failed to build prop model "units/celts/trader_r.xml" on actor "trader" 
Edited by Hephaestion

Share this post


Link to post
Share on other sites

Good news!! Exchanging the m_pants_tunic.dae with the from blender exported dude_4.dae mesh gave an error, but this is only related to an animation and prop point!! So it looks it could at load it!

ERROR: Failed to set idle animation in model "art/meshes/skeletal/m_pants_tunic.dae"ERROR: Failed to find matching prop point called "back" in model "art/meshes/skeletal/m_pants_tunic.dae" for actor "trader_r"ERROR: Failed to find matching prop point called "head" in model "art/meshes/skeletal/m_pants_tunic.dae" for actor "trader_r"ERROR: Failed to set idle animation in model "art/meshes/skeletal/m_pants_tunic.dae"ERROR: Failed to find matching prop point called "back" in model "art/meshes/skeletal/m_pants_tunic.dae" for actor "trader_r"ERROR: Failed to find matching prop point called "head" in model "art/meshes/skeletal/m_pants_tunic.dae" for actor "trader_r"

Share this post


Link to post
Share on other sites

Very good, your almost there. For testing purposes you could make a crude actor file.

<?xml version="1.0" encoding="utf-8"?><actor version="1">  <castshadow/>  <group>	<variant frequency="1" name="Base">	  <animations>		<animation file="biped/{exported.dae}" name="Idle" speed="100"/>	  </animations>	  <mesh>skeletal/{exported.dae}</mesh>	  <props>		<prop actor="props/units/heads/hele_leonidas.xml" attachpoint="helmet"/>		<prop actor="props/units/heads/head_hele_h.xml" attachpoint="head"/>		<prop actor="props/units/shields/hele_round_leonidas.xml" attachpoint="shield"/>		<prop actor="props/units/cape_long_ragged.xml" attachpoint="shoulders"/>		<prop actor="props/units/weapons/spear_hoplite.xml" attachpoint="r_hand"/>	  </props>	  <textures><texture file="skeletal/hele_leonidas.dds" name="baseTex"/></textures>	</variant>  </group>  <material>player_trans.xml</material></actor>

Just drop your exported dae file in these locations:

binaries/data/mods/public/art/animation/biped

binaries/data/mods/public/art/meshes/skeletal

and replace this in the example above: {exported.dae}

  • Like 1

Share this post


Link to post
Share on other sites

Also good news Stan, I got the FBX file to work. I'll take a look at it closer tonight. I need to spend the rest of my day doing not fun stuff... my taxes (n)

  • Like 1

Share this post


Link to post
Share on other sites

Ah, I forgot ... this might be normal because of the not-fitting animation?

We have a pipeline!

post-15921-0-72978000-1394912079_thumb.g

That means

  • if you remember how brilliantly you got to this .dae ,
  • if we can repeat it for other animations (if we don't bore you of course),
  • And if we get the prop points to exist in the .dae and to work.
Or perhaps this is just an illusion?? A dude jumping in Atlas. :)
  • Like 2

Share this post


Link to post
Share on other sites

That looks better. Ok so for the prop points - double check the names. There should be a corresponding prop point for each of these.

<prop actor="props/units/heads/hele_leonidas.xml" attachpoint="helmet"/>
<prop actor="props/units/heads/head_hele_h.xml" attachpoint="head"/>
<prop actor="props/units/shields/hele_round_leonidas.xml" attachpoint="shield"/>
<prop actor="props/units/cape_long_ragged.xml" attachpoint="shoulders"/>
<prop actor="props/units/weapons/spear_hoplite.xml" attachpoint="r_hand"/>

I forget the naming convention for the prop points in blender... if it is simply helmet, or prop_helmet, or props_helmet. And double check how you exported the mesh, did you have the prop points selected when you exported it? That might make a difference.

So the ultimate goal is to intermingle new animations with old animations, new meshes with old meshes... so we really want to see if you add this line to the actor file, if it turns into a crumbled mess... or if it actually works like we would hope it would.

<animation file="biped/inf_hoplite_walk.psa" name="Walk" speed="120"/>

Edited by Wijitmaker
  • Like 1

Share this post


Link to post
Share on other sites

Good news everyone! We have it! Prop points working.

Objects are treated differently than empties for blender, not even helps to delete all vertices. 3DSMax prop tools must have done some post-processing, so for blender we have to take empties, as Enrique and others already stated before.

Only problem so far, that though I parented the empty to the head and called it prop-head ... still the head appears at a different location.

Btw, have you noted, the above file was a tiny gif animation, for those that want to see how it looks in Atlas Actor view.

Together we strive ... we had never made it that far without all the year-long desperate efforts to make it. My thanks to our team. :worship: Also GaiaClary needs to be honoured for the vast improvement of COLLADA export and import. :thumbup:

If we get animations to work in blender with the COLLADA importer, then we have made it. To prepend the "prop-" or "prop_" to the empties that have the armature (more specific: a bone of it) as parent, we can create a blender script or addon.

post-15921-0-42545800-1394916682_thumb.j

Still can't believe that there is a head now attached ... okay its rotation and position ... well ... have to check how to fix it in blender, surely parented the wrong way.

Btw. some bad news too, I'm afraid, the other animations don't seem to play nice with it. Only the one that was embedded in dude.dae. :torch:

https://github.com/0ADCoM/share/blob/master/blender/dude--actor-xml_dae_and_blend.zip

Note that this all is made to work with ForeArm instead of Forearm. I have to change it ..

Edit: Updated link and marked ForeArm instead of Forearm problem as resolved.

Edited by Hephaestion

Share this post


Link to post
Share on other sites

So the ultimate goal is to intermingle new animations with old animations, new meshes with old meshes... so we really want to see if you add this line to the actor file, if it turns into a crumbled mess... or if it actually works like we would hope it would.

<animation file="biped/inf_hoplite_walk.psa" name="Walk" speed="120"/>

We have the pipeline but we have not saved the old animations so far. Unfortuenately the result is semi-okay. The animations plays well, all movements correct, but the mesh is distorted. The head prop is rotated by 90 degree.

Do you think the weights of the vertex groups have to be rotated by 90 degree. Strange though that the walking is perfect, still the mesh looks like each bone was rotated along the axis that points towards as when the model looks at us and along the z-axis for the head ... have to find the issue.

Share this post


Link to post
Share on other sites

Care to explain what did you do to get it working? did you only exported the animation from a blendfile? What do you mean that the rest of the animations aren't working?

Share this post


Link to post
Share on other sites

I will try to be more specific. Used the dude_4.blend and exported it. It did not work.

Then I added a blender specific skeleton for the biped (.xml) (see tar.gz above or my github link). There I mapped the hierarchy and the names with the help of all the experiments of you artists in this and other threads.

Then I replaced the cuves with empties.

I used the daily build.

In blender I select the Armature, the Prop points (empties) and the main mesh. Then I export and use these settings though this may be forgiving:

post-15921-0-70798600-1394919714_thumb.j

I created the files as being told by our masters.

Loaded the animations in ActorViewer in Atlas, but only the one from the same .dae file worked. The .psa animation (all our old ones) are screwed. perhaps we can try old .dae where the .psa were derived from instead?

Share this post


Link to post
Share on other sites

Well, the point of this thread was to get the armature working without changing the skeleton .xml because if we change it, we lose all the old animations.

The "animation pipeline" per-se is working, I recently animated asian elephants and a tiger, but I created a new armature and skeleton .xml from scratch, so "new" animations are working. What we were trying to achieve here is getting somehow an armature in blender compatible with the current one, so we can keep creating new animations without having to change anything that is already working in-game.

Anyway it's more likely that we make new unit meshes with new armature and animations and provide the blend-files in a repo for everyone that wants to make animations.

Share this post


Link to post
Share on other sites

I'm not sure what is going on with that head prop... wierd.

The mesh deformation with the different animations might be because... I think every vertex gets an index number assigned to it in the .dae file. Each vertex is located xyz with bone assignments and weightings. Perhaps the vertex index numbers are getting scrambled between versions of .dae exports?

All the original max files are in the art repository and could be re-exported as .dae files.

Hephaestion, I'd be curious to see what you thought as you compared and contrasted the contents of the Max exported .dae files with the blender exported .dae file.

2 are exported with max's default exporter (autodesk) with different orientations. I never had luck getting these exports to work in pyrogenesis.

Attached is a screenshot of the export dialog menu, and warnings it threw.

The other export is colladamax plugin's version - what I always used successfully.

dude_4_dae.zip

post-3-0-28444000-1394921097_thumb.png

post-3-0-09882400-1394921116_thumb.png

  • Like 1

Share this post


Link to post
Share on other sites

Enrique, Wijtmaker, Look at this: (z-up vs y-up, this could be what screws the old animations, have to tell blender to feel like y-up)

post-15921-0-65076900-1394921841_thumb.j

@Enrique:

You are right. I just mixed up the terms, lost the overview as there are many threads about COLLADA problems, once have import, the other export problems, the next don't get it into the engine.

So I thought I should try it myself instead of only talking (what I definitely already do enough). I didn't want to attack your pipeline in any way. Just help out ...

Thanks for the animal animations. I like the animals in 0A.D., they are just like the real thing.

Share this post


Link to post
Share on other sites

I'm not sure what is going on with that head prop... wierd.

2 are exported with max's default exporter (autodesk) with different orientations. I never had luck getting these exports to work in pyrogenesis.

Attached is a screenshot of the export dialog menu, and warnings it threw.

The other export is colladamax plugin's version - what I always used successfully.

For the head, see above, y-up and z-up is mixed up. In blender it's looking fine, but somehow the imported data is still in y-up while the prop points seem to get out into the COLLADA in z-up. The engine ignores it completely I was told.

The mesh deformation with the different animations might be because... I think every vertex gets an index number assigned to it in the .dae file. Each vertex is located xyz with bone assignments and weightings. Perhaps the vertex index numbers are getting scrambled between versions of .dae exports?

All the original max files are in the art repository and could be re-exported as .dae files.

Interesting .. that could explain it. Have to try it.

Hephaestion, I'd be curious to see what you thought as you compared and contrasted the contents of the Max exported .dae files with the blender exported .dae file.

Ha, you know I compared it? :D When I looked at it I saw a lot of metadata in the dae from 3DSMax. Also the 3DSMax files contained an array/list of the prop points whereas in blender-dae files they have only two occurences of prop-head, once in the id of a node and once in target or name of the same node (so just one node in the bone-structure as it is parented to it and that's all).

Also in the 3DSMax files there were a lot of other objects around. Still both only had one material.

Hm... have to take another look. what did you realise when you compared them?

Edit 2: thanks for the files!!

Edited by Hephaestion

Share this post


Link to post
Share on other sites

Essentially:

The local coordinates that are imported for bones are completely different than their (the bones') object coordinates! (see screenshots)

This could be the alternative reason for the old animations being screwed up. (the other theory is the vertex index inconsistency in COLLADA format)

post-15921-0-71192800-1394926735_thumb.j

post-15921-0-53094100-1394926743_thumb.j

post-15921-0-66235300-1394926757_thumb.j

post-15921-0-67123900-1394926773.jpg

post-15921-0-72427300-1394926782_thumb.j

post-15921-0-68400200-1394926804_thumb.j

Share this post


Link to post
Share on other sites

@stan FBX file:

Version 6100 unsupported, must be 7200 or later.

Do you have a newer version?

2 are exported with max's default exporter (autodesk) with different orientations. I never had luck getting these exports to work in pyrogenesis.

The Autodesk ones were broken. Impossible to import. The other one had lost the root bone ... and two or three other bones missing too, the calves I think.

Seems to be a common problem for every 3DSMax exported .dae file I try to import.

Have updated the ForeArm --> Forearm in the /actor/biped.xml.

All other dude- files may be found there, e.g. the celts/dude.xml I currently use (still almost exactly what you said I should do).

post-15921-0-13110300-1394939025_thumb.j

Share this post


Link to post
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.

Sign in to follow this  

×
×
  • Create New...