Home Technical Talk

Mech: Individually animatable Modular sections,

As the title says, i'm going to be starting a project for my final thesis study at Master's level.

Basically, what i intend to do is create a mech (the easy part) and have it customisable in UT3. Now, this is also easy as it's just basically creating a custom UT3 character, however, my main intention is to have each section of the model i.e. shoulderpads, arms, torso etc, have it's own animations for when it is equiped. Thus enabling the mech to "test" out his weapons, new parts etc each time you change the section.

For example: change his shoulder pad to say a rocket pod pad, the rocket pods will open, maybe fire a rocket around the screen, then close, (animations would be similar to maybe the ironman suit or the like). Or change his arm to a minigun attachment, the gun cycles, mech points it at the camera for a short while then berings it back down again.

This means that not only would each individual section need it's own animations, it'd need individual animations for the whole mech depending on the part attached.

My main question here is, what difficulty is this in UT3, has anyone attempted anything similar? i know that pretty much anything is possible using code, so hopefully this will also be doable.

The actual finished mech model will be using a "playable character" base as aposed to an NPC, however it won't be a playable character in the game, just the customisation screen is what i'm doing. (you'll still probably be able to enter a game with it, but things might not work as intended since the in-game part isn't what im focusing on).

So, any help on this would be fantastic.

