Character Morphing UDK

Hello there!

I am trying to create a character morph sequence that allows for player control over each state of the morph, within UDK.
Ideally I want to create the morph between these two states:

However, although I think I have the mesh and texture morphing aspect sorted, the extreme contrast between the two states means that the rig set up will be wrong for one or the other. This is because the pivot points for the limbs will be incorrectly placed for one of the states.

I do not know for sure, but my guess is that a game like Brink manages this since the two character states are similar enough, for limb position not to alter too much, thus a single rig can be used.

I am not sure what is the best way to tackle this problem. Ideally I want to create this as a real-time event, working without camera edits. As far as I know, it will not be possible to have the rig (after the morph animation is complete) adjust to fit the new morph state, since the weighting of the bones would result in horrible vertex tearing.

Could I code for some kind of adjustment of the rig and how would I go about doing this? I have created .ini files for custom characters before, but this has been for adapting Unreal’s existing skeletal rig, in the way GeoDav explains.

Would some kind of blend between a two-rig-set-up be possible?

Another idea I was thinking about, was to instead morph the movement animations (forward, left, right, back etc) and avoid having to rely on the rig to animate these. The problem with this is that it is not a very good way of controlling the whole animation/tweening frames.

I fear that a ‘smoke and mirrors’ effect will be necessary, using camera edits and two different characters rigs. I am not sure how to do this yet, but I am guessing it would involve hiding one character to expose the other. I know this is possible for static meshes, but not dynamic ones.

Any support with this would be much appreciated, even if it means I am going down the wrong route completely.

Hi Patackular,

as far as I expect the morphing in Brink is not during gameplay-runtime, is it?
So maybe they coded a nice computing function that alters the rig while morphing the mesh during the whole customization sequence and not in game. That might not be a problem. So this approach is either heavy on the asset creation for each state or highly complicated to be coded.

But you can actually try to build one intermediate skeleton between for both characters. I assume the proportions stay the same, so you only want to “scale” the skeleton. Try do to animate the “scaling”, which is actually the translation of the bones by hand, as one animation cycle from small to big.
This way you have one animation for that.
Now when you are animating the whole character everything will be calculated as rotations on the bones. It does not matter if you animate the big or little one here.
After that you can try to create a blend graph in the udk to firstly use the “scale” animation(translation of the bone positions!) and afterwards use the actual animation(only rotation values!).

Maybe this will do it for the skeleton. :slight_smile:

If it accordingly works by morphing between the two meshes at the same time, I don’t really know. But as an alternative you could blend between them via the materials alpha channel of each mesh.

Cheers,

Chris

Hi Chris

Thanks for the reply!

I had not played Brink so I was not sure and that makes sense, about it being during customisation.

I think I understand building an ‘intermediate’ skeleton between both states, but I do not understand what you mean by animating the scaling of the rig.

Blending the position of the bones sounds interesting!

Pat

I don’t remember the details from the presentation, so I’m not sure what they’re doing vis-a-vis sharing animations among the rigs, but one thing to note is that the body-type customisation is strictly limited to 3 preset body types (light, medium, heavy), and not arbitrary blends between them.

if you do a morph animation to scale the rig and then morph the mesh at the same time, won’t you end up with double transforms on the mesh?

one super super hacky way (i was tentative to even suggest it, haha) might be to keep the 2 rig idea. do the morph animation in DCC (maya max whatever): at the time of morph, you freeze the small rig skeletal mesh on its last frame, bake out the entire morph animation to vert animation in DCC, swap out the in-game skel mesh with a static mesh and play the vert animation on it of the morph itself, then swap out your static mesh with a skeletal mesh of the new larger rig at the end of the vert animation. it is not scalable or reusable and any adjustments would be a real pain in the ass to implement but it is an idea.

but one thing to note is that the body-type customisation is strictly limited to 3 preset body types (light, medium, heavy), and not arbitrary blends between them.

I know body customisation in UDK is limited to the pre-set types, but I was thinking along creating a custom rig like Mike O’Rourke demonstrates at http://www.fritzstudio.com/

one super super hacky way (i was tentative to even suggest it, haha) might be to keep the 2 rig idea. do the morph animation in DCC (maya max whatever): at the time of morph, you freeze the small rig skeletal mesh on its last frame, bake out the entire morph animation to vert animation in DCC, swap out the in-game skel mesh with a static mesh and play the vert animation on it of the morph itself, then swap out your static mesh with a skeletal mesh of the new larger rig at the end of the vert animation. it is not scalable or reusable and any adjustments would be a real pain in the ass to implement but it is an idea.

Jeremyc, let me make sure I understand what you mean.

Is that the idea? I guess that is the kind of smoke and mirrors way I was talking about, but to be honest it would probably be the most manageable, especially in Kismet.

It’s a different engine, but would Spore be a good place to look at maybe how they implemented a multipurpose rig?

[QUOTE=Patackular;14330]=

Jeremyc, let me make sure I understand what you mean.

Is that the idea? I guess that is the kind of smoke and mirrors way I was talking about, but to be honest it would probably be the most manageable, especially in Kismet.[/QUOTE]

yep you have it right there… i guess it could be called smoke and mirrors but if you’re in game development then you know most of game development is smoke and mirrors by those standards =). it would prevent you from having to do camera cuts and clever camera angles to hide the morph, so there’s that at least. just wanted to get the idea out there… i don’t claim that it’s a good one haha. the problem is a difficult one to solve.

It’s a different engine, but would Spore be a good place to look at maybe how they implemented a multipurpose rig?

Thanks for the suggestion, but I really want to get this working in UDK. I will have to look into the Spore engine though and see what it can do :smiley:

yep you have it right there… i guess it could be called smoke and mirrors but if you’re in game development then you know most of game development is smoke and mirrors by those standards =). it would prevent you from having to do camera cuts and clever camera angles to hide the morph, so there’s that at least. just wanted to get the idea out there… i don’t claim that it’s a good one haha. the problem is a difficult one to solve.

Yeah, thanks jeremyc. I did not mean to sound ungrateful, just meant it was an alternative to creating the character morph as one whole asset. I am sure it is probably the least tedious way of doing it, especially since coding for some kind of blend might be all kinds of hell.

I think I can use a Toggle Hidden to do that somehow… http://udn.epicgames.com/Three/rsrc/Three/KismetReference/kismetobject_096.jpg …not sure if it can be used for playable characters.

@jeremyc:
You’re right, the double transformation would make the whole thing impossible.
Your suggstion of using a normal morph between static meshes is nice, but it does not give you the possibility of morphing between any state of the rig, e.g. during walk, run, jump, etc…

But your pointing in the right direction. :slight_smile:
When you have the small guy and translate the bones to the bigger one as described and then make a clean cut between both characters it should be enough. Maybe a nice shader effect will support the overall intension as well.

small guy running-> translate bones to match the big guy rig -> swap characters(kaboom!) -> big guy running

:slight_smile:

it does not give you the possibility of morphing between any state of the rig, e.g. during walk, run, jump, etc…

That is a good point. I was willing to sacrifice that if it worked fine, but if I can get that working as well, it would be great.

small guy running-> translate bones to match the big guy rig -> swap characters(kaboom!) -> big guy running

I am afraid I do not understand what you mean by ‘translate the bones’. With the example above, I was suggesting hiding one character to expose another. Could you explainwhat you you saying? :slight_smile:

I am afraid I do not understand what you mean by ‘translate the bones’. With the example above, I was suggesting hiding one character to expose another. Could you explainwhat you you saying? :slight_smile:

Sure, no problem. :slight_smile:

As I was suggesting earlier you actually translate(move) each bone from the little guy’s layout to the big guy’s one. In detail every bone should change their position as part of an animation. First you move the hip/pelvis than from the in- to the outside every bone to its destination point of the big character. How long this animation is does not matter at all, e.g. 50 frames.
As long as the proportions of both skeletons won’t change(the small guy is only a scaled version of the big one or vice versa) you can share each animation asset for both skeletons, e.g. walk_cycle. the only difference is the translated bone positions, which indicates the overall scale. :wink:
This only works if you build an animation set that can handle this translation animation(translation only!) priorly to the actual animation asset(rotation only!). This way you could blend between the character’s scaling over the first translation animation.

Descripton:
small guy running-> translate bones to match the big guy rig -> swap characters(kaboom!) -> big guy running

small guy running/big guy running = same animation asset only rotations.
translate bones = see above

Does this logic make any sense? :D:

Hey Castortroy, sorry it has been so long. What I am thinking is that if you translate the bone positions with the character rigged, you will deform the mesh horribly. For example if the bones move from the frame of the small guy to the big guy, parts like the arms of the mesh will be torn, no?

Hello everyone. Here is an update on my morphing character in UDK. I went for using linear interpolation to blend between textures and hiding/unhiding between skeletal and static meshes for the model morphing.

Still need to work on the textures more, so any critique or suggestions would be great. Apologies for the video play rate, my computer isn’t great.

I have uploaded my package and level if anyone wants to take a look. If you play the level in the editor I have set ‘E’ to trigger the morph and ‘Q’ for a dodgy reverse morph. I am using the November 2011 build.

wow! awesome that’s good idea I’m interested such animation Thanks for this artical posting

Hey Patackular,

you did it. :slight_smile:

Looks good.

So, how have you done it in detail?
Skeleton Model(animation) small guys -> static model interpolated -> Skeleton Model(animation) big guy?
This means the model has to be in the exact same pose for resizing, right?