Splizard Posted July 9, 2018 Report Share Posted July 9, 2018 I am trying to figure out how to change the scale of an animated actor. It doesn't appear to be a moddable feature, so I have been modifying the .dae files in order to attempt to accomplish this. For static actors (such as buildings), the scale can be adjusted either by adjusting the scale tag in the Collada file. <scale sid="scale">1 1 1</scale> The other option I took was to write a program that manually scales all the vertices of the model and saves this back to the .dae model. Unfortunately, both of these options did not work for scaling animated actors whose proportions were all messed up... (Big or Small) I am not so familiar with Collada or how animations are stored. Could anyone point me in the right direction on how to accomplish something like this? (do I need to scale the armatures/transformations/weights etc) Blender did not work very well for me either... I am really looking for a way to automate this, as I would like to create an actor editor for 0ad with this kind of feature. Thanks! 3 Quote Link to comment Share on other sites More sharing options...
Stan` Posted July 9, 2018 Report Share Posted July 9, 2018 Maybe the scale modifiier is not 1.1.1 for all meshes ? Quote Link to comment Share on other sites More sharing options...
Splizard Posted July 9, 2018 Author Report Share Posted July 9, 2018 1 hour ago, stanislas69 said: Maybe the scale modifiier is not 1.1.1 for all meshes ? Changing the scale ratios does have an effect to some extent, however, it does not appear to resolve the proportion issue (I'm not talking to about the head though, which is a separate actor which I have not scaled). The model is scaled to the correct height but it seems like everything is stretched when made taller and everything is squashed when made smaller. Quote Link to comment Share on other sites More sharing options...
Stan` Posted July 9, 2018 Report Share Posted July 9, 2018 15 minutes ago, Splizard said: Changing the scale ratios does have an effect to some extent, however, it does not appear to resolve the proportion issue (I'm not talking to about the head though, which is a separate actor which I have not scaled). The model is scaled to the correct height but it seems like everything is stretched when made taller and everything is squashed when made smaller. Could you share your script ? Maybe the way the coordinates are scripted makes them relative to the scale factor, hence giving you the strange effects. Quote Link to comment Share on other sites More sharing options...
Splizard Posted July 9, 2018 Author Report Share Posted July 9, 2018 11 minutes ago, stanislas69 said: Could you share your script ? Maybe the way the coordinates are scripted makes them relative to the scale factor, hence giving you the strange effects. So I have currently modified the scale tags in a few of the female citizen models.https://github.com/0ad/0ad/blob/master/binaries/data/mods/public/art/animation/biped/new/fem_walk_relax.daehttps://github.com/0ad/0ad/blob/master/binaries/data/mods/public/art/meshes/skeletal/new/f_dress.dae I have played around with the values (eg. all being the same value, or trying different values). The snippets are below. fem_walk_relax.dae <node id="Armature" name="Armature" type="NODE"> ... <scale sid="scale">0.75 0.01 0.5</scale> <node id="m_armor_tunic_short" name="m_armor_tunic_short" type="NODE"> ... <scale sid="scale">0.1 0.01 0.5</scale> f_dress.dae: <node id="f_dress" name="f_dress" type="NODE"> ... <scale sid="scale">0.1 0.25 0.5</scale> <node id="Armature" name="Armature" type="NODE"> ... <scale sid="scale">0.1 0.25 0.5</scale> As far as a script goes, it simply multiplies every number in the "mesh-positions-array" with the scaling factor and then saves the file again. This may be the wrong way to go about it, however, it has worked with static meshes. Quote Link to comment Share on other sites More sharing options...
aeonios Posted July 9, 2018 Report Share Posted July 9, 2018 Scaling for 3D models has to be done around a reference point. Since models aren't spheres they may have odd types of symmetry so a naive scaling algorithm is certain to fail. I'd suggest using a program specifically designed for working with 3D models to do the scaling with, like wings3D or blender. Those programs have better facilities for managing scaling to make it easier and to allow you to see what you're doing. 1 Quote Link to comment Share on other sites More sharing options...
Stan` Posted July 9, 2018 Report Share Posted July 9, 2018 I guess in this case it's just that the reference point is not the origin because someone forgot to set it. Which is why you get those weird results. Quote Link to comment Share on other sites More sharing options...
coworotel Posted July 9, 2018 Report Share Posted July 9, 2018 15 minutes ago, aeonios said: I'd suggest using a program specifically designed for working with 3D models to do the scaling with, like wings3D or blender. I remember the editor of Warcraft III allowing you to scale animated units though. There was a parameter you could set like "scale", just one number, and the corresponding unit would be scalled correctly in proportion. 1 1 Quote Link to comment Share on other sites More sharing options...
Nescio Posted July 9, 2018 Report Share Posted July 9, 2018 AoM also had a single scale factor, if I recall correctly. 1 Quote Link to comment Share on other sites More sharing options...
Splizard Posted July 10, 2018 Author Report Share Posted July 10, 2018 It would be fantastic if anyone who is familiar with the 0ad Modelling process were to provide me with a working .dae model of one of the "Athenian Citizen" animations scaled exactly in half. With this reference, I should be able to reverse engineer a programmable way of scaling the animation! Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted July 10, 2018 Report Share Posted July 10, 2018 3 minutes ago, Splizard said: It would be fantastic if anyone who is familiar with the 0ad Modelling process were to provide me with a working .dae model of one of the "Athenian Citizen" animations scaled exactly in half. With this reference, I should be able to reverse engineer a programmable way of scaling the animation! @stanislas69 Quote Link to comment Share on other sites More sharing options...
Stan` Posted July 10, 2018 Report Share Posted July 10, 2018 26 minutes ago, Splizard said: It would be fantastic if anyone who is familiar with the 0ad Modelling process were to provide me with a working .dae model of one of the "Athenian Citizen" animations scaled exactly in half. With this reference, I should be able to reverse engineer a programmable way of scaling the animation! Could do for one of two but more would be too much work. There are more than 50 anims. Quote Link to comment Share on other sites More sharing options...
Splizard Posted July 11, 2018 Author Report Share Posted July 11, 2018 9 hours ago, stanislas69 said: Could do for one of two but more would be too much work. There are more than 50 anims. Just one working animation is fine Quote Link to comment Share on other sites More sharing options...
Alexandermb Posted July 11, 2018 Report Share Posted July 11, 2018 22 hours ago, stanislas69 said: Could do for one of two but more would be too much work. There are more than 50 anims. you can give him the link to art repo with latest working infantry animation wich is already included in the blend with al meshes and almost all animations. 1 Quote Link to comment Share on other sites More sharing options...
Stan` Posted July 11, 2018 Report Share Posted July 11, 2018 That's right. @Splizard have you seen the file there ?https://trac.wildfiregames.com/browser/art_source/trunk/art/meshes and animations/skeletal/animations_and_meshes_mainfile.blend Quote Link to comment Share on other sites More sharing options...
coworotel Posted July 11, 2018 Report Share Posted July 11, 2018 That stretched woman looks really creepy 1 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.