Light Style© by Fisana

Jump to content


Photo

Animation Pipeline


439 replies to this topic

#41 Ykkrosh

Ykkrosh

    Primus Pilus

  • WFG Programming Team
  • 4,921 posts

Posted 20 January 2012 - 10:45 PM

@Phillip: Well, looks like the main probleman is with the oars geometry. Because right now they are made with two unconnected meshes (each one).

That shouldn't be a problem (as long as the vertices from all the unconnected meshes are selected and have the weights applied).

I'm assuming that to run the script you just need to paste the code, select the tip's vertexes, go to the object mode and press enter to run the script, right?

Blender's Python console runs each line as soon as it's input, so you should paste the entire script (and press enter twice to ensure it's completed) only after doing all of the selection. Then it should be like the attached file.

What about we rig one oar and animate it. Them we can copy this oar as a prop of the ship.

Props aren't particularly good for performance - there's a constant cost for rendering each individual mesh (independent of the size or complexity of the meshes), especially if they're animated meshes, and I think it starts hurting once we have maybe hundreds of meshes on screen (whereas we can easily have hundreds of thousands of triangles), so using a hundred single-oar meshes for a single unit would be pretty bad.

Attached Files


  • 0
Philip Taylor [aka Ykkrosh]

Wildfire Games Programmer
Contact me: philip@wildfiregames.com

#42 Pureon

Pureon

    Primus Pilus

  • 0 A.D. Art Team
  • 3,651 posts

Posted 20 January 2012 - 11:50 PM

@Phillip: Well, looks like the main probleman is with the oars geometry. Because right now they are made with two unconnected meshes (each one).


That's what I've fixed in the new rigs I've created - as I mentioned a few posts back. I haven't had any time for 0 A.D. the past few days - starting work at 8.30am and finishing at 10pm with a 50 minute commute each way eats up a lot of time :(
  • 0

Pureon
0 A.D. Part time Designer / Texturer / 3D Artist
Contact email:
pureon{@}wildfiregames.com


#43 quantumstate

quantumstate

    Primus Pilus

  • WFG Retired
  • 1,150 posts

Posted 21 January 2012 - 12:04 AM

Ykkrosh's rig seems to work best. For ease of animating it would be easy enough to set up a convenient rig with a small rotation locked bone which you would apply the script to.
  • 0

Jonathan Waller [ aka quantumstate ]

Wildfire Games Programmer
Contact me: jonathanmarkwaller at gmail dot com


Support Wildfire Games!


#44 Gen.Kenobi

Gen.Kenobi

    Centurio

  • WFG Retired
  • 714 posts

Posted 21 January 2012 - 12:15 AM

That's what I've fixed in the new rigs I've created - as I mentioned a few posts back. I haven't had any time for 0 A.D. the past few days - starting work at 8.30am and finishing at 10pm with a 50 minute commute each way eats up a lot of time :(


That sucks mate... Have you sent me your rig yet? I didn't look my inbox :P

@Jason: Are you working on the Human Rigs for Blender? Hmm... Are you importing the rigs that are already made? Hmm...Because I made a new one (I guess you saw). Wouldn't be better if we just code the new rig into the skeletons.xml? (I'm talking like a total stranger here. :P Dunno. Whatever you do, I'm prety sure it'll be better. hehehe)
  • 0
Daniel Schubert [ aka Gen.Kenobi]

Wildfire Games 3d Artist
Contact me: daniel[at]wildfiregames.com



Posted Image
Visit Revora Creative Network! : )

#45 Wijitmaker

Wijitmaker

    0 A.D. Old Timer

  • WFG Retired
  • 9,552 posts

Posted 21 January 2012 - 05:44 AM

I'm afraid the best I can do is get you an export of what it should be like. I'll try to figure out how to do that. Though it might be easier said than done... My 3ds Max isn't working at the moment and I think I have to reinstall windows to get it up. I've got some cdilla issues.
  • 0

Jason Bishop [ aka Wijitmaker ]

0 A.D. Founder

Contact me: jason@wildfiregames.com


#46 Gen.Kenobi

Gen.Kenobi

    Centurio

  • WFG Retired
  • 714 posts

Posted 21 January 2012 - 03:29 PM

So. I gave it a try on codding the Blender armature into the skeletons.xml file.
But since I'm not at home, I can't try to get an animation ingame. So I'll post the code here, if anyone could try it and see if it works, it would be really nice.

<skeleton title="Blender biped" target="biped">
            <identifier>
                 <root>Armature</root> ;;(???? ==- Dunno what do to here) 
            </identifier>
            
             <bone name="Armature"> ;;(??? - Neither here)
                 <target>root</target>
               
                 <bone name="hips">
                     <target>pelvis</target>
                    
                     <bone name="spine">
                         <target>spine</target>
                        
                        <bone name="ribs">
                             <target>spine1</target>
                         </bone>
                     </bone>
                 </bone>
                 <bone name="shoulder.L">
                    <target>l_clavicle</target>
                 </bone>
                 <bone name="upper_arm.L">
                     <target>l_upperarm</target>
                    
                     <bone name="forearm.L">
                         <target>l_forearm</target>
                     </bone>
                 </bone>
                 <bone name="shoulder.R">
                     <target>r_clavicle</target>
                 </bone>
                 <bone name="upper_arm.R">
                    <target>r_upperarm</target>
                    
                     <bone name="forearm.R">
                         <target>r_forearm</target>
                     </bone>
                 </bone>
                 <bone name="neck">
                     <target>neck</target>
                    
                     <bone name="head">
                         <target>head</target>
                     </bone>
                 </bone>
                 <bone name="thigh.L">
                     <target>l_thigh</target>
                    
                     <bone name="shin.L">
                         <target>l_calf</target>
                     </bone>
                 </bone>
                 <bone name="thigh.R">
                     <target>r_thigh</target>
                    
                     <bone name="shin.R">
                         <target>r_calf</target>
                     </bone>
                 </bone>
                 <bone name="hand.L">
                     <target>l_hand</target>
                     <bone name="Biped_Lfingers"/> ;;(Dont have fingers in that test armature)
                 </bone>
                 <bone name="foot.L">
                     <target>l_foot</target>
                     <bone name="toe.L"/>
						<bone name="heel.L"/>     ;; (Added just because it had)
						<bone name="heel.02.L"/>  ;; (Added just because it had)
					</bone>
					</bone>	
                 </bone>
                 <bone name="hand.R">
                     <target>r_hand</target>
                     <bone name="Biped_Rfingers"/> ;;(Dont have fingers in that test armature)
                 </bone>
                 <bone name="foot.R">
                     <target>r_foot</target>
                     <bone name="toe.R"/>
						<bone name="heel.R"/>     ;; (Added just because it had)
						<bone name="heel.02.R"/>  ;; (Added just because it had)
					</bone>
					</bone>	
                 </bone>
             </bone>
         </skeleton>

  • 0
Daniel Schubert [ aka Gen.Kenobi]

Wildfire Games 3d Artist
Contact me: daniel[at]wildfiregames.com



Posted Image
Visit Revora Creative Network! : )

