Giter Site home page Giter Site logo

vini-guerrero / godot_game_tools Goto Github PK

View Code? Open in Web Editor NEW
368.0 17.0 37.0 83.02 MB

This is a blender add-on that contains tools to ease the creation/import process of assets into Godot Game Engine

License: GNU General Public License v2.0

Python 100.00%

godot_game_tools's Introduction

Godot Game Tools

This is a blender add-on that contains tools to ease the creation/import process of assets into Godot Game Engine
https://github.com/godotengine/godot

GitHub Stars GitHub Contributors

Godot Game Tools

How To Use

Special Thanks To

godot_game_tools's People

Contributors

alan-w-255 avatar janne-ha avatar stoeoeoe avatar vini-guerrero avatar zutils avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

godot_game_tools's Issues

animations are not added?

When I try to add animations in the blender it turns out successful but does not display in animation list.I get this error when the bone name changes so the armature:
`Traceback (most recent call last):
File "/home/mycomputer/.config/blender/2.83/scripts/addons/src/panels/character_utilities_panel.py", line 74, in draw
rootmotionRow4.prop_search(tool, "rootmotion_hip_bone", ob.data, "bones", text="Root Bone")
AttributeError: 'NoneType' object has no attribute 'data'

location: :-1

`

Animation Problems

Hi, i have some troubles with the exported GLTF file.
I am sure that i made all settings like in the video DEVLOG #4 . (I checked it twice)
The Animation Loop is not set in my Godot Project and i have no way to fix this in Godot. When i set it manually it changes back as soon as i restart Godot.

grafik

I also have not the option for the animation tree presets in blender as shown in the video DEVLOG #4:

grafik

I´ve tried different "Godot Game Tools" versions, one from itch.io and also that from GitHub.
I work with Godot v3.2.2 Stable, Blender v2.82 and i use the "Y Bot" character from Mixamo and a few animations.

Maybe you have a solution for my problems?
Best regards,
Martin

Latest itch release version not loading in Addons list in Blender v3.0.0

The current version of this addon (at the time of this post on 2/5/2022 Saturday) doesn't seem to be compatible with Blender v3.0.0, however version 2.0.4 does work in Blender v3.0.0. The current version on itch won't show up in the Addons list even after install in Blender v3.0.0. I solved this by using v2.0.4 of your addon instead.

Error while initializing character

Whenever I try to initialize a character or import an animation I get the following error and can't proceed further.

Python: Traceback (most recent call last):
  File "/home/selgesel/.var/app/org.blender.Blender/config/blender/3.1/scripts/addons/src/operators/character_controller.py", line 65, in execute
    bpy.ops.wm_ggt.prepare_mixamo_rig('EXEC_DEFAULT')
  File "/app/blender/3.1/scripts/modules/bpy/ops.py", line 130, in __call__
    ret = _op_call(self.idname_py(), C_dict, kw, C_exec, C_undo)
RuntimeError: Error: Python: Traceback (most recent call last):
  File "/home/selgesel/.var/app/org.blender.Blender/config/blender/3.1/scripts/addons/src/operators/character_controller.py", line 235, in execute
    bpy.ops.wm_ggt.rename_mixamo_rig('EXEC_DEFAULT')
  File "/app/blender/3.1/scripts/modules/bpy/ops.py", line 130, in __call__
    ret = _op_call(self.idname_py(), C_dict, kw, C_exec, C_undo)
RuntimeError: Error: Python: Traceback (most recent call last):
  File "/home/selgesel/.var/app/org.blender.Blender/config/blender/3.1/scripts/addons/src/operators/character_controller.py", line 215, in execute
    bpy.context.scene.frame_end = bpy.context.object.animation_data.action.frame_range[-1]
TypeError: bpy_struct: item.attr = val: Scene.frame_end expected an int type, not float

location: /app/blender/3.1/scripts/modules/bpy/ops.py:130
location: /app/blender/3.1/scripts/modules/bpy/ops.py:130
location: <unknown location>:-1

Based on the error message I checked out the frame_range value and realized that it's a Vector2 with float values.

