Making a character creation system

AcetheSuperVillainAcetheSuperVillain Posts: 4Member
in 3D

I'm trying to make a very simple character creation system with different body, outfit and hairdo pieces. I've been trying to export the meshes and armature separately, but this creates a chaotic blob instead of a character:

Does anyone know how I should be doing this?

Answers

  • AcetheSuperVillainAcetheSuperVillain Posts: 4Member

    Oh yeah, also I was under the impression that an armature could use animations from a different armature as long as it had the right bone names, but either this doesn't seem to be the case, or I can't see how to do it. I have the .anim files exported separately, but I can't find a way to add them to an AnimationPlayer.

  • TwistedTwiglegTwistedTwigleg Posts: 902Admin

    I do not think there is any way in Godot 3.0 to remap animations from one model to another (even if you are using .anim files), or if there is a way, I do not know it either. Looking at the issues section on Github (both open and closed), it appears there is no animation remapping right now.

    This may change in Godot 3.1, as there are lots of changes to the animation editor coming. I'm not sure what the best workflow for custom characters would be right now though. You could export each individual part with each armature, and then play the same animation on all the armatures, but I'm not sure how doable that would be, especially if you have a lot of different pieces.

  • aztecsenseiaztecsensei Posts: 71Member
    edited July 2

    looks like your model might have been exported incorrectly? :o
    remember glTF sucks for characters, use better collada instead.
    why dont you try with a more simple model like cube?

  • MagicLordMagicLord Posts: 578Unconfirmed
    edited July 3

    @TwistedTwigleg said:
    I do not think there is any way in Godot 3.0 to remap animations from one model to another (even if you are using .anim files), or if there is a way, I do not know it either. Looking at the issues section on Github (both open and closed), it appears there is no animation remapping right now.

    This may change in Godot 3.1, as there are lots of changes to the animation editor coming. I'm not sure what the best workflow for custom characters would be right now though. You could export each individual part with each armature, and then play the same animation on all the armatures, but I'm not sure how doable that would be, especially if you have a lot of different pieces.

    Animation re targeting does no exist in Godot.

    @AcetheSuperVillain said:
    Does anyone know how I should be doing this?

    Do you use Blender ? what exporter did you tried ?
    Blender uses "better collada" that works fine with animation.
    Upload your file and we can take a look.

  • slapinslapin Posts: 61Member

    In Godot2 there was too many problems in 3d to bother at all.
    In Godot3.1 (git master) there are so many promising tools committed so I would just update.

    For character customization system for Godot to work you will need to export all your meshes parented to skeleton at the same time. Keep bone count low enough (don't know which current limit is), or otherwise you will have problems with animations. All your animations will work. Remember to put blender to 0-th frame or otherwise the result might be corrupted.
    Also you will want to create animations which scale your bones for height/proportions and additional customization.

    Use AnimationTree to set up your animations. That will allow you to save on animations and make process much easier (i.e. root motion). Add your customization animations via Add2/3 node after all animations, this will allow you to customize character.

    Some of your animations will require some particular points in space to be reached by limbs. To fix these you will need to employ IK. To help your IK system you might employ additional animations which bring your limbs in necessary directions and control whole thing via animations (this works best for looking and aiming).
    Hope that helps.

  • slapinslapin Posts: 61Member

    I was not able to friend blend shapes (shape keys) with Godot skeletal animation though. That would make nice addition to character customization though.
    Also if it was possible to bake all that into mesh/skeleton after customization and save on CPU cycles that would be even greater.

  • aztecsenseiaztecsensei Posts: 71Member

    @slapin said:
    In Godot2 there was too many problems in 3d to bother at all.
    In Godot3.1 (git master) there are so many promising tools committed so I would just update.

    For character customization system for Godot to work you will need to export all your meshes parented to skeleton at the same time. Keep bone count low enough (don't know which current limit is), or otherwise you will have problems with animations. All your animations will work. Remember to put blender to 0-th frame or otherwise the result might be corrupted.
    Also you will want to create animations which scale your bones for height/proportions and additional customization.

    Use AnimationTree to set up your animations. That will allow you to save on animations and make process much easier (i.e. root motion). Add your customization animations via Add2/3 node after all animations, this will allow you to customize character.

    Some of your animations will require some particular points in space to be reached by limbs. To fix these you will need to employ IK. To help your IK system you might employ additional animations which bring your limbs in necessary directions and control whole thing via animations (this works best for looking and aiming).
    Hope that helps.

    thanks for sharing,this may be useful later on.

  • newmodelsnewmodels Posts: 120Member

    Godot's armature, bone, and animation system is not good. It needs to have more usability like unity has.
    For one, the bones and armature need to be added as nodes, but they are not in 3.0.2

  • AcetheSuperVillainAcetheSuperVillain Posts: 4Member

    Forgot to check in for a while because I found a workaround for the problem. Didn't find a way to do it the way I wanted to, but I did achieve what I need by adding some empty meshes to the armature and then swapping them out during run-time. This does mean I'm limited to a certain number of swappable parts, but that's fine for this project.

    body = get_node("Armature/BroFanRig/Skeleton/Body");  #a Mesh node
    var bodymesh = load("res://Assets/3DRaw/Character/body_F_kitsune.mesh");
    body.mesh = bodymesh;
    

    I have been using the Blender Better Collada exporter. The models all look fine if I export them all at once, just not if I try to reassemble them from multiple files.

    @slapin , not helpful. I'm hoping to eventually have hundreds of customizeable parts, and I'm completely sure that it would crash my computer at some point to export a file that big. Yuck to AnimationTrees. It's a fighting game with a lot of animations, several that can be entered from multiple states, so mapping it all to a blend tree would be a pain in the ass. For this, it's better to just use the blend timer setting in play().

  • slapinslapin Posts: 61Member

    Full body animstions are actually harder to get right unless you have access to unlimited mocap source.

    About swappable parts what do you mean - clothing or separate limbs?

    I exported about a hundred characters parented to the same.skeleton without problems. Also I think you coul link armature from different file and export each part individually, but I did not try it myself, so please tell the result when you try. Btw cool to know there is another soul struggling with same things!

  • slapinslapin Posts: 61Member

    Btw you can show/hide meshes instead of loading/unloading... and loading should work too...

  • AcetheSuperVillainAcetheSuperVillain Posts: 4Member

    @slapin said:
    About swappable parts what do you mean - clothing or separate limbs?

    Right now, it's clothing, hair, body and weapons.

    Also I think you coul link armature from different file and export each part individually, but I did not try it myself, so please tell the result when you try.

    That's what I tried to do the first time. The result is the picture at the beginning.

  • InDWrektInDWrekt Posts: 1Member

    I know this is a few months old and may no longer be actively checked but I wanted to put an answer for anyone searching for the same thing.

    Looking at the image, it looks like your armature and your meshes aren't saved with the same default scale. When the default scale of the two pieces differ, the model can wind up very out of shape. The system is unable to map the correct relative locations of the vertices.

    I would suggest loading your models into one scene, scaling them all to the same relative size, then pull the armature in and scale it to match. Then, before saving the objects back out, you need to apply that scale on every item so it becomes the default scale.

    Unfortunately, I don't have the files to examine so I can't guarantee this is the issue. It is however one thing that will result in this type of problem. I hope that helps some one.

Sign In or Register to comment.