#47 Gen.Kenobi

Gen.Kenobi

    Centurio

  • WFG Retired
  • 714 posts

Posted 22 January 2012 - 06:52 PM

Bumping for the sake of a bump.

I'm planning to start manning the sieges soon. (At least the Rams, as they are the most simple animations.).
A question to Michael, when the rams are engaged in hand to hand combat will the mens do out and fight untill die, so the rams could be captured, and maybe manned by other guys and teams? (Like CoH) And If yes, how is the number of men per garrison per ram per faction?
I'm going to start sketching something soon. (I brought a camera, so I can start making funny tests in my free time :P - recording me doing funny stuff)

If someone could take a look at the blender code, It would really be nice.
BTW I remembered that I had uploaded the fisherman_paddling animation. If you guys want to give it a run to try the code, please be my guest. (As I can't try, since i'm not home.)

Attached File  Fisherman-test.zip   211.89KB   65 downloads
  • 0
Daniel Schubert [ aka Gen.Kenobi]

Wildfire Games 3d Artist
Contact me: daniel[at]wildfiregames.com



Posted Image
Visit Revora Creative Network! : )

#48 Mythos_Ruler

Mythos_Ruler

    Senator

  • WFG Retired
  • 14,967 posts

Posted 22 January 2012 - 07:36 PM

I think capturable siege would be better suited to a game like Rome Total War. There's just too much going on at one time in 0 A.D. to have to worry about capturing rams and such.
  • 0

#49 Wijitmaker

Wijitmaker

    0 A.D. Old Timer

  • WFG Retired
  • 9,552 posts

