[Godot3] How to use Blender Shape Keys in Godot | Game Dev Tutorial 11
HTML-код
- Опубликовано: 3 ноя 2019
- Greetings from Dave the Dev and welcome back. In this Game Dev Tutorial I'll demonstrate how to use Blender's Shape Keys in the Godot Engine. As always, I'd love to hear from you, comment below and I'll do my best to reply if there are questions. Happy Halloween!
Dave the Dev GitHub Link: github.com/DaveDaDev/Godot-Tu...
Follow along with what I'm doing on Twitter: / exp_worlds
RUclips Music Library
Song: Clover 3
by Vibe Mountain
/ @jeffconrad8259
Song: Wild Pogo
by Francis Preve
/ @francispreve
Song: Tragic Story
by Myuu
/ @myuu
Song: Ladybug
by Quincas Moreira
/ @quincasmoreira - Игры
I want to hate Godot when it frustrates me and I have to learn, but this is just too amazing. Thanks for the tutorial!
Thanks Dave. Still plenty of food for thought in 2024 and Godot 4.x
Woah! This channel is really growing. Can't wait for the future.
I loved how you took your time to explain everything in detail. Great tutorial, man!
Thank you. This video was extremely helpful. I went through some of the questions asked in comments section and appreciate you taking time and answering very clearly in detail. You have earned my subscription :)
Thank you, in this tutorial you have taught a very useful topic, you explained this topic quite well, keep it up, this is my favorite channel about Godot
Awesome video! I have never heard about shape keys but I think I will definitelly use them. Thank you.
Dave, your channel is great. Very useful vid!
awesome tutorial! Knocked it out of the park!
I learned more than just how to shape key in Godot, and I've been using it for a while! Thanks!
Nice tutorial, keep it up!
This video is amazing! You've got a new sub here ☺️
Handy! Your tutorial is very clear and useful. Thank you ^_^
Woah, This tutorial is freking useful
this is exactly what i needed, thanks.
Awesome video! Would be awesome if you could teach how to make procedural animations too :D
I love procedural animation. What kind are you thinking of? Though I didn't explicitly say during this video, blend shapes are actually useful for procedural animations. It wasn't what I was going for, but when the Perlin noise changes the spider, it kinda looks like an idle animation. Thanks for the input.
@@DavetheDev since it's hard to find any material related to this on Godot, I guess any type could be helpful but my first idea was using IK and Velocity, maybe Raycasts for 3D procedural animations, I see it's possible but there aren't any tutorials on it...
@@viniguerrero I'm working on a custom SkeletonIK Plugin for Godot ATM. When it's ready I'll make a video about it. Until then, another person who is doing a lot of work with IK is Twistedtwigleg (on twitter and godot forum) and ruclips.net/channel/UCYGKT9XOmuL45aEP2bWBGYw on youtube (same person).
This! Great tutorial!!!
omg thanks for this channel. Do you know how long I've been searching for a Godot in 3D channel? Love your videos.
Thanks! Well explained :D
thank you dave >_< :) i wanted .. i wanted this
great tutorials please make more
Thank you.
Out of 10 this tutorial gets a BOO-YAH!
I'm glad it's not a "BOO.....NAH".
Dave the Dev haha no way you make excellent tutorials.
great!thanks!
Great tutorial. I always wondered how to get the shape keys into godot from blender. Do the model changes get run in CPU or GPU (vertex shader?) when blending? Also, does this work well if you also have a fragment shader on the object?
Good questions. I had to look some of it up. The model changes can run on CPU, but most of the time you want them on the GPU. The GPU basically gets a VBO for each blend shape and sums them all together based on the blend weights. You can do it in the vertex shader, but the vertex shader can only be bound to a fixed number of VBOs at once, so if you have lots of blend shapes you might have to make a few passes with the vertex shader. Or you can can use compute shaders to sum all the blend shape VBOs together and apply them to the base mesh in the Vertex Shader. The fragment shader doesn't care what shape an object is because the UVs are the same, but textures might stretch if the object changes too much, I think. But solid colors still work fine and there are always little fixes and trade-offs you can do to get the effect you want, it's just a matter of spending the time to figure things out. Hope that shed some light for you.
@@DavetheDev - thanks, great answer
I would like to see at some point a tutorial that you talk about shaders focused on 2D, and what creation alternatives do we have, what things could we create?. Thanks
Sure, I'd be happy to take note of that. Can you explain what you mean by creation alternatives? Are there a few examples you're interested in? Thanks for the input. ^_^
@@DavetheDev Since I have little experience on this subject, I cannot know very well, on how I could take advantage of the shaders, for the creation of a 2d project. For example, it could create wind, lightning effects, wave effects, magma, fog, some special particle effects ?. When I was a child, I played various games, for example in DonkeyKong 3, I was not aware that things were shaders. I wish you could guide me on what part the shaders could be used for a 2D project, and some examples would come in handy, thanks friend
Hey, this looks exactly like what I've been looking for, but I have a question: If I want to model a rigged character with premade animations using the skeleton and then want to be able to change the character's height using blendshapes, how does that work with the animations? Can you just scale the skeleton up/down with the rest of the mesh with the animation still working fine, because it uses relative bone positions or something like that?
Yes, the animations will work mostly fine unless there's really big deformations to account for, because it's relative movements from the 'basis'.
If a shape key is so extreme that it doesn't work with an animation, you could add a 'corrective' shape key so the problem areas are closer to the basis and the rest stays.
❤❤❤❤❤
blender has its shape key editor animations, do you know if those are imported into godot or is it simply importing the shape keys and you have to do the animation in godot?
If you mean when you make animations that animate shape key values in blender will they work in Godot? I think you're right, you'd have to make the animations in Godot, because Blender has no idea how Godot uses shape keys. It would be up to the exporter to convert the animation keys into a form Godot could use. But, I could be wrong, the best way to find out is to try it. Let me know how it goes. :)
Which version of blender do you use? Looks different, kinda old. Btw good video, you got a subscriber:)
Welcome! This is Blender v2.80
@@DavetheDev Oh, cool, and thanks. Btw, do you have an Idea why my shader script editor in godot won't let me type curly brackets?
@@romanglinnik8073 Wow, that sounds like a terribly frustrating problem to have. I couldn't really say, but maybe try reinstalling Godot, or downloading and compiling the latest version from github? Honestly, if that were happening to me, I'd try re-plugging in the keyboard and if that didn't work, I'd restart the computer. lol You know the normal stuff. haha. There are about a million things that could be, so unfortunately I can't be much help from here. Keep trying stuff though, I'm sure you'll get it.
@@DavetheDev Thanks, I will try out all the things a can imagine.
Based linux user
I tried different export combinations but this does not work for gltf export. Shape property is visible but no animation when moving the scrollbar. For FBX, exporting works well.
can we use shape keys in multi mesh instances?
Hi Dave, where can I get the godot enggine exporter addon for blender 2.8 (like in your video)? that's seem similiar with better colada exporter, but sadly better collada not support correctly Blender 2.8 shape keys
github.com/godotengine/godot-blender-exporter Here you are, Happy Deving. ^_^
@@DavetheDev Thank you. seems its works to Gles3, not to Gles2
Can we make the shape key animation in blender then import to Godot?
i think that is not
I'm not sure...probably not. But you can certainly animate them in Godot. In my option, it is best to try to make as much of a game on the game engine side as possible. In this way everything is more likely to be consistent and compatible. But, this is just my way. Other workflows are good too, if they work.
Got lost at time of 3:52 on the video. After he clicked 'Proportional Editing', his mouse moved somewhere to the right before he began morphing. Don't know what he did there over to the right, but I can't morph.
Thanks for the feedback. When the video sped up I turned on the "Move Gizmo" so it would be easier to move vertex around. But, you don't need to do that to use proportional editing, just make sure you're in "edit mode", select any vertex then press "g" on the keyboard. If your sphere isn't morphing a whole lot, make sure that the proportional editing tool's influence circle is wide enough by scrolling the mouse after pressing "g". Hope that helps.
how do i access the blend_shapes from other types of scripts? this code does damage to a rock when i hit the rock, it's a staticbody script, it doesn't work if i apply it directly to the mesh. I have a blendshape called "Mined"... when i hit the rock, i want "Mined" to be reduced by damage, everything i tried so far gives me errors because the methods used in the godot documentation only work for MeshInstance scripts.. ..but then, again meshinstance script don't work with collision so it can't check if the rock is getting damage.
extends StaticBody
var health = 2000
var floatingtext = preload("res://UI/floatingtext.tscn")
func onhit(damage):
# Basic formula for damage
health -= damage
# Instance a floating text to show damage done
var text = floatingtext.instance()
text.amount = float(damage)
add_child(text)
if health
Do 2dmeshes have blend shapes?
Yes, I believe so. I've never made a 2D mesh... but it appears like it should work the same as 3D because both the 2D and 3D MeshInstance nodes use the ArrayMesh resource and the ArrayMesh resource class is where the Blend Shapes live. Try it out and let me know how it goes...I'm curious...
@@DavetheDev Just tried myself, and, if I'm not doing something wrong, sadly it doesn't work.
There is no blend shape visible on MeshInstance2D, while in 3D, yes:
i.imgur.com/YqG7G2n.png
I already tried to edit the shape key with the set function using the path I see in 3D, butnothing :(
Which linux distro do you use?
Arch (btw) :P, with the MATE Desktop Environment.
@@DavetheDev thanks I've been wanting get Linux on my computer and not really sure which one
@@billycrooks8401 If you're completely new to Linux, maybe go with "Linux Mint". Arch is not all around as difficult as people say, but it does require more from the user. I 100% support anyone who wants to switch to Linux.
Hi, you can make a tutorial like this video with Shape Keys?, but with input controller, how to make the character walk and jump just with Shape Keys, you know? Because I have only Shapekey characters, no bones or skeleton, please if you do, send me a message here, I want to make a game, but first I need to learn
This kind of thing can be done. It's called Procedural Animation. You'd have to map the input controller to a custom animation controller. The animation controller would manage the animation state and calculate the blending of the shape keys. Say, your walk cycle can be represented by a value between 0.0 and 1.0. As the player walks the animation controller adds a bit to the cycle each frame, such as: cycle += cycle_speed * delta. The animation controller would then use the "cycle" variable to set the correct blend ratios.
I have done something similar to this before because I don't like Godot's animation system. Except, instead of using blend shapes, I used single key-frames. I use key-frames of various poses and my custom animation controller can blend between any of them in real-time. See this GDC talk for more details: ruclips.net/video/LNidsMesxSE/видео.html
@@DavetheDev Can you please make a tutorial?, I can't do that :( I have a character with various shapes like he walks, runs, jumps, rolls, falls and more, but I don't know how to code... if you can help me i swear i cry xD
I separated the shape keys from the animation to make it easier to do what you said... but to be honest I don't understand coding
@ If that's the case, and you're still interested in making a game, the best advice I can give you is to spend some time learning to code. Copying tutorials will only take you so far, if you want to go all the way, you're going to need an understand of code. Luckily, GDScript is an easy and a great language for beginners to learn. I'd recommend spending some time reading the Godot Docs about GDScript: docs.godotengine.org/en/stable/getting_started/scripting/gdscript/gdscript_basics.html
And there are already many great tutorials teaching coding via GDScript: ruclips.net/video/UcdwP1Q2UlU/видео.html