Alexandermb Posted May 19, 2019 Report Share Posted May 19, 2019 Hello 0.A.D. Community, i open this task for have a log and a workplace for an important fix of the game units meshes. The problem was reported by @fatherbushido: Spoiler 1) we need to delete meshes/skeletal/new/armor/ folder and change the ref in binaries/data/mods/public/art/actors/units/ptolemies/hero_elephantry_ptolemy_I_r.xml and binaries/data/mods/public/art/actors/units/seleucids/elephantry_c_r.xml 2) the big one, there is 3 duplicated vertices groups in meshes (spine, chest, neck): so 45 instead of 42. We need to removed them and export again all "new" meshes and anims (it makes 0ad crash in debug mode) 3) we need to use the good blend source (not the old one) to export again the anims So this is a new space for re-export ALL the infantry animations once again for avoid having problems in any future. The animations will be show with the next schema: Red: Need to exportGreen: ExportedYellow: New Addition Categories: Gathering Swordsman Spearman Archer Javelinist Crossbowman Halberd/2H Axe Claymore/2H Sword Civilian ... I theres a desired animation add it in this topic so i'll add it to the list. I will made a github repository for keep all the animations in there since i'm constantly moving from my home to another place for always keep a backup and also let the community use the files if theres a new adition. Space reserved for the animation list. 2 Quote Link to comment Share on other sites More sharing options...
Stan` Posted May 20, 2019 Report Share Posted May 20, 2019 @Alexandermb let me know how I can help. I don't know about @LordGood but I think this should be fixed for A24 and highpriority. The art shouldn't make the game crash even in debug mode. 1 Quote Link to comment Share on other sites More sharing options...
Alexandermb Posted May 20, 2019 Author Report Share Posted May 20, 2019 5 hours ago, Stan` said: @Alexandermb let me know how I can help. I don't know about @LordGood but I think this should be fixed for A24 and highpriority. The art shouldn't make the game crash even in debug mode. Most of the work is take back all animations into a new blender file a cleaner one, organize it and export it all over again, including bodies, animations, capes, coifs Copying the animations isn't just import the animations back in the blender file, to copy them we must copy the "Keyframes" from one file, and in the same blender program instance paste them inside the new file. Or could be another way i just thought but haven't tried yet: Since some of the animations are spread by blender files and some of them are kinda annoying to export, Maybe it could work import the animation inside blender, select the mesh and delete the unused 3 extra vertex from the mesh and re export again, Only if it doens't break the animation. Quote Link to comment Share on other sites More sharing options...
Stan` Posted May 20, 2019 Report Share Posted May 20, 2019 2 minutes ago, Alexandermb said: Copying the animations isn't just import the animations back in the blender file, to copy them we must copy the "Keyframes" from one file, and in the same blender program instance paste them inside the new file. Why not use the append menu in Blender and pick the actions you need ? Quote Link to comment Share on other sites More sharing options...
Alexandermb Posted May 20, 2019 Author Report Share Posted May 20, 2019 2 minutes ago, Stan` said: Why not use the append menu in Blender and pick the actions you need ? That also work, i forgot about that Quote Link to comment Share on other sites More sharing options...
Stan` Posted May 20, 2019 Report Share Posted May 20, 2019 2 minutes ago, Alexandermb said: That also work, i forgot about that Should save you about 10 hours Would be nice to have a plugin to export every anim It shouldn't even be hard to write On a side note, I wanted a plugin to do the converse, to import a given actor XML file in Blender, so that we could test how it looks in Godot for Instance, since there is a direct export plugin now I started writing the script, but I don't think I'll finish it any time soon. Quote Link to comment Share on other sites More sharing options...
Alexandermb Posted May 20, 2019 Author Report Share Posted May 20, 2019 Remember Blender 2.80 only need to export whitout baking so its easier and faster now. Beside i can save a blender file with some basic assets like Tools, some weapons for animations preview. Quote Link to comment Share on other sites More sharing options...
Stan` Posted May 20, 2019 Report Share Posted May 20, 2019 14 minutes ago, Alexandermb said: Remember Blender 2.80 only need to export whitout baking so its easier and faster now. I never had to bake before, though I didn't use any complex drivers either. 14 minutes ago, Alexandermb said: Beside i can save a blender file with some basic assets like Tools, some weapons for animations preview. I'm currently extracting tools from buildings so they can be used as props later on. Quote Link to comment Share on other sites More sharing options...
Imarok Posted May 20, 2019 Report Share Posted May 20, 2019 21 hours ago, Alexandermb said: I theres a desired animation add it in this topic so i'll add it to the list. A seeding animation would be nice. Then the workers won't build a field by hammering it in the ground anymore. 3 1 Quote Link to comment Share on other sites More sharing options...
Stan` Posted May 20, 2019 Report Share Posted May 20, 2019 3 minutes ago, Imarok said: A seeding animation would be nice. Then the workers won't build a field by hammering it in the ground anymore. Not sure you can choose the building animation for a specific building. The voice for building is the same than for repairing cause it's the same code. Quote Link to comment Share on other sites More sharing options...
Alexandermb Posted May 20, 2019 Author Report Share Posted May 20, 2019 1 hour ago, Imarok said: A seeding animation would be nice. Then the workers won't build a field by hammering it in the ground anymore. Already done, i've been working in some animations and took as example gathering ones (Mostly for recover the practice of bodie animations to start working on this) i have also a Log chopping animation, a new woodcutting, and a foraging/gathering meat. Also, got a stone trowing animation for @wowgetoffyourcellphone made in the file, same as he explained Gather stone from the floor and throw it. 1 Quote Link to comment Share on other sites More sharing options...
Imarok Posted May 20, 2019 Report Share Posted May 20, 2019 1 hour ago, Alexandermb said: Already done, Very nice. Is it already committed? In that case we should change the code so that it is used. Quote Link to comment Share on other sites More sharing options...
Stan` Posted May 20, 2019 Report Share Posted May 20, 2019 10 minutes ago, Imarok said: Very nice. Is it already committed? In that case we should change the code so that it is used. Famous last words. 2 Quote Link to comment Share on other sites More sharing options...
Nescio Posted May 21, 2019 Report Share Posted May 21, 2019 On 5/19/2019 at 7:40 PM, Alexandermb said: So this is a new space for re-export ALL the infantry animations once again for avoid having problems in any future. [...] Categories: Gathering Swordsman Spearman Archer Javelinist Crossbowman Halberd/2H Axe Claymore/2H Sword Civilian ... A pike is handled fundamentally different from a spear: it's so long and unwieldy it requires two hands to fight with. Axe, club, mace, and sabre (single-edged) might share similar hacking animations, I don't know, but true swords (double-edged) could and were used for stabbing and thus require different ones. Furthermore, a two-handed axe is different from a halberd; however, neither existed in Antiquity; the use of two-handed swords is also debatable. Also, slingers? Basically: ranged: bow crossbow javelin sling stone (hand-thrown) ... melee: pike (two-handed) spear (overhand and underhand) dagger (stab) [useful for e.g. archers when secondary attacks are implemented] sword (thrust, slash, hack) machete, sabre, sickle, etc. (slash, hack) axe, club, mace (hack) rhomphaia and falx (two-handed) [Thracian and Dacian] ... 16 hours ago, Alexandermb said: Also, got a stone trowing animation for @wowgetoffyourcellphone made in the file, same as he explained Gather stone from the floor and throw it. A ranged attack for slaves and female citizens? Great! Where can it be found? On 5/19/2019 at 7:40 PM, Alexandermb said: I theres a desired animation add it in this topic so i'll add it to the list. It would be great if fishing boats were able to hunt (e.g. crocodiles, whales), basically: melee attack: stab with spear or trident ranged attack: throw harpoon gather meat: chop at carcass gather fish: cast net Also, crocodiles should be able to move both on land and in the water, so they could use swimming animations. Neither is related to infantry, though, so I apologize if this is the wrong topic to post. Quote Link to comment Share on other sites More sharing options...
Stan` Posted May 21, 2019 Report Share Posted May 21, 2019 8 minutes ago, Nescio said: Also, crocodiles should be able to move both on land and in the water, so they could use swimming animations. Neither is related to infantry, though, so I apologize if this is the wrong topic to post. https://code.wildfiregames.com/D1332 Probably won't get committed though because the performance is too poor. 9 minutes ago, Nescio said: melee attack: stab with spear or trident ranged attack: throw harpoon gather meat: chop at carcass gather fish: cast net Requires #2577 and #252 Quote Link to comment Share on other sites More sharing options...
Imarok Posted May 21, 2019 Report Share Posted May 21, 2019 15 hours ago, Stan` said: Famous last words. About a year ago I wanted to change the code so that it uses a seeding animation for building fields just to discover that we don't have such animation xD 1 1 Quote Link to comment Share on other sites More sharing options...
Nescio Posted May 21, 2019 Report Share Posted May 21, 2019 1 hour ago, Stan` said: Requires #2577 and #252 Not necessarily. Both animations can coexist without having to be used in the same mod. Fishing boats can keep a melee attack in 0 A.D.'s default distribution, but have a ranged attack instead in certain mods. Or they might even be used against different targets, e.g.: <Attack> <Melee> <MaxRange>5</MaxRange> <Pierce>10</Pierce> <RestrictedClasses datatype="tokens">!Shark</RestrictedClasses> </Melee> <Ranged> <MaxRange>20</MaxRange> <Pierce>10</Pierce> <RestrictedClasses datatype="tokens">!Whale</RestrictedClasses> </Ranged> </Attack> Quote Link to comment Share on other sites More sharing options...
Stan` Posted May 21, 2019 Report Share Posted May 21, 2019 11 minutes ago, Nescio said: Not necessarily. Both animations can coexist without having to be used in the same mod. Fishing boats can keep a melee attack in 0 A.D.'s default distribution, but have a ranged attack instead in certain mods. Or they might even be used against different targets, e.g.: I assumed you wanted people on board to switch Quote Link to comment Share on other sites More sharing options...
fatherbushido Posted May 25, 2019 Report Share Posted May 25, 2019 Thanks @Alexandermb for handling that in a pro way ;-) 1 1 Quote Link to comment Share on other sites More sharing options...
Stan` Posted June 1, 2019 Report Share Posted June 1, 2019 Ticket: https://trac.wildfiregames.com/ticket/4460#comment:2 EDIT: Would seem the game doesn't like the gastaphretes unit. 1 Quote Link to comment Share on other sites More sharing options...
Stan` Posted June 18, 2019 Report Share Posted June 18, 2019 Currently done locally. Importing all the unit meshes in the new Blender file. Importing all the capes meshes in the new Blender file. Renaming all sub-meshes to the name of the object instead of cube.00X or other incorrect names Deleting all props vertex groups. Deleting all duplicate vertex groups. Those groups were named spine.001, neck.001, chest.001. Reexporting base (non animated meshes). Checking whether we can only reexport base meshes (Doesn't work). Updating skeleton files using the python script. Switch to meter scale. Added tools Fix broken vertex group Still need to be done Importing all anims from the scattered blend files. Exporting all the anims Cleaning up the anims. backup.1.zip EDIT 1 : Updated backup.2.zip EDIT 2 : Updated backup.3.zip EDIT 3 : Updated @Alexandermb I found a way to reexport animations really fast ! I wrote this little python script you can paste in the Blender console with the latest backup blend: # https://blender.stackexchange.com/questions/41484/how-do-i-change-actions-in-python # https://blender.stackexchange.com/questions/26995/where-is-python-file-for-exporting-dae-collada # https://blender.stackexchange.com/questions/38618/selecting-an-object-via-scripting # https://blenderartists.org/t/deselect-all-command/666535/4 # https://docs.blender.org/api/2.79/bpy.ops.wm.html # https://blenderartists.org/t/set-the-first-and-end-frame-by-script/535050 import bpy # Deselect everything for ob in bpy.context.selected_objects: ob.select_set(state=False) # The armature, and the dummy mesh needed (It has to be parented the armature) armature = bpy.data.objects['Armature'] unit_mesh = bpy.data.objects['m_armor_dress'] armature.select_set(state=True) unit_mesh.select_set(state=True) # For every action that exists in the blend file, export the matching collada. for a in bpy.data.actions: # print(a.name) # Get the current action to be exported armature.animation_data.action = bpy.data.actions.get(a.name) # print(a.frame_range) # We only need to export from the start frame to the end frame bpy.data.scenes[0].frame_start = a.frame_range[0] bpy.data.scenes[0].frame_end = a.frame_range[1] # Export the collada model bpy.ops.wm.collada_export(filepath='D:/Export/' + a.name + '.dae', keep_flat_curves=True, include_all_actions=False, keep_keyframes=True, selected=True, check_existing=False,filter_blender=False,filter_image=False,filter_movie=False,filter_python=False,filter_font=False,filter_sound=False,filter_text=False,filter_btx=False,filter_collada=True,filter_folder=True, limit_precision=True, filemode=8) This will export all the files with their Blender names in a folder called D:/Export. If we manage to rename all the animations to their current name in game it will be a piece of cake. Still need to gather all the animation. Also I tested @fatherbushido those new reexported anims work in Debug mode. 1 Quote Link to comment Share on other sites More sharing options...
fatherbushido Posted June 19, 2019 Report Share Posted June 19, 2019 22 hours ago, Stan` said: Also I tested @fatherbushido those new reexported anims work in Debug mode. Obviously if you removed the 3 duplicated vertex groups. Did you use what AlexanderMB had started? (for those who have issues, .blend are for >=2.80 it seems) 1 Quote Link to comment Share on other sites More sharing options...
Stan` Posted June 19, 2019 Report Share Posted June 19, 2019 5 minutes ago, fatherbushido said: Obviously if you removed the 3 duplicated vertex groups. Sure, but there could have been other issues, like non rigged vertices Just wanted to make sure everything is fine. Also I'm not sure how Enrique managed to duplicate the vertex groups at the first time 6 minutes ago, fatherbushido said: Did you use what AlexanderMB had started? I would have loved to, but he hasn't uploaded anything there https://github.com/AlexanderVzla?tab=repositories 7 minutes ago, fatherbushido said: (for those who have issues, .blend are for >=2.80 it seems) Yeah really sorry about that. Quote Link to comment Share on other sites More sharing options...
fatherbushido Posted June 19, 2019 Report Share Posted June 19, 2019 1 minute ago, Stan` said: Yeah really sorry about that. 2.80 seems really an improvement, so it's better to start with that Quote Link to comment Share on other sites More sharing options...
fatherbushido Posted June 19, 2019 Report Share Posted June 19, 2019 (I'd bend to wait for AlexanderMB though) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.