[Godot3] How to use Blender Shape Keys in Godot | Game Dev Tutorial 11

Поділитися
Вставка
  • Опубліковано 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
    UA-cam 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
  • Ігри

КОМЕНТАРІ • 68

  • @Deathend
    @Deathend 4 роки тому +14

    I want to hate Godot when it frustrates me and I have to learn, but this is just too amazing. Thanks for the tutorial!

  • @stevedowning3892
    @stevedowning3892 19 днів тому

    Thanks Dave. Still plenty of food for thought in 2024 and Godot 4.x

  • @danielhadad4911
    @danielhadad4911 3 роки тому +1

    I loved how you took your time to explain everything in detail. Great tutorial, man!

  • @Mixthelightintogray
    @Mixthelightintogray 4 роки тому

    Dave, your channel is great. Very useful vid!

  • @Schollidazed
    @Schollidazed 4 роки тому +6

    Woah! This channel is really growing. Can't wait for the future.

  • @dominiksulzer1338
    @dominiksulzer1338 4 роки тому

    Awesome video! I have never heard about shape keys but I think I will definitelly use them. Thank you.

  • @Crisisdarkness
    @Crisisdarkness 4 роки тому +2

    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

  • @mna226
    @mna226 4 роки тому +1

    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 :)

  • @midgardsorm
    @midgardsorm Рік тому

    awesome tutorial! Knocked it out of the park!

  • @wilfredgodfrey271
    @wilfredgodfrey271 10 місяців тому

    I learned more than just how to shape key in Godot, and I've been using it for a while! Thanks!

  • @VilasNil
    @VilasNil 4 роки тому

    This video is amazing! You've got a new sub here ☺️

  • @hidemat5141
    @hidemat5141 4 роки тому

    omg thanks for this channel. Do you know how long I've been searching for a Godot in 3D channel? Love your videos.

  • @AniketSingh-hr8mi
    @AniketSingh-hr8mi 4 роки тому

    Nice tutorial, keep it up!

  • @viniguerrero
    @viniguerrero 4 роки тому +7

    Awesome video! Would be awesome if you could teach how to make procedural animations too :D

    • @DavetheDev
      @DavetheDev  4 роки тому +2

      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.

    • @viniguerrero
      @viniguerrero 4 роки тому +1

      @@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...

    • @DavetheDev
      @DavetheDev  4 роки тому +1

      @@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 ua-cam.com/channels/YGKT9XOmuL45aEP2bWBGYw.html on youtube (same person).

  • @udippatel6147
    @udippatel6147 2 роки тому

    this is exactly what i needed, thanks.

  • @techdronellc
    @techdronellc 3 місяці тому

    Handy! Your tutorial is very clear and useful. Thank you ^_^

  • @mahirshahariar9685
    @mahirshahariar9685 3 роки тому

    Woah, This tutorial is freking useful

  • @erikdong
    @erikdong 2 роки тому

    This! Great tutorial!!!

  • @awakenedcrowl
    @awakenedcrowl 4 роки тому

    Thanks! Well explained :D

  • @wolfeatsheep163
    @wolfeatsheep163 4 роки тому

    great tutorials please make more

  • @alperg1142
    @alperg1142 Рік тому +1

    Thank you.

  • @joshuablackmon939
    @joshuablackmon939 2 роки тому

    thank you dave >_< :) i wanted .. i wanted this

  • @rewindcat7927
    @rewindcat7927 3 роки тому +1

    Out of 10 this tutorial gets a BOO-YAH!

    • @DavetheDev
      @DavetheDev  3 роки тому +1

      I'm glad it's not a "BOO.....NAH".

    • @rewindcat7927
      @rewindcat7927 3 роки тому +1

      Dave the Dev haha no way you make excellent tutorials.

  • @wongwong5819
    @wongwong5819 4 роки тому

    great!thanks!

  • @Crisisdarkness
    @Crisisdarkness 4 роки тому

    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

    • @DavetheDev
      @DavetheDev  4 роки тому

      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. ^_^

    • @Crisisdarkness
      @Crisisdarkness 4 роки тому

      @@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

  • @jeffg4686
    @jeffg4686 4 роки тому +2

    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?

    • @DavetheDev
      @DavetheDev  4 роки тому +4

      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.

    • @jeffg4686
      @jeffg4686 4 роки тому

      @@DavetheDev - thanks, great answer

  • @romankovalov9015
    @romankovalov9015 Рік тому

    Based linux user

  • @A76noname
    @A76noname 3 роки тому +2

    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?

    • @willbe3043
      @willbe3043 2 роки тому +1

      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.

  • @ivailoburov1295
    @ivailoburov1295 4 роки тому

    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.

  • @angelaconway2623
    @angelaconway2623 7 місяців тому

    ❤❤❤❤❤

  • @this_is_japes7409
    @this_is_japes7409 4 роки тому

    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?

    • @DavetheDev
      @DavetheDev  4 роки тому +1

      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. :)

  • @GameDevGeeks
    @GameDevGeeks 4 місяці тому

    can we use shape keys in multi mesh instances?

  • @romanglinnik8073
    @romanglinnik8073 4 роки тому

    Which version of blender do you use? Looks different, kinda old. Btw good video, you got a subscriber:)

    • @DavetheDev
      @DavetheDev  4 роки тому

      Welcome! This is Blender v2.80

    • @romanglinnik8073
      @romanglinnik8073 4 роки тому

      @@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?

    • @DavetheDev
      @DavetheDev  4 роки тому

      @@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.

    • @romanglinnik8073
      @romanglinnik8073 4 роки тому

      @@DavetheDev Thanks, I will try out all the things a can imagine.

  • @budigtoon418
    @budigtoon418 4 роки тому

    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

    • @DavetheDev
      @DavetheDev  4 роки тому +2

      github.com/godotengine/godot-blender-exporter Here you are, Happy Deving. ^_^

    • @budigtoon418
      @budigtoon418 4 роки тому

      ​@@DavetheDev Thank you. seems its works to Gles3, not to Gles2

  • @user-bg3ov5nb5b
    @user-bg3ov5nb5b 4 роки тому +1

    Can we make the shape key animation in blender then import to Godot?
    i think that is not

    • @DavetheDev
      @DavetheDev  4 роки тому +1

      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.

  • @vsstdtbs3705
    @vsstdtbs3705 4 роки тому

    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.

    • @DavetheDev
      @DavetheDev  4 роки тому

      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.

  • @Ceisriel
    @Ceisriel Рік тому

    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

  • @kenonerboy
    @kenonerboy 4 роки тому +2

    Do 2dmeshes have blend shapes?

    • @DavetheDev
      @DavetheDev  4 роки тому +1

      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...

    • @Mixthelightintogray
      @Mixthelightintogray 4 роки тому

      @@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 :(

  • @billycrooks8401
    @billycrooks8401 4 роки тому

    Which linux distro do you use?

    • @DavetheDev
      @DavetheDev  4 роки тому +1

      Arch (btw) :P, with the MATE Desktop Environment.

    • @billycrooks8401
      @billycrooks8401 4 роки тому

      @@DavetheDev thanks I've been wanting get Linux on my computer and not really sure which one

    • @DavetheDev
      @DavetheDev  4 роки тому

      @@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.

  •  2 роки тому

    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

    • @DavetheDev
      @DavetheDev  2 роки тому +1

      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: ua-cam.com/video/LNidsMesxSE/v-deo.html

    •  2 роки тому

      ​@@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

    •  2 роки тому

      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

    • @DavetheDev
      @DavetheDev  2 роки тому

      @ 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: ua-cam.com/video/UcdwP1Q2UlU/v-deo.html