Jump to content

Animation Mesh Switch Out


DanHart
 Share

Recommended Posts

Hi Everyone,

 

I tried to modify one of the existing old meshes and apply it to the old armature. I wanted to make the tunic longer, but not as long as the dress. It works when I load an animation, but when I export to 0 A.D. it appears deformed. 

My Process:

1) Import old 0 A.D. mesh --> I used m_hero

2) delete armature

3) modify mesh

4) export collada

4) open new .blend

5) load existing animation --> I used spear attack

6) delete mesh for animation

7) load modified mesh, delete all vertex groups

8) apply modified mesh to armature --> selected mesh, selected armature, ctrl+P (used automatic weights)

9) test animation --> it worked, cleared action editor, export modified mesh an armature --> followed guide for export settings --> http://trac.wildfiregames.com/wiki/AnimationExportTutorial

10) modify xml for modified mesh, put modified mesh and xml in 0 A.D. folder

Result:


58d6df3dba807_modifiedmeshblender.thumb.JPG.a2e1435c84d68552cb1ec99f3ee0e159.JPG

58d6e01a5fb1a_animationmesh.thumb.JPG.4691f8159769ead36586b6e96c244156.JPG

58d6e02bb10d3_modifiedmesh.JPG.f36ce43752d2420adb49c8e1d64999d2.JPG

 

Link to comment
Share on other sites

There are some steps there that may generate the issues. Specially importing the used armature from a collada file to export it back (bones are often broken)

If you have the mesh already done, rig it to the following armature in the blendfile that you can find in this post:

This way you have the armature "as it was created in blender" without importing it. Just assign the vertex groups (do the rigging) of your mesh to the armature found in that blend file and export. Let me know if the issue persists.

 

EDIT: Keep in mind that modifying the hero mesh for your longer tunic variation will make only compatible with the hero UV textures (heroes have different UV layouts than the standard unit) That's the reason why in your image (although it is broken due to the collada export) you can clearly see that one foot is correctly mapped, but the other is not.

Link to comment
Share on other sites

I don't know how to get the new meshes. I have done a little modeling and can make new props, and textures, but this is my first attempt at more intermediate stuff. I thought if I could make it work with the old mesh, I could do it with the new meshes when they are available in the next release. 

Link to comment
Share on other sites

If you want to do your model from the new unit models that will debut in the next alpha, you can grab the animation template at the end of the following post:

Use the same process as the previous post, but with this blendfile. 

If you prefer to start modifying from a different (longer tunic) variation than the one on that blendfile, you can choose from the following (they're named the same as the old variations):

http://svn.wildfiregames.com/public/ps/trunk/binaries/data/mods/public/art/meshes/skeletal/new/

Just remember to rig it to use the armature from the blendfile, not the one that gets imported from the collada files and it should work.

  • Like 1
Link to comment
Share on other sites

The props are working, but I am getting an error claiming there are "unrecognized bones". I used the new heads :). They look a lot better than the old heads and look pretty good on the old meshes. 

58d6e959d3f4e_newtry.thumb.JPG.fa1df4dff9b4ce9861a790da8f2ea4e6.JPG58d6ea32e5e16_newblendfile.thumb.JPG.d17038ed2e88be3e6f1cdefeca359ffc.JPG

Edited by DanHart
added new photo
Link to comment
Share on other sites

What process did you follow to get there?. Are you re-rigging the whole thing with automatic weights?

If you do so, you'll need to uncheck "deform" in the bone options tab for every bone that is not used in deformation, like the knees target, elbows target and all the prop-bones. Otherwise blender may assign weights to bones that are there only to help animating, not deformation thus the game thinks that there should be more bones to do the animation.

Ideally you should:

-Import the mesh that you want to modify.

-Erase the armature that comes with it, then modify the mesh as desired.

-Once you got your tunic variation, append the armature from the blendfile provided earlier.

-Add an armature modifier to the mesh and choose the appended armature.

-Move the bones to see your new vertices are assigned to any vertex group, and if not, do it manually (the changes are not big, so you won't have to spend much time with it) If you do automatic rigging, you may add vertex groups of bones that are not declared to deform the mesh and errors will occur.

-Export.

  • Like 1
Link to comment
Share on other sites

I select the mesh then select the whole armature --> ctrl+P and automatic weights.

When you say "re-rigging" I am not going through each bone and doing weight painting. 

 

I decided to give the new armature a try. I grabbed a new unit mesh, and adjusted it. It looks like it worked, but the props did not attach. 

58d6fcac3c22b_newmesh.thumb.JPG.4c3e6ce1653a151371166a5aa733d025.JPG

 

 

 

Link to comment
Share on other sites

7 minutes ago, DanHart said:

When you say "re-rigging" I am not going through each bone and doing weight painting. 

You don't need to go through each bone, you only need to do it for the new vertices you created for the tunic, the rest of the mesh maintain its bone weights, so only the few new vertices you created need weight painting.

9 minutes ago, DanHart said:

I decided to give the new armature a try. I grabbed a new unit mesh, and adjusted it. It looks like it worked, but the props did not attach. 

Glad it worked. Please take a look to the new meshes actors, the prop-bones have different names than the old meshes ones. 

  • Like 1
Link to comment
Share on other sites

Thanks for the help! I haven't used the SVN before. Is it best to copy and past the code into notepad, then save, and import, or is there a better way to access files?

 

Also, how do you tell the new animations in the SVN apart from the old animations?

  • Like 1
Link to comment
Share on other sites

Here's the link to the online SVN repository. -> http://svn.wildfiregames.com/public/ps/trunk/

It's like 0AD folders and files, just navigate to the folder you need the file from, then rightclick, save as and boom, you have the dae file without copying/pasting the whole code.

http://svn.wildfiregames.com/public/ps/trunk/binaries/data/mods/public/art/animation/biped/new/

That would be the folder with all the new animations for the new meshes. New animations can be done with the blendfile of the animation template. Just create a new action, animate the stuff, and export it. All new meshes (like your new tunic variation) can use those new animations.

  • Like 2
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...