Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 2013-11-21 in Posts

  1. An updated version of this guide is available on the Wiki. Introduction This is a guide covering how to export and set up animation files from Blender3D into 0AD as well as some tips and general guidelines for get the animations working in 0AD. The Blender3D version used for this guide is 2.65a newer versions might have problems with the Collada exporter. Last blender version (2.69) works fine for exporting animations. Animations have three main requeriments in order to get them working in 0AD. These are: 1.- The file with the mesh and armature (COLLADA file) 2.- The file(s) with the different animations of the armature (COLLADA file(s)) 3.- The file XML defining the armature (called skeleton in 0AD) with its bones names and hierarchy. The last step is to specify the animations that the unit will have available on its different states in the XML actor file of the unit (i.e. Walk, run, death, idle...) Rig setup: When setting up the rig to animate your mesh, there are a lot of options to configure it to make the animator's life easier and achieve good results with less effort. Sadly, there are some limitations in how much animation and skeleton data the COLLADA format can export. Here are some points to keep in mind when configuring your rig to make animations for 0AD: -Avoid disabling "inherit rotation" in bones. While it's a very nice blender feature, when exporting your animation the bones that have their inherit rotation checkbox disabled end up inheriting their parent's rotation, plus the extra rotation you add in the animation resulting in weird and undesired behaviours. There's a tricky workaround for this, which is creating a helper bone which the bone that you don't want to rotate will copy its rotation. -Make sure the rig have the correct scale, and has its scale applied before start animating. Resizing your rig and/or mesh and applying its new scale before baking the animation may end up messing the animations you may already have, specially if you have any IK (Inverse Kinematics) setup in your rig. Here's a workaround that may or may not work: -Scale to the correct size the mesh+armature file and re-export it. -Export the baked animation(s) to dae with their incorrect size, but correct animation. -Import them back into blender, scale them correctly, and export them back without applying the scale one by one. -Mark the "Clear Constraints" checkbox when baking an action if you use any IK or constraint. Specially if you use constraints like "copy rotation" and "copy location". Once the action is baked without "Clear Constraints", it may appear in blender that it worked fine, but it will not when exported to collada format. -Save your .blend file before exporting. You will lose your rig constraints when baking the animation, plus importing collada animation files back to blender is not working propperly to date (11/24/2013). Because of this, if you want to tweak an animation, or use the same skeleton/rig to create a new one, the only way to do it right now is using the .blend file. In this guilde, we're going to set up the animations for a wild animal unit "Tiger" that will be controlled by the IA "Gaia". 1.- Export the .DAE file with the armature In this step, we're going to use Blender3D to create the first main file needed for the unit's animation. This file tells the engine the relationship between the bones and the mesh. Before this step, you should create in Blender3D the armature (skeleton from now on), and the mesh that is going to use it, apply the skeleton to the mesh and tweak the vertex wheights that each bone will move (this is not covered in this tutorial). Before exporting the mesh and the armature, you should make sure that both objects are centered in the origin point of the scene and both object's origin points locations match. To move the object's origin points to the scene origin point (coordinates 0,0,0) first use "SHIFT+C" this will make your 3D cursor to center into the scene origin, then select the mesh and the skeleton with rightclick and shift rightclick and use "CTRL+ALT+SHIFT+C", in the pop-up menu select "Origin to 3D cursor". Now make sure you remove from the "action editor" any action currently used by the skeleton (if any) and move the timeline back to the first frame if it isn't there. [1b – Optional image removing the action editor's action] Also make sure your skeleton is in the default pose (also called resting pose). To do this, select the skeleton, use "CTRL+TAB" to enter pose mode, hit "A" to select all bones and use "ALT+G", "ALT+R" and "ALT+S" to reset the bone's position, rotation and scale, this will put the armature in it's resting pose. Now we're ready to export the mesh and skeleton. Make sure there's nothing else in the blender scene other than the armature and mesh (remove lights, other meshes, helpers/empties...). In "Object Mode" select the mesh first with rightclick and then the armature with "shift+rightclick" (the order is important) then go to the menu in the top of the screen and use "File --> export -- > Collada (Default) (.dae)" Navigate to the folder where you want the file to be created, name the file and hit enter or click Export. *Note: These "mesh+armature" files are stored in \0AD\binaries\data\mods\public\art\meshes\skeletal\ 2.- Export the .DAE file animations In Blender3D, you have to use the "action editor" to create the different actions (or animations) that you want to export into 0AD to use them. These actions are usually: walk, run, idle, attack, and death, but you can make variations of each one or make more types of actions if desired. This tutorial do not cover how to animate in Blender3D but I'll give you links to animation tutorials and tips for the animations at the end of it. 2.1- Bake the action to keyframes In 3D animation software, you animate inserting keyframes or "posing" your skeleton along a timeline, and then the software computes the space between keyframes with intermediate poses which makes the movement motion. The closer one keyframed pose is to another, the quicker the motion will be from one pose to another, and the further the keyframed pose is to another, the slower the motion will be. To make an animation file readable for 0AD, you have to bake the action into keyframes in Blender. This is the process of creating a keyframe for each frame if a bone has changed its position from the previous frame. This is done automatically by Blender3D when baking the action. To bake an action into keyframes, first select the action to bake in the action editor, then adjust the "start frame" and "end frame" on the timeline to match the action length. After that, select the skeleton, enter in pose mode with "CTRL+TAB" and select all bones with "A". Once you have selected all bones, move the mouse cursor into the 3D viewport, hit "space" to bring the search option menu and type "bake action" then select "Bake Action" in the menu. A menu for the "Bake Action" option will emerge, uncheck "Only Selected" checkbox, !and check "Clear Constraints" checkbox (specially if you use IK and/or constraints) and click OK This will automatically insert keyframes between the poses you used to animate. 2.2- Export the animation .DAE file This is the same process as the first point. This will create the file containing the actual animation that will be played in 0AD's engine. Switch from pose mode to edit mode with "CTRL+TAB" select the mesh first with rightclick, then the armature with shift+rightclick, go to "File --> export -- > Collada (Default) (.dae)" Navigate to the folder where you want the file to be created, name the file and hit enter or click Export. *Note: These animation files are stored in \0AD\binaries\data\mods\public\art\animation\"unit type"\ **Note2!!: Units with different meshes but same skeletons can share these animation files and use it even if the animation files have been exported with different meshes. However, each unit needs to have its own "mesh+skeleton" .dae file that we have created in the first step. Repeat 2.1 and 2.2 for each animation of the unit and name them accordingly (i.e. tiger_walk, tiger_death, tiger_idle_01, etc...) 3.- Create the XML file defining the skeleton 0AD needs a .XML file to define the skeleton's name, bone hierarchy and bones' names. These skeleton .XML files are located in "\0AD\binaries\data\mods\public\art\skeletons\" You'll need one skeleton .XML file for each different skeleton you want to use in 0AD. The easiest way to set up one, is to open an existing file and modify it with the information of the new skeleton you want to add and save it as a new file. You can open .XML files with any text editor software. I recommend notepad++ to do so (personal preference). This is an example of the syntax that you need to use to setup the file correctly: Note how each child bone is defined under its parent bone line before closing the parent's bone definition with "</bone>" The RootBone is the bone in the armature that controls every other bone in it. Note: If you have any bone name in the skeleton containing a dot "." you have to use an underscore "_" in this file instead when writing the bone's name. To know the hierarchy of your skeleton, you can use the outliner window in Blender3D and expand the armature contents. There you can see which is your root bone, and the childs of each one of them. Once you have completed setting up the file, use "save as" and save the .xml file with an appropiate name in the folder specified at the beginning of this section. -Specifiying the animations for the unit in its actor Every unit (or entity) in 0AD has it's own .XML file which contains information that tells the engine different properties of that entity. These files are called actors. Some properties that contains these actor files are: -Mesh: the mesh that will be displayed in the engine for that entity or unit. -Prop(s): Actors can be used within other actors. They're called props. You need an empty/helper/bone with its name starting with "prop-" to specify where you want the actor to be shown. -Variants : These are possible variants of a unit (used for unit diversity) as well as states that a unit may have. -Texture(s): The texture or textures that the mesh will use. -Animation(s): Animations that the unit or entity can use and the variant/state associated with that animation. Animations in the actor files are normally specified just before the <mesh> tag in the following format: The <animation> tags in this example include the location and filename of the animation (created in section 2), the name of the variant/state that will use that animation specified by "name=", and the speed that the animation will play. The animation speed gives you control over the speed that the animation will play independiently of the speed it had when exported from Blender3D. Loading and hiding props during an animation: There's a special case for animations where you can load prop's actors and make them dissapear during the animation. The first animation specified in the example with the variant name "Build" uses this case. You specify with fractional numbers when the prop will show up with "load=" and when it will dissapear with "event=" during the animation. The number "0" means the start of the animation and "1" the end of it. The variants are normally specified after the textures in the actors. Here's the variant definition of "Build" from the previous example: In this example the actor "wood_1_a.xml" is going to be loaded at 25% of the duration of the build animation, and it will dissapear at 75%. You specify where the prop actor will be placed with "attachpoint=" . The attachpoint value needs to be the name of a bone, but it is mandatory that the bone name starts with "prop-". When you specify the prop-bone name you ommit the "prop-" part of the name, but if it's declared in a variant that is going to use "load=" and "event=" you have to start the name of the prop-bone with "loaded-" (in this example, the bone's where the actor is going to appear is "prop-beam". Note*: For static meshes without skeleton, you can use empties parented to the mesh with the name prefix of "prop-". You can later use this empty location to spawn an actor on it's place when defining the props between the <prop> tags right after the <mesh> definition in the actor file. 2015 Edit: - Blender collada export now works better and there's no need to bake the animations even if using IK setups. This reduces considerably the size of the animation collada file. - In order to get clean loops in pyrogenesis, you have to export including the first and last keyframe of the loop. In theory, it is the same keyframe and should be avoided, but the engine needs this duplicated keyframe. In resume: export the first and last keyframe in the animation loop to get a clean looping animation. - Blender now supports "clean channels" option when selecting keyframe channels and deletes the keyframes that do not add anything new to the animation. This reduces the size of the animation file without altering the animation at all. Just select all keyframes in the action editor, hit "X" and select "clean channels" Rigging Tutorials: http://vimeo.com/30073532 http://vimeo.com/30072564 http://vimeo.com/30078317 Animation Tutorials: http://www.cgmasters.net/free-tutorials/epic-looping-idles/ http://cgcookie.com/blender/2011/08/22/animating-a-character-picking-up-an-object/ Import/export 0AD assets and AO baking: http://www.wildfiregames.com/forum/index.php?showtopic=17542&p=273078
    2 points
  2. Hello everyone ! I just posted a new version of the patch on the Trac, to correct all the hardcoded stuff. I decided not to change anything about the number of levels. Currently one can increase the alert level, up to two levels. The first garrisons female citizens, the second all the units. I did decide this because the ideas of two separate switches / several levels of alert are incompatible. Moreover : -> The aim of this new version was to generalize the code, and only two buttons can fit in the UI. With N switches with any N, this is impossible to handle. Here only two buttons are needed (ie. increase level of alert and reset), for any number of levels. -> I was definitely convinced by many of you, who reject automatic micromanagement. The ones who wanted a unique button still can toggle the button to the maximum level to garrison everyone in the closest building. -> If the programming team wants to change level 1 to "garrison citizen soldiers", it's now up to them, my new code allows it. Thanks for participating to the topic !
    2 points
  3. personally, i think that the best choice for an Arabic faction would be the Himyars, who lived in what is now Yemen and weren't subject to conquest by the major powers of the era; iirc, they lived during the timespan that would be covered in Part 2. they could also include some content based on Iram of the Pillars, the "Atlantis of the Sands" which supposedly existed during the same period the best choice, in that case, would be to have at least one Amerindian faction (such as the Mayans) and include some scenarios/random maps which are set in the native land of those natives in which an Old World faction like the Romans are very clearly out of place, going on the supposition of ancient colonists. there are already some map specs which go for hypothetical settings, such as Equatorial Africa, the Arctic Circle, and a Macedonian colony in the Himalayas and the Yamato dynasty i mean, if the Chinese would ever be included, it woud be a shame to leave out the Japanese even if they woud be from long before the famous Feudal Era
    2 points
  4. Thank you guys, glad you like them Yes, that's true. I've barely done any animation work before other than some basic tests. I had knowledge about the basics which I've been improving lately since Zaggy became inactive... (we also needed someone in the team with animation experience to help newcomers and make some documentation so...) Hehe, yes. I've lived with cats for a very long time . I agree with you and GunChleoc, the portion of the yawn needs to be a little longer. Easy fix I hope these animations can be reused for the different big felines we want to have in the game (lion, lioness, cheetah...) Lions' meshes would be really nice to be updated, so, if Micket is reading this and is on the mood, you are invited to do more awesome animal models
    2 points
  5. No, I can't commit, but my patch is ready. Even if the team accepts it, we need the icons to commit the feature on the svn.
    1 point
  6. Ideas for peace scenes: Plowing fields, harvesting wheat, wood chopping, people tending to livestock in the corral, chickens running around and kids chasing them, etc.Construction work, especially of monuments, but houses are also okay.Celebration at temple, animal sacrifice, drinking and dancing. Priests presiding over the whole affair.Ancient marketplace scene: Livestock, fish, fruit, vegetables, fabric, ivory, amphoras and other pottery. People haggling animatedly and gesturing numbers with their fingers. (No anachronisms like tomatoes, please.)Trade at docks: Merchants, dock workers lugging around heavy stuff, etc. Ships and wharves in the background. More animated haggling, people signing contracts.The arts: Sculpture, metalworking, pottery, music, theater etc.Hellenes: View of Athens from the acropolis or vice versa.Ideas for war scenes: Battle scenes: Open battlegrounds, siege warfare etc.Unique formations: Phalanx and testudo.Particular generals and campaigns (e.g. Hannibal and the elephants in the Alps).Night scene: Soldiers at their camp drinking wine around a fire. Loot is seen in the background.Roman victory procession with loot and prisoners.Military training of boys with wooden swords and shields and such.Celts: Warriors applying woad.
    1 point
  7. Hi guys, sorry for delay of my work, but the employment take me lot of time and there is no time to finish work. This weekend will be finally time to accomplish all what has been started. Just to show you some work in progress, i upload this. Thanks for your patience my friends.
    1 point
  8. Died you try to relaunch 0ad after that? And your Desktop looks very much like OS X, you're sure you use Vista and not a mac and try to Launch 0ad with wine? If you use some customized desktop, that could be the Problem. I have no experience with such themes, so I cannot say much about them.
    1 point
  9. How about an other idle animation sleeping after all conserving energy is a prime feline behaviour Enjoy the Choice
    1 point
  10. We really should store the original blender files in SVN somewhere like we store the uncompressed audio files.
    1 point
  11. Greycat, I hope I bring you good news! S.Rieckhoff "Süddeutschland im Spannungsfeld von Kelten, Germanen und Römern, Studien zur Chronologie der Spätlatènezeit im südlichen Mitteleuropa." 1995 I don't have the book, but I will try and translate some bit found on the Internet. At first glance, she tried and differentiate Germanic people in the Danubian area according to the pottery.
    1 point
  12. There is actually a theory about a Stone-Age small group migrating by chance to Northern America during the last Ice Age (through "coastal" navigation from Ireland, like modern Inuits could do). This theory was build on the account some stone tools found in America are very similar to those of the Solutrean culture: http://en.wikipedia.org/wiki/Solutrean You could have a look at this: http://en.wikipedia.org/wiki/Solutrean_hypothesis but I fear the redactors there are excessive. Imho, the theory isn't really meant to dismiss the Beringian hypothesis, just to explain a cultural influence. But all of that is far beyond the scope of this game.
    1 point
  13. Leonidas, prueba por favor este motor de traducción en línea gratuita. Lo encuentro práctico y bastante preciso. http://www.reverso.net/text_translation.aspx?lang=ES Puedes fácilmente someter a un test una retro-traducción para arreglar el texto original. Y nada te impide utilizar también a un traductor analógico como Bing. Pero nunca trates de retro-traducir con este último.
    1 point
  14. Include japanese culture can be great Hit with users you know how many fans of Japanese are in games and entreteiment media. Yeah I like Yamato from AOM but I know too little from Far Asian Cultures. Sorry I was write incluye instead in include.
    1 point
  15. i Would really like to see bridges, at very least for scenario design purposes besides tha fake terrain based bridges. And destroyable too. About roads i think this could be on hold until the AI for the pathfinding works properly, but buildable-destroyable bridges should definitelly be in the game.
    1 point
  16. It's a wannabe "japanese-hipster-artistically-profound" film (cuz hipster movies are not movies but "films") that is so weird and messed up that is actually funny. Its so stereotipically hipster that even has old fashioned plastic record discs. The first hour is a little bit boring but it gets much better after that.
    1 point
  17. Well, this is not true. This is a side effect of the name chosen, but it is not a reason why the game is named that way.
    1 point
  18. it's my understanding (and hope) that Part 2 will really be more like an expansion pack than a separate game entirely
    1 point
  19. Yo también soy de México, de Cancún Quintana Roo. Suscríbete a la página de facebook de 0 AD en español es muy buena.
    1 point
  20. One more Idle animation to go. Texture flickering in some animations is due to the fact that the mesh is not converted into triangles yet. Animations speed can be modified on the actor .xml to fit our needs.
    1 point
  21. There are already food trees and bushes just no game mechanism to plant them there has been some discussion on having berries and such growing back after you strip them but that has not been implemented. Enjoy the Choice
    1 point
  22. He is proposing a whole faction based in this. XD nice to see other Latin American, here in our countries are many fans about RTS games especially AoK.Are a things the relationships between cultures left behind, and is the knowledge. But I don't see native Americans with Lorica Segmentata, Trirremes, Horses, metalworking to make weapons, Forts and defense sentries, even some tactical of guerrilla.
    1 point
  23. I say this in June or before in this year before Alpha 14.
    1 point
  24. There weren't any "Slovakians" in the area then - it's just the same geographical area as modern Slovakia, but the tribes there were Germanic.
    1 point
  25. Here's a little test for an attack animation. Probably not going to be used, because it takes more time positioning than attacking. I think a simple paw swipe or a simpler motion may work better.
    1 point
  26. Art for Artist CC 3.0 by Lion Kanzen https://dl-web.dropbox.com/get/0%20aD%20mod/loba%20CAPITOLIA.ai?w=AABM4jAPs6wgXdZJeejis-oCvlgpHilV_fESgsXGe01bzg
    1 point
  27. 1 point
  28. Really nice model. I hope you like the texture: Source: http://commons.wikimedia.org/wiki/File:Panthera_tigris_tigris.jpg
    1 point
  29. It looks like my cat in low poly without the winged whiskers! Good job! I love your animals! Keep it up!
    1 point
×
×
  • Create New...