image

So I tried casting the resulting item to int (e.g. bpy.context.scene.frame_end = int(bpy.context.object.animation_data.action.frame_range[-1])) wherever I could, which did make the errors disappear, but unsurprisingly, every single animation had a duration of 2 frames afterwards.

I tried different Blender versions (3.1.1 and 3.1.2), different addon versions (2.0.4 and 2.0.5), and different models/animations (Y-Bot and Erika Archer), but nothing helped.

I don't know any Blender scripting so I have no idea what value frame_range should normally have and why it doesn't now, but if you can point me in the right direction I can try to find the solution myself.

P.S.: I'm aware of a similar issue at #55 but that's closed without any followup, so I decided to open a new one with more details, hope it's OK

Add a project license

The repository currently doesn't seem to contain any license. Could you add one, please? See Choose a License for more information 🙂

Note that Blender addons generally choose to use "GPLv2 or later" as a license, since this is the same license as Blender.

all animations are centered on hips

Hey. I have been using this amazing addon for a while and have one problem that I can't seem to solve.
In mixamo I have an idle animation where the character leans left and right.
If I import the .fbx of just the idle animation into blender without the addon it works fine.
But with godot game tools when I combine a few animations,
the animation becomes centered on the hips when it should be the feet.
So instead of the character leaning, the feet just slide left and right. It looks crazy.

I tried experimenting with the root animation settings but can't seem to fix it. Do you know of any way I can fix this?
Please let me know if you need any more information or a file example. Thank you!

Error while adding root animation to character

Python: Traceback (most recent call last):
File ".../Library/Application Support/Blender/3.1/scripts/addons/src/operators/rootmotion_controller.py", line 309, in execute
bpy.context.scene.frame_end = bpy.context.object.animation_data.action.frame_range[-1]
TypeError: bpy_struct: item.attr = val: Scene.frame_end expected an int type, not float

location: :-1

V2.0.5 Texture Baking bakes lighting (And it shouldn't)

"Create Bake Texture"->"Bake Texture" bakes in the lighting for procedural generated textures. This should not happen as the Godot engine should add the lighting itself.

Furthermore, baking should optionally bake normal maps and specular maps independently.

Initialize Character only imports one Mesh

Using the Y Bot from Mixamo for Initialize Character, only one of the two meshes gets imported.
When I click on Join Armature Meshes I get the Error: `Object 'Alpha_Joints' can't be selected because it's not in View Layer 'View Layer'!

Is there any recommendation on how to fix or use the tooling?

Godot Addon - Create Armature Setup / Create State Machine Error

Hi,

I am using the Godot plugin and I am getting the following error with the Create Armature Setup / Create State Machine functions:

Armature Setup:
res://addons/godot_game_tools/scripts/ggt_main.gd:49 - Invalid get index 'rootmotion_bone' (on base: 'Dictionary').

State Machine:
res://addons/godot_game_tools/scripts/ggt_main.gd:167 - Invalid get index 'state_machine_node' (on base: 'Dictionary').

I was following the DEVLOG #4 video. I noticed that in the video you are selecting a .json file within the Godot plugin, however my Blender export created a .char file.

I am using Blender 2.83 and Godot 3.2.2 stable

Otherwise great work,
Best Regards

Every animation exported as loop

Hello! Loving the tool but I found an issue.
First of all I got the character from mixamo with a bunch of animations, some of which I wanted to loop other not.
I had already added -loop suffix to the ones I wanted before hand.
I then followed the workflow in blender and everything look fine.
When I exported the .glb character with all the animations and then opened the animation player in Godot, the -loop suffix was added to every animation.

Not a huge issue because I can manually un-loop the animations I want from inside Godot, but just wanted to let you know.

Image1
Image2

Instructions are outdated

Hey there, would love to use the plugin but I'm unable to figure out how to use it properly. All tutorials are outdated as well as official instructions.txt. Would love to see the official documentation updated! Thanks!

Imported animations - all over the place

after updating to 2.0.5 I was able to initialize my maximo character without any issue. But when I go to join the animations I have an issue. I select all the animations I want, they all load in but at different x y z coordinates, and when I play them the armature flys around in strange loops.

Feature Request: V2.0.5 When exporting models, temporarily connect image texture instead of procedural texture

Feature Request: V2.0.5
This is a 2 in 1 feature request that are very close in nature.

  1. Allow exporting of any model instead of just Characters
  2. When exporting GLTF via Godot_Game_Tools, the image texture node that is automatically generated via the "Create Bake Texture" button should be automatically, and temporarily, connected to the "Principled BSDF Shader" node. The implications of this are that the gltf model will now be fully ready for importing into Godot with both textures and animations.

Incorect animations

Animations used (contains T-pose fbx): https://drive.google.com/file/d/1UU2CG0hc_18VK7attN3QSEiWu0M7-HLQ/view?usp=sharing
GGT version 2.0
Blender 2.82

To reproduce:

  1. Open Blender
  2. Initialize Character -> Select T-pose fbx
  3. Join Animations ->Select all except T-pose
  4. Wait for it to finish then check out the created animations

Additionally, there's some kind of facial animations that I didn't download from Mixamo but somehow appear in the final animations? Not sure where they came from...

Different issues with Mixamo characters

First of all, great tool for me to use as a non-3D artist. This makes life much easier to use some basic characters and animation in Godot, but...

I encountered some different issues when using your tool in combination with Mixamo animations and after spending some time, I have come to the conclusion to ask for your help. I am using Blender 2.90.1 and the Godot Game Tools version of 12 september 2020. The issues below occur with all of the characters and animations I downloaded from Mixamo (download as FBX Binary with Skin).

Issue 1 – Eye dropper tool no longer in UI
This is more like an outdated functionality, but in one of your tutorials you use the eye dropper tool to select the armature and mesh on which the animations will be applied. After spending some time on Youtube and clicking around, I found out that this ‘eye dropper tool’ is no longer part of the current interface and the armature now needs to be initialized using the ‘Initialize Character’.

Issue 2 – ‘Initialize characters’ only imports one mesh
When I use the ‘Initialize Character’ importer, it only imports one mesh of the armature, see image below. But when I import the FBX using the Blender import-functionality it loads armature and mesh correctly. This is the same issue as [ https://github.com//issues/30 ]. I tried your advice to join the meshes to a single body piece (using CTR+J in Blender – but I did not do any re-rigging).

Issue 2

Issue 3 – ‘Initialize characters’ using one single mesh results in wrong orientation
After creating one single mesh character, I use the ‘Initialize character’ again. But now the T-pose is oriented differently and the scale is much smaller, see image below. However, when I import this FBX using the Blender-importer, again everything looks fine. This is the same issue as [ https://github.com//issues/22 ]. I am able to fix the orientation and the scale, but then I get an issue with the animation.

Issue 3

Issue 4 – Animation is going all over the place
When I click ‘Join animations’ one a single mesh character with a corrected orientation, the animation causes the character to move all over the place. There isn’t a single animation that hasn’t caused this problem for me. I found a Youtube video that explains that the cause of this issue is the hip placement [https://www.youtube.com/watch?app=desktop&v=6SegCO3cZZE]. By selecting the hip armature ‘bone’, then open the graph editor and disable the X and Y displacement, the character stays in place and the animation seems to works fine. But I need to do these actions over and over again for each animation. When I want to apply a second animation, I need to do some other things that are explained in this video [ https://www.youtube.com/watch?app=desktop&v=3Hk9ljcS1Ro ]

All together, this still takes some time for me to get everything working. It is still quicker than doing everything from scratch, but it doesn’t give me the feeling that I am utilizing the efficiency from this tool for which it has been created. Is there perhaps some crucial step that I am missing in my work pipeline?

Running Join Animations a second time messes up existing animations

I tried this with multiple models and very simple ones as well.

Steps to Reproduce:

  1. Initialize Character
  2. Join Animations and select a batch of animations. These will import correctly.
  3. Join Animations a second time and select a new batch of animations. Any existing animations will now be bugged and it will appear as though the hips are locked on the Y axis. This is most noticeable with animations like a "fall" or "jump".

Temporary Solution:

  • Import ALL animations at once. (This is fine for now, but it would be nice to be able to import in batches for performance and testing.)

Wrong switched position on legs for combine animations Mixamo

image

If I open the fbx only, the animation seems correct.

Note, the animation TPose from Mixamo that I uploaded still has its old animations.

Steps:
Download TPose and animations
Initialize character with TPose
Combine animations selecting all animation fbx files, no skin

Initialize Character: Not loading all meshes

I followed the latest youtube video I could find and followed along using the same model from Mixamo (Skeletonzombie T Avelange). This worked as expected.

When using a model with multiple meshes from Mixamo (Knight D Pelegrini), only the "Lower_Armor" was imported. This particular model, when importing using Blender's FBX importer, has 3 meshes ("Body", "Head_Hands", "Lower_Armor").

Generate Root Bone error location: <unknown location>:-1

After i try to get get a Root Bone I get that error, what exactly is the issue?

Python: Traceback (most recent call last):
  File "/Users/soxx/Library/Application Support/Blender/2.93/scripts/addons/src/operators/rootmotion_controller.py", line 322, in execute
    fCurveBone = channel.data_path.split('"')[1]
IndexError: list index out of range

location: <unknown location>:-1

grafik

animation

When i look into the ARmature i can see the root bone but is a strange direction, and after i import that into Godot and set everything up to use the root bone it just played the animation normally without the correction from the engine.

grafik

grafik

Errors when working with Blender 3.2

![Screenshot from 2022-06-25 14-50-24](https://user-images.githubusercontent.com/40705255/175774452-639bc518-d209-4076-9cc9-8c480370616f.png) ![Screenshot from 2022-06-25 14-50-48](https://user-images.githubusercontent.com/40705255/175774456-5cbada3d-0beb-456b-a7d2-447b2500182b.png)

Join Animations automatically use root motion

After join animations models don't move like on mixamo in other words It's stay in place. We should let user decide should or not enable root motion. When import model to Godot engine we use AnimationTree RootMotion instead.

Blender cannot found script

Envrironment

  • Blender 2.8
  • Elementary OS 5.1 Hera
  • Addons zip Downloaded form master branch

What happen
on addons setup, specifically when going to enable the plugin.

The Error
after click checkbox (to enable), blender suddenly show the follwing error:

Traceback (most recent call last): File "/home/talisson/blender-2.82-linux64/2.82/scripts/modules/addon_utils.py", line 352, in enable mod.__time__ = os.path.getmtime(mod.__file__) File "/home/talisson/blender-2.82-linux64/2.82/python/lib/python3.7/genericpath.py", line 55, in getmtime return os.stat(filename).st_mtime FileNotFoundError: [Errno 2] No such file or directory: '/home/talisson/.config/blender/2.82/scripts/addons/godot_game_tools/__init__.py'

The Temporary Solution
open the terminal and access the Blender's addons folder, then create new folder named godot_game_tools, then rename from godot_game_tools.py to __ini__.py and move it to godot_game_tools folder.

Occurs when selecting animations from multiple folders (I think). Blender ver. 3.2

Python: Traceback (most recent call last):
File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\3.2\scripts\addons\src\operators\character_controller.py", line 175, in execute
self.importModels(sorted(files), target_armature, context)
File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\3.2\scripts\addons\src\operators\character_controller.py", line 148, in importModels
if file_names_list[rename_index]:
IndexError: list index out of range

Python: Traceback (most recent call last):
File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\3.2\scripts\addons\src\panels\character_utilities_panel.py", line 72, in draw
rootmotionRow4.prop_search(tool, "rootmotion_hip_bone", ob.data, "bones", text="Root Bone")
AttributeError: 'NoneType' object has no attribute 'data'

Python: Traceback (most recent call last):
File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\3.2\scripts\addons\src\operators\rootmotion_controller.py", line 337, in execute
scene.frame_set(index)
TypeError: Scene.frame_set(): error with argument 1, "frame" - Function.frame expected an int type, not float

Can't enable the add-on, after installing

Hi,
I am using blender 2.79, 32-bit windows
I have installed the Add-on from file as directed but when enabling, I get this error in addon_utils.py enable function
and also in _init_.py GGT_AddonProperties_GGT class.

Please help me out. 🙂

Capture

Initialize Character - Import T-pose in wrong orientation

Hello

This is for release 2.0

When i'm initializing character, the model with base t-pose (exported from mixamo) have some weird orientation.
blender_ggt_import

The same fbx model imported in Blender by File->Import is oriented correctly.
blender_fbx_import

Here is blender file with rig, exported fbx from blender and exported fbx with tpose from mixamo.
models.zip

Error when adding root motion

The following pops on the Blender Info Log:

Python: Traceback (most recent call last):
  File "C:\Users\pvini\AppData\Roaming\Blender Foundation\Blender\3.2\scripts\addons\src\operators\rootmotion_controller.py", line 337, in execute
    scene.frame_set(index)
TypeError: Scene.frame_set(): error with argument 1, "frame" -  Function.frame expected an int type, not float

And also, when you join an animation that has movement baked in (like the walking animations on Mixamo when the option "In Place" is turned off), for some reason the plugin removes that movement and makes the animation in-place, this should not happen.

I'm running Blender 3.2.1, with Godot Game Tools plugin version 2.1.0

No Export Options

I just downloaded the latest version of Godot Game Tools, and after figuring out why it wasn't installing (just needed to dig out the other zip further into the initial zip)... I seem to have no new export options whatsoever.

Initialize Character - Selecting an existing armature in the scene, then importing causes error

Dev Branch windows 10

Steps to reproduce:
1.) Have a mixamo character FBX loaded into Blender.
2.) Select the mixamo character armature
3.) Press Initialize Character
4.) Select another mixamo animation from the File Browser and Submit

Notes:

  • All fbx import options are at blender defaults
  • When this error happens, only the body of the character disappears. I believe this is the case because the mesh body is the first mesh in the array to disappear since all the meshes in the Armature array is sorted alphabetically.

3

Can't export character on V2.0.5

Switched over to V2.0.5 to fix the single mesh error but now exporting gives the following error

Python: Traceback (most recent call last):
  File "/home/user/.config/blender/3.1/scripts/addons/src/operators/export_character_controller.py", line 69, in execute
    bpy.ops.wm_ggt.push_nlas('EXEC_DEFAULT')
  File "/usr/share/blender/3.1/scripts/modules/bpy/ops.py", line 130, in __call__
    ret = _op_call(self.idname_py(), C_dict, kw, C_exec, C_undo)
RuntimeError: Error: Python: Traceback (most recent call last):
  File "/home/user/.config/blender/3.1/scripts/addons/src/operators/export_character_controller.py", line 42, in execute
    track.strips.new(action.name, start, action)
TypeError: NlaStrips.new(): error with argument 2, "start" -  Function.start expected an int type, not float

location: /usr/share/blender/3.1/scripts/modules/bpy/ops.py:130

location: <unknown location>:-1

Tried different models and animations but cant get it to work.

v2.0.5 still import only 1 mesh

Hello, for some reason for me v2.0.5 still only import 1 mesh. I did change the source code and now it works. but I'm wondering if it's save to do that.
I've modified from this;

    if characterArmature != None or characterArmature.type in ["ARMATURE"]:            
        bpy.data.objects[characterArmature.name][armature_key] = armature_key            
        if len(characterArmature.children) > 0:
            for mesh in characterArmature.children: 
                bpy.data.objects[mesh.name][armature_key] = armature_key

into this;

    if characterArmature != None or characterArmature.type in ["ARMATURE"]:
        for mesh in characterArmature.children: 
            bpy.data.objects[mesh.name][armature_key] = armature_key

Will someone tell me if this is fine and won't cause any problem? I'm new to programming and was changing the code just to make that one feature work.

p/s sorry if I shouldn't be posting here, never use this website before.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.