Posted 23 January 2012 - 01:36 AM

But since I'm not at home, I can't try to get an animation ingame. So I'll post the code here, if anyone could try it and see if it works, it would be really nice.

Try exporting a .dae file and I think it could be used to read the names of the hierarchy structure as the .dae file sees it.
  • 0

Jason Bishop [ aka Wijitmaker ]

0 A.D. Founder

Contact me: jason@wildfiregames.com


#50 Wijitmaker

Wijitmaker

    0 A.D. Old Timer

  • WFG Retired
  • 9,552 posts

Posted 23 January 2012 - 04:18 AM

Ok, I've got Max working finally!

Note to self: Thanks to this link - http://forums.cgsoci...p/t-247858.html

So, this is what an imported skeleton should look something like. I've included the geometry points for reference.

Attached File  skeleton_export.zip   28.53KB   64 downloads

Does this help?

I see blender has the ability to export a .fbx file? Is it capable of opening one as well?
  • 0

Jason Bishop [ aka Wijitmaker ]

0 A.D. Founder

Contact me: jason@wildfiregames.com


#51 Gen.Kenobi

Gen.Kenobi

    Centurio

  • WFG Retired
  • 714 posts

Posted 23 January 2012 - 04:06 PM

Hey Jason... It didn't help, as .obj doesn't seen works with bones (or skeletons) - I got several cubes, and no bones to work with.

I'm attaching the .dae file. Could see if it works ingame? I don't have enought hardware here with me to try this :/ (i only get home on friday, but i really would like to see if the rigs is finally working, so i can start working in new animations ;) )

Attached File  fisherman.dae.zip   32.45KB   96 downloads
  • 0
Daniel Schubert [ aka Gen.Kenobi]

Wildfire Games 3d Artist
Contact me: daniel[at]wildfiregames.com



Posted Image
Visit Revora Creative Network! : )

#52 Wijitmaker

Wijitmaker

    0 A.D. Old Timer

  • WFG Retired
  • 9,552 posts

Posted 23 January 2012 - 04:50 PM

I thought maybe the cubes would show you where the bone's joints should be located, and their size. I'll check out the .dae when I get home from work.

Can a blender user answer the .FBX question? That could be a great format to transfer animation between Max and Blender.
  • 0

Jason Bishop [ aka Wijitmaker ]

0 A.D. Founder

Contact me: jason@wildfiregames.com


#53 Pureon

Pureon

    Primus Pilus

  • 0 A.D. Art Team
  • 3,651 posts

Posted 23 January 2012 - 07:01 PM

Can a blender user answer the .FBX question?

Not really no. AFAIK best way to get 3DS Max animations into the latest Blender is using BVH format - although the mesh can be transfered using dae/obj
  • 0

Pureon
0 A.D. Part time Designer / Texturer / 3D Artist
Contact email:
pureon{@}wildfiregames.com


#54 Wijitmaker

Wijitmaker

    0 A.D. Old Timer

  • WFG Retired
  • 9,552 posts

Posted 23 January 2012 - 07:53 PM

Ok, perhaps I can get the animation out as a .bvh file. This is generally a motion capture file type that is generated by some sort of motion capture device. Max takes that data and turns it into a .bip file, and that is what Character Studio uses as it's animation format.

FYI there is a lot of .bvh files in our repository for you blender users to play with: http://trac.wildfire...n/resources/bvh

I'll see if I can get an export of a .bvh from max to blender with some sort of script (or tools, I think there must be something out there on the web for this).
  • 0

Jason Bishop [ aka Wijitmaker ]

0 A.D. Founder

Contact me: jason@wildfiregames.com


#55 Gen.Kenobi

Gen.Kenobi

    Centurio

  • WFG Retired
  • 714 posts

Posted 23 January 2012 - 08:26 PM

Hmm...

The issue wasn't with us trying to get the skeletons.xml script to get a blender version for the game-ready armature?
I guess I'm just lost here. :P My point was to get animations from Blender into the Game.
Or we're going to use the same max codes (for ingame armatures) for blender via exporting/importing animations?

Wouldn't be better to create a more straightfoward approach for blender users? It could really make modding more simple for the future users and modders.

I don't know :P Sorry I just got lost and confused here.
  • 0
Daniel Schubert [ aka Gen.Kenobi]

Wildfire Games 3d Artist
Contact me: daniel[at]wildfiregames.com



