Crow model Blender file with rig and flying animation
Crow model Blender file with rig and flying animation
I did a really quick rig and animation to the crow in blender. It's not the best (I did it during lunch brake), but it's a good star for someone to take it a bit further.
Use it any way you like. Grab the .blend file and textures here: https://dl.dropboxusercontent.com/u/111 ... g_crow.zip
The rig is really simple. I did couple of the main controllers as shapes to spot them more easily. Animation is a flying loop in action editor. I don't think the crow can fold it's wings properly with this rig.
If you use the crow, please post it somewhere in these forums.
Use it any way you like. Grab the .blend file and textures here: https://dl.dropboxusercontent.com/u/111 ... g_crow.zip
The rig is really simple. I did couple of the main controllers as shapes to spot them more easily. Animation is a flying loop in action editor. I don't think the crow can fold it's wings properly with this rig.
If you use the crow, please post it somewhere in these forums.
Follow me on Twitter: @JuhoMakingStuff
Re: Crow model Blender file with rig and flying animation
Very nice; and very cool.
Re: Crow model Blender file with rig and flying animation
Thankyou Juho!
Labyrinth of Lies (viewtopic.php?f=14&t=4400)
Legacy of Lies (viewtopic.php?f=22&t=12983&hilit=+legacy)
Legacy of Lies (viewtopic.php?f=22&t=12983&hilit=+legacy)
Re: Crow model Blender file with rig and flying animation
Can someone help me?
I could load the file into blender and tried then to export it. The file was created but it seems to be broken somehow. When I load it into GMT the program crashes badly and when I try to use it in a mod the loading fails also and Grimrock says:
What happens here?
I could load the file into blender and tried then to export it. The file was created but it seems to be broken somehow. When I load it into GMT the program crashes badly and when I try to use it in a mod the loading fails also and Grimrock says:
Code: Select all
[string "model.lua"]:0: D3DError - CreateVertexBuffer() failed: D3DERR_INVALIDCALL
- Skuggasveinn
- Posts: 562
- Joined: Wed Sep 26, 2012 5:28 pm
Re: Crow model Blender file with rig and flying animation
The original file seems to be unavailable in the link above, I could have a look if you get me the original file.THOM wrote: ↑Wed Nov 18, 2020 7:28 pm Can someone help me?
I could load the file into blender and tried then to export it. The file was created but it seems to be broken somehow. When I load it into GMT the program crashes badly and when I try to use it in a mod the loading fails also and Grimrock says:
What happens here?Code: Select all
[string "model.lua"]:0: D3DError - CreateVertexBuffer() failed: D3DERR_INVALIDCALL
kind regards.
Skuggasveinn.
Re: Crow model Blender file with rig and flying animation
Thanks for your response. I've sent you the file via Skype.
- Skuggasveinn
- Posts: 562
- Joined: Wed Sep 26, 2012 5:28 pm
Re: Crow model Blender file with rig and flying animation
So
To say I'm having trouble getting this into the game correctly would be an understatement, this is one crazy bird.
There is nothing wrong the blender file per se, the export script just expects things to be in a certain way, and if they aren't, all kinds of weirdness happens.
Problem one: The hierarchy of the model is not what the script expects.
We need a game_matrix node, RootNode and a local_srt, also in this model the mesh is parented to the rig, in all the LoG2 animated models I have seen the mesh is parented to the local_srt node. After setting up the hierarchy the model exports but I got the same error you got when trying it in game or with the GMT.
Problem two: The model has custom shapes for some of the bones, very handy for animating the crow, but I don't know how the script reacts to it, so I changed the bones to standard again. The model DIDN'T export, I got a new error that pointed towards tangent space errors for the faces.
Problem three: The model has a mix of triangles and quads (tangent space error), the script wasn't handling it. This was an easy fix with the blender build in command to triangulate the faces. The model exports but AGAIN the same "D3DERR_INVALIDCALL" as from start.
Problem four: The bones have active modifiers on them (copy rotation, constrains etc). None of the model from the asset pack have them, and they are really not needed once you have baked the animation. So I removed all the modifiers from the bones. That massed up the animation, the crow was turkey on crack, time to take a step back.
Problem five: before removing the modifiers I went over the hierarchy of the bones, the feet have IK (don't know how the script reacts to IK). So I removed the IK from feet and exported, the animation was still on crack and the feet are now inside the bird. Since I removed IK I needed to go over bone parenting for the feet, I did and fixed the feet.
Problem six: When going over the bone hierarchy I saw that sometimes the rotation method for a bone, changed between "XYZ Euler" and "Quaternion WXYZ". So I fired up some models with animations from the asset pack, all bones always have "Quaternion WXYZ" so I changed all the bones of the bird to that. The model exported, but crashed the game, and GMT went into an endless loop that I had to kill from process explorer to get my computer back
lets get back to basics.
Lets remove all animation data from the rig, lets remove all the modifiers from the bones and every and all transformation or constrain, lets reset everything to rest pose.
Can I export the model with a rig enabled with no animation, YES, model is fine inside the GMT and the game.
Can I animate the rig myself with a few keyframes and export that animation, YES , but it warps, ok we have a weight issue.
Problem seven: Many game engine have a limit to how many weights can be assigned to vertices, industry standard is 4.
What if I tell blender to limit bone weight to vertices to 4 (console tells my I have affected around 103 vertices !!!!!!)
Model exports and test animation does not deform the mesh, but still something is strange !!.
Problem eight: Can a vertex have the total weight assigned to it, a higher value then one ?, never seen that in any of the models from the asset pack, so lets normalize all the weights to one.
Everything exports, but still the animation is a little off.
So at this point I think lets, copy the poses from the original file into every frame of the clean rig, so I have the correct animation and see how that looks. NO, everything crashes, both the game and GMT what the effing hell is going on, I just copied the poses from the the original file, this should have worked, but didn't.
Ok, back to clean rig without animation, this is just 25 frames, I can do this by hand having two instances of blender open and simply manually setting every frame like the original file.
Everything exports, but the animation is off
The top position extends way behind the blender animation and the lowest wing position doesn't go nearly as low as in the blender animation.
The rig has no constrains, there are no modifiers on the rig, the animation is baked, why is this happening ?, why am I doing this on a Friday ?, why I'm I not drunk somewhere ? (because of social distancing dude) ..... right, lets continue then .
Skuggasveinn.
To say I'm having trouble getting this into the game correctly would be an understatement, this is one crazy bird.
There is nothing wrong the blender file per se, the export script just expects things to be in a certain way, and if they aren't, all kinds of weirdness happens.
Problem one: The hierarchy of the model is not what the script expects.
We need a game_matrix node, RootNode and a local_srt, also in this model the mesh is parented to the rig, in all the LoG2 animated models I have seen the mesh is parented to the local_srt node. After setting up the hierarchy the model exports but I got the same error you got when trying it in game or with the GMT.
Problem two: The model has custom shapes for some of the bones, very handy for animating the crow, but I don't know how the script reacts to it, so I changed the bones to standard again. The model DIDN'T export, I got a new error that pointed towards tangent space errors for the faces.
Problem three: The model has a mix of triangles and quads (tangent space error), the script wasn't handling it. This was an easy fix with the blender build in command to triangulate the faces. The model exports but AGAIN the same "D3DERR_INVALIDCALL" as from start.
Problem four: The bones have active modifiers on them (copy rotation, constrains etc). None of the model from the asset pack have them, and they are really not needed once you have baked the animation. So I removed all the modifiers from the bones. That massed up the animation, the crow was turkey on crack, time to take a step back.
Problem five: before removing the modifiers I went over the hierarchy of the bones, the feet have IK (don't know how the script reacts to IK). So I removed the IK from feet and exported, the animation was still on crack and the feet are now inside the bird. Since I removed IK I needed to go over bone parenting for the feet, I did and fixed the feet.
Problem six: When going over the bone hierarchy I saw that sometimes the rotation method for a bone, changed between "XYZ Euler" and "Quaternion WXYZ". So I fired up some models with animations from the asset pack, all bones always have "Quaternion WXYZ" so I changed all the bones of the bird to that. The model exported, but crashed the game, and GMT went into an endless loop that I had to kill from process explorer to get my computer back
lets get back to basics.
Lets remove all animation data from the rig, lets remove all the modifiers from the bones and every and all transformation or constrain, lets reset everything to rest pose.
Can I export the model with a rig enabled with no animation, YES, model is fine inside the GMT and the game.
Can I animate the rig myself with a few keyframes and export that animation, YES , but it warps, ok we have a weight issue.
Problem seven: Many game engine have a limit to how many weights can be assigned to vertices, industry standard is 4.
What if I tell blender to limit bone weight to vertices to 4 (console tells my I have affected around 103 vertices !!!!!!)
Model exports and test animation does not deform the mesh, but still something is strange !!.
Problem eight: Can a vertex have the total weight assigned to it, a higher value then one ?, never seen that in any of the models from the asset pack, so lets normalize all the weights to one.
Everything exports, but still the animation is a little off.
So at this point I think lets, copy the poses from the original file into every frame of the clean rig, so I have the correct animation and see how that looks. NO, everything crashes, both the game and GMT what the effing hell is going on, I just copied the poses from the the original file, this should have worked, but didn't.
Ok, back to clean rig without animation, this is just 25 frames, I can do this by hand having two instances of blender open and simply manually setting every frame like the original file.
Everything exports, but the animation is off
The top position extends way behind the blender animation and the lowest wing position doesn't go nearly as low as in the blender animation.
The rig has no constrains, there are no modifiers on the rig, the animation is baked, why is this happening ?, why am I doing this on a Friday ?, why I'm I not drunk somewhere ? (because of social distancing dude) ..... right, lets continue then .
Skuggasveinn.
Re: Crow model Blender file with rig and flying animation
Oh my goodness - I hope you are still well. Never expected such a lot of work...
Re: Crow model Blender file with rig and flying animation
I can provide a tiny bit of information for a few of these issues!
The script doesn't care about your IK settings, you can safely leave IK on.Skuggasveinn wrote: ↑Fri Nov 20, 2020 8:55 pmProblem five: before removing the modifiers I went over the hierarchy of the bones, the feet have IK (don't know how the script reacts to IK).
Grimrock's model format only has room for 4, yes. If you export a vertex with more than 4 bones assigned to it, the exporter script will discard some of them.Skuggasveinn wrote: ↑Fri Nov 20, 2020 8:55 pmProblem seven: Many game engine have a limit to how many weights can be assigned to vertices, industry standard is 4.
Non-normal vertex weights will technically "work" in Grimrock - you won't get any crashes or anything from them - but they behave completely differently from how they behave in Blender, which makes them pretty useless in practice.Skuggasveinn wrote: ↑Fri Nov 20, 2020 8:55 pmProblem eight: Can a vertex have the total weight assigned to it, a higher value then one ?, never seen that in any of the models from the asset pack, so lets normalize all the weights to one.
Everything exports, but still the animation is a little off.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
- Skuggasveinn
- Posts: 562
- Joined: Wed Sep 26, 2012 5:28 pm
Re: Crow model Blender file with rig and flying animation
And we are done
https://youtu.be/cexKGzZZceA
Like minmay pointed out, script ignores a lot of things, bone constrains and IK can be kept. What really is needed is to have the hierarchy 100% correct, you need to triangulate the model, remove the custom bone shapes (that messes with the script), you also need to remove the shapes the custom bone shapes are using (or hide them), then bake the animation before exporting anything.
crowcontroller in the game seems to be unfinished as well ,
It is only seen inside the forest.lua object file.
The idea seems to have been that the idle animation is the crow on the ground, and it alternates between idle and peck, then when the party gets near it takes flight with fly animation and then uses fly and glide when in the air.
The controller does detect the party and gets the model into the air where it roams around, but it never switches between animations, in the video I have already made the crows fly, and there are 2 definition, one with fly (using juho's animation) and another with glide that I did.
After the party has gotten near to the crows and they start flying, they seem to fly around forever, and never land back (or at least I didn't wait long enough and I kept the level running for some time).
But in the air, this looks really good
kind regards.
Steingrímur.
https://youtu.be/cexKGzZZceA
Like minmay pointed out, script ignores a lot of things, bone constrains and IK can be kept. What really is needed is to have the hierarchy 100% correct, you need to triangulate the model, remove the custom bone shapes (that messes with the script), you also need to remove the shapes the custom bone shapes are using (or hide them), then bake the animation before exporting anything.
crowcontroller in the game seems to be unfinished as well ,
It is only seen inside the forest.lua object file.
SpoilerShow
Code: Select all
defineObject{
name = "crow",
components = {
{
class = "Model",
model = "assets/models/monsters/crow2.fbx",
},
{
class = "CrowController",
},
-- {
-- class = "Animation",
-- animations = {
-- idle = "assets/animations/monsters/crow/crow_idle.fbx",
-- peck = "assets/animations/monsters/crow/crow_peck.fbx",
-- fly = "assets/animations/monsters/crow/crow_fly.fbx",
-- glide = "assets/animations/monsters/crow/crow_glide.fbx",
-- },
-- playOnInit = "idle",
-- loop = true,
-- },
},
placement = "floor",
editorIcon = 252,
reflectionMode = "never",
}
The controller does detect the party and gets the model into the air where it roams around, but it never switches between animations, in the video I have already made the crows fly, and there are 2 definition, one with fly (using juho's animation) and another with glide that I did.
After the party has gotten near to the crows and they start flying, they seem to fly around forever, and never land back (or at least I didn't wait long enough and I kept the level running for some time).
But in the air, this looks really good
kind regards.
Steingrímur.