Please assist; retroactive modifier application.

Hello,

I’m about a month into learning the BGE by studying the valuable resources here and elsewhere, whilst unfortunately incapacitated with an ailment. I’m striving toward compiling some semblance of a professional wrestling game, though the learning process and the journey is more my hope than the lofty end-product goal.

I’ve run into a problem (and perhaps several more I’ve overlooked), and I’d very much appreciate any assistance or advice. I’ve tried to attach the .blend file, but it’s not uploading correctly at the moment… I’ll try again, if anyone might have the time to look over it.

The most pressing slip-up is this; I’ve completed my mesh, armature, rigging, skinning, created animations and logic bricks in many states, and I’ve just noticed that neither my subsurf nor armature modifier were ever applied. In addition to this, my mesh, it turns out, has only been made a child of the armature under ‘object’ and not ‘armature.’

I’ve researched and tried suggested solutions for this, yet none seem to correct my situation without undesired effects such as the animations no longer influencing the mesh, the skinning for the arms deforming, or the mesh itself changing unpleasantly.

I’m sure it was an embarassing oversight early on that’s caused this, but I wondered if anyone might know a way to correct this somewhat retroactively, without ruining the armature, mesh and animations.

Thanks very much for your time!

ok, do you have always run armature in the armature?

or, do you have a Action applied?

having the models, means you can re-rig and sub surf again,

if not, drawing it again is good practice, and it usually ends up better, the second time around,

I would animate using motions in the game engine personally, and moving IK targets, as this can be changed with code, and a “action” is always the same,

Attachments

RigaMandit.blend (626 KB)


Feel free to do anything you want with that rig, :slight_smile:
I used to think it was something special, but can make it in like 1 minute now…

@InTheZone - Hello, and welcome to the forums.

So, before you try to solve the issue, be sure to save. Also, ensure that a Fake User (the F icon) is assigned for your actions so they’re not lost when you save the blend file.

Now, if the animations are working correctly already, you should be able to leave it alone, basically. If the animations aren’t working correctly (but the vertex groups for the armature bones are present in the mesh), then you should be able to unparent the mesh from the armature, and set the parent again, this time using one of the options under the Armature section.

The empty vertex groups selection in the parent menu might work, but it might wipe out the vertex group settings (possibly, since that’s what “empty vertex groups” mean).

Also, ensure that there is just one Armature modifier for the mesh you have. Otherwise, the effects will stack (moving a bone will deform the mesh twice as much as necessary, for example).

You should also be able to apply Subsurf without issue (it shouldn’t really alter the animations).

@BluePrintRandom - Currently, I believe it’s a bad idea to use IK joints for animation, especially for a full character, as it’s quite slow and unoptimized. As you can see, it also doesn’t give very smooth animation like a normal action would. Your example runs at 30 FPS on my machine, for just one character. Even with optimization, I don’t believe IK is the way to go for procedural animation. You would probably do better manually controlling the bone rotations via Python.

Thanks for the replies; they’re very much appreciated.

I have indeed saved the .blend file before trying to tamper with the modifier stack, as well as having fake users assigned to all of my animations.

Coincidentally, the animations in fact are working in both the animation screen, and when playing the game within the game logic screen. I just figured that even if the modifiers not being applied doesn’t mess anything up now, it might well do when I’m setting it all up to run as a game externally. Is this correct? Should I be trying to sort out the modifier stack now, even if it’s not jeopardizing the animations as it is right now? I’m also concerned there might be other negative implications I’m overlooking. There is indeed only one armature modifier applied to the mesh, too.

As far as applying the subsurf, it does seem to be altering the mesh in somewhat subtle ways around the shoulders, thighs and chest… the mesh turns from looking properly shaped in these areas, to just a little ‘jagged.’ Now, the subsurf modifier is second in my mesh stack, after the armature modifier; even if I shift it to first before applying, it still deforms the mesh in this subtle yet undesirable way.

I’ve been using action actuators on the armature object in the game logic, to play the animations I’ve created; after reading both of your suggestions, I’m wondering if that’s right to have done.

I’ll list the heirarchy for my ‘character’ object (mesh + armature) as depicted in the Outliner window, below, with hopes it might shed light on anywhere I’ve gone wrong;

-Armature
+Animation
Pose
+Armature
-Character (my mesh)
Animation
+Cube.001 (not sure what this is, actually…)
-Modifiers
+Armature
Subsurf
+Vertex Groups

Thanks again.

@BluePrintRandom - Currently, I believe it’s a bad idea to use IK joints for animation, especially for a full character, as it’s quite slow and unoptimized. As you can see, it also doesn’t give very smooth animation like a normal action would. Your example runs at 30 FPS on my machine, for just one character. Even with optimization, I don’t believe IK is the way to go for procedural animation. You would probably do better manually controlling the bone rotations via Python.

the ik chains are just targeting rigid bodies I believe,

this is early on in my work, so is VERY high poly :slight_smile:

this runs 250 frames per sec
on my 8 thread 1.6 ghz

Attachments

RigaMandit (4).blend (606 KB)

Sorry, the spaces before each entry in my Outliner depiction, have disappeared on posting… how embarassing.

Curiously, everything does seem to be working just as I have it set, now; that is, the mesh is only ‘object’ parented to the armature (rather than ‘armature’ parented), there still exists an armature modifier, and the subsurf modifier is below the armature modifier in the mesh stack.

From what I’ve read, it seems this shouldn’t be working, but after changing these circumstances in various ways in unsaved trials… changing anything from that original (dubious?) set-up, results in my animations not playing within the game engine. I honestly don’t understand what’s happening, nor what the consequences would be for further down the road on the project.

I’ve attempted to attach the .blend once again, but I’m still recieving a ‘File upload failed’ error, after seeing the upload progress reach 100%.

Maybe you found the solution and problem to the animations not playing in 2.66X ?

BluePrintRandom, I quite honestly wouldn’t know either way. Haha.

An update; I think I may have been mistaken in thinking the armature modifier needed to be “applied” at all (…?), and I may only need to apply the subsurf modifier (which I’ve been able to do with acceptably minimal mesh-altering, by deleting the armature modifier, applying the subsurf modifier, and then adding an armature modifier again).

Now at this point, however, under the mesh’s Object information panel, the armature parenting is still set to ‘object’ and not ‘armature.’ This seems to be the only way it’ll work for me. My question now is, were my initial concerns correct, that it should be listed as ‘armature’ and not ‘object?’ It works only the other way for me right now, and if it’s not going to cause any future problems… ought I just to keep it as it is?

Thanks once again for indulging my naivete.

I should’ve mentioned, the Armature modifier shouldn’t be applied actually. Sorry about that! If you apply the modifier, the mesh will be stuck in the pose of the armature - leaving the armature modifier un-applied allows the BGE to deform the mesh in-game. Other modifiers should be applied if at all possible, though, to help speed up the game.

@BluePrintRandom - Again, about 37 FPS or so on my (pretty much average, I guess) computer.

I should’ve mentioned, the Armature modifier shouldn’t be applied actually. Sorry about that! If you apply the modifier, the mesh will be stuck in the pose of the armature - leaving the armature modifier un-applied allows the BGE to deform the mesh in-game. Other modifiers should be applied if at all possible, though, to help speed up the game.

Yes, you shouldn’t actually add an armature modifier, as it automatically spaws as ou parent the mesh to the armature. Be sure o use you animations in different layers of you action actuators, if they are to play together.
Since you are using states, I guess you know how to manage your logic bricks… I don’t encourage you to use any ther modifier besides the armature. If you model for gaming, low poly is adviced. But even on medium detailed models, is good practice to place every polygon where it’s needed only!
I think you need a bit more posts to be able to upload.

Ah; that explains that! Thanks, torakunsama.

The questions I’m left with are these;

  1. Is it an inescapably bad thing to have the mesh-to-armature parenting set to ‘obect’ rather than ‘armature’ (since that’s the only way it seems to be working for me right now)?

  2. Is it passable to have my mesh set as my physics object, since the physics bounds of my character need to change quite flexibly with my animations? Having tried a separate physics object, I found I couldn’t get this object to follow the intricate animations closely enough.

  3. Perhaps as a consequence of either/both of the above, I’m not getting any collision between my character (mesh+armature) and his surroundings, except for the very plane he initially stands on. This seems to be the case whether I have my physics object (the mesh, in this case) set to either dynamic or static. He just walks straight through his surrounding objects. I’m using location movement in the simple motion actuator to provide movement. Ideally, he should come to a complete stop upon colliding with other objects, rather than a) walking straight through them or b) sliding/bouncing/etcetera.

Thanks so much for all your time!