Posted Image
Visit Revora Creative Network! : )

#56 Wijitmaker

Wijitmaker

    0 A.D. Old Timer

  • WFG Retired
  • 9,552 posts

Posted 23 January 2012 - 09:27 PM

No worries. My point is not just to get animations from blender into the game, but to make them compatible with the existing human biped model and animations so that everything is shared and can be used by any person with a variety of software (Max, Maya, Blender, XSI, etc...).

Getting any old animation into the game from blender shouldn't be hard Pureon has done that many times - it is getting it to be cross compatible which is trickier.

It would be foolish to start creating a whole new batch of unique humanoid animations that are using a blender specific model. Unless this team thinks it has the resources to replace all the existing animations an models to make it common.
  • 0

Jason Bishop [ aka Wijitmaker ]

0 A.D. Founder

Contact me: jason@wildfiregames.com


#57 Wijitmaker

Wijitmaker

    0 A.D. Old Timer

  • WFG Retired
  • 9,552 posts

Posted 24 January 2012 - 04:28 AM

I took a look at the .dae file and I think this is your heirarchy. I haven't broken it down, but I think you can parse it out to structure it to fit the format of the skeleton.xml file:

Spoiler

  • 0

Jason Bishop [ aka Wijitmaker ]

0 A.D. Founder

Contact me: jason@wildfiregames.com


#58 Gen.Kenobi

Gen.Kenobi

    Centurio

  • WFG Retired
  • 714 posts

Posted 24 January 2012 - 02:09 PM

Yeah, but i guess the main issue with this code(or hierarchy or rig) is that it has several different bones that does different things - there's the DEF bones, the MCH, the ORG ones. I don't know if the game supports the IK/FK solvers. And I also have no clue from where to start to parse this into the skeletons.xml file. It's quite confusing for me. :(

I feel like a blind men lost in the middle of a firefight.
  • 0
Daniel Schubert [ aka Gen.Kenobi]

Wildfire Games 3d Artist
Contact me: daniel[at]wildfiregames.com



Posted Image
Visit Revora Creative Network! : )

#59 historic_bruno

historic_bruno

    Primus Pilus

  • WFG Programming Team
  • 2,463 posts

Posted 25 January 2012 - 12:38 AM

Yeah, but i guess the main issue with this code(or hierarchy or rig) is that it has several different bones that does different things - there's the DEF bones, the MCH, the ORG ones. I don't know if the game supports the IK/FK solvers. And I also have no clue from where to start to parse this into the skeletons.xml file. It's quite confusing for me. :(

Looks like the DEF bones are the ones that are important (since they're the only ones listed as joints in the inverse bind pose array, around line 1086). As far as I know, animations made with that rig will only animate those bones.

Someone can correct me if I'm wrong, but basically: all the rigs used in the game have a <standard_skeleton> entry which lists the bones actually used by the game. Then they have one or more <skeleton> entries, each one maps a different set of bone names and hierarchies back to the original <standard_skeleton>. This lets us have multiple differently named and structured rigs mapped back to a single standard one, for instance there could be one set for Max, one for Blender, one for Maya, etc. When a COLLADA file is imported into the game, it looks up the bone names and tries to find a matching skeleton or throws an error if there's no match.

So if you can map your rig to the standard biped, that would be the best route so we have interoperability between existing animations and models. As far as how to do that, it seems like if you don't give a <target> entry for a bone in a given <skeleton>, then it will coalesce into its parent, so maybe it would work if you can only list <target> for the important DEF bones. You need 29 bones (including root) to be compatible with existing bipeds. I don't know if it will work even if you do that, I guess it depends on how robust our version of FCollada is and how good Blender's exporter is...
  • 0
Ben Brian [ aka historic_bruno ]

Wildfire Games Programmer
Contact me: ben [at] wildfiregames [dot] com

#60 Wijitmaker

Wijitmaker

    0 A.D. Old Timer

  • WFG Retired
  • 9,552 posts

Posted 25 January 2012 - 05:44 AM

I can't get my dreamweaver to load... that is the tool I would use to go through and delete (find/replace) out all the attribute / element junk that isn't needed.

Ben your right on (y)

Daniel, please bear with me and my computer issues.
  • 0

Jason Bishop [ aka Wijitmaker ]

0 A.D. Founder

Contact me: jason@wildfiregames.com




Reply to this topic