My other question is, would it be easier to setup an NPC mech in UDK with all this custom animation and a custom UI for player options when changing the sections. (in essence, make the mech in UDK plus all the anim-tree's needed, and then create a UI that the player can use to customise the mech as if it were in a game).

Replies

  • SpeCter
    Options
    Offline / Send Message
    SpeCter polycounter lvl 14
    I would try to make some kind of "interface" for the animations.
    You can(at least i think so) attach pieces with their own bones and animations to another mesh and play them seperately.
    You just need to have something in the code which determines if it´s openable,closeable,rotateable etc. This could be determined by asking if the mesh has the specific animation(by animation names for example).
    If it has the specific animation you can play it , if not you can´t.

    In pseudocode it would be something like:

    function shot(Mesh mesh, String piece)
    {
    if(hasanimation("rotate"))
    {
    mesh.getModularPiece(piece).playAnimation("rotate");
    //shooting code here
    }
    else if(hasAnimation("open")&&hasAnimation("close")
    {
    mesh.getModularPiece(piece).playAnimation("open");
    //shooting code here
    mesh.getModularPiece(piece).playAnimation("close");
    }
    }

    I´m not sure if it´s really possible in UDK to do something like that, but you can do that with Ogre3D so I don´t know why it shouldn´t work.
    Just make sure you get a modular piece even if there isn´t one attached(a null piece) which does nothing obviously.

    Hope that made sense, i just squeezed out what i had in mind.It should work like that if you keep the naming convention for the animations the same for each modular piece.
  • Impala88
    Options
    Offline / Send Message
    Hey guys, sorry for not replying to this in so long, been quite busy.

    Ok, i understand the coding you've set out there SpeCter, and it's something i think i can get the hang of with what i need to do.

    I've also looked into using anim-trees effectively as well as anim-notifications for certain events.

    Right basically this is what i'm aiming to accomplish for this project:

    a detailed mech character. (this doesn't NEED to be a mech, however mech's are the easiest to do from my point of view and require the least amount of rigging/skinning so it cuts down on time)
    a custom UI layout for individual section control.
    a collection of animations per piece and for the overall character that can blend together.

    The jist of the project is to have a character in a customisation screen that seems to "interact" with the players choice. For example:

    When the player switches the mechs arms out for a different set, the mech looks like it recognises the new arms, and "tries them out" - for a gattling cannon attachment, the mech rotates the barrels, maybe aims it around the screen etc before settling back into an idel animation. This gives the character more life and allows the player to conect with the character a bit more rather than just having a stationary character standing there with a single animation while the sections change.

    To do this, i imagine i'll need to set out some custom codes to tell the engine when the player changes a piece and once that new piece is active on the mcharacter, to start the specific animation tied to it.

    So now, the first stage of the project is to come up with a suitable mech.

    I've ooked at current and past mech games, and come to the conclusion of 2 different mech types:

    bulky realistic mechs - non human appearance mechs, usually with reversed knee joint legs and a large cabin for the pilot. (matrix, avatar) these apear clumsy and slow when moving and give a sence of heavy metal movement when in motion.

    sci-fi fantasy mechs - very humann-like in appearance, but with current or even near future technology the mech would not be feesable. (zone of the enders, armored core etc).

    I need to get some opinons on what type of mech is the most common or the most enjoyed by the community. The end result will directly affect the outcome as the animations will be intended to be as realistic as possible. I also need to take into account the realism of the actual mech, since this project is two fold - academic thesis for my final project of my master's course at university, but also a kick ass mech model/textures and animations for my portfolio.

    hit me!

    edit: probably going to have to bump this later on, bit early in the morning server side.
  • SpeCter
    Options
    Offline / Send Message
    SpeCter polycounter lvl 14
    I like the bulky ones.Agile ones just seem like an fps with mechs for me.
  • Impala88
    Options
    Offline / Send Message
    yeah the bulky ones i enjoy over the over-the-top armored core styling. However, i'd like to get some better kind of movement in it rather than have a very machine style animation list. I've come up with an initial concept that combines the two, and has resulted in a mech that resembles the heavier mechs from armored core (massive heavy weapons ones) and the starcraft marine suits. once i finish this sketch and render i'll post it up here.
  • Impala88
    Options
    Offline / Send Message
    Ok. This project has changed a bit now since last time i posted. The original aim is now not complex or needed enough for it to be considered useful for a thesis. However, the new aim still uses a mech character, but will be a much more focused project.

    For the aim i intend to have a mech character with its two arms able to transform between 3 sets of weaponry:

    A hand with some kind of palm attatchment (similar to ironman).
    A large cannon.
    A large rotating gun with 4 barrels.

    For this i'm going to need to look into creating a custom rig as i was going to do with the previous project idea, however it will also need to use some kind of additional parts for the extra sections to animate when needed.

    I havn't attempted something like this before, so i have two different ways i think i could tackle this:

    Idea 1: have the 3 states of the arm (as low poly as possible) all present on the arm but hidden depending on which is being used, and when activated they simply animat out and swap with the currently active state.

    Pros: no model swapping, as it's only one model.
    cons: eats up resources as there are alot of hidden objects almost all the time.
    requires multiple animations for one object: each gun firing, hands moving, plus each of the transformation animations.

    Idea 2: have a seperate arm model for each state that has no custom animations EXCEPT for animations when the gun fires. have a 4th arm which has all three states at the same time, and which animates/cycles between the 3 states during the cycle animation. The way this would work is have the first state of the weapon on the character first, for example the hand state. The player switches to the cannon, the hand state is seemlessly replaced by the 3 in one model which then animates to the cannon. once the animation is complete, this model then seemlessly changes to the cannon only model and play continues.

    Pros: less resources used most of the time with only the one gun present any one time when not transforming (no idden objects).
    multiple arm models, meaning no need to share alot of animations on the same model (cannon only needs cannon firing + intergration with rest of body, 3in1 arm only needs the transform animation)

    cons: will need to create a total of 9 arms. 1 arm for each weapon selection (hand, cannon, rotating gun) and then 1 3in1 arm for each transformation :

    Hand -> Cannon
    Hand -> Rotating gun
    Cannon -> Hand
    Cannon -> Rotating gun
    Rotating gun -> Hand
    Rotating gun -> Cannon

    For starters i have my high poly mech character now complete with all three arm states.

    mech3dconcept.jpg

    I'll be needing some help from fellow modellers and scripters (kind of a novice at scripting) for unreal in order to get this working in game.

    The coding idea offered by SpeCter still has uses i think in this new project so i'll be trying to build on that where i can.

    Also, does anyone know where i can get any information on the transformers models in the transformer movie games? i'm pretty sure they use some kind of alternate model swap when transforming between the robot model and the car/vehicle model. Just can't seem to find anything on it.

    I think i'm also better off putting this in a new post with a new title to reflect the project now please post any replies in the new thread: http://www.polycount.com/forum/showthread.php?t=86053
Sign In or Register to comment.