PDA

View Full Version : Animations composed of multiple 3d models



roychr
11-06-2009, 07:40 PM
Hi,

I want to know if there is support for integrating multiple limbs with the animation editor. For example, I have a game with a player who can customize its appearance (multiple choice of arms, legs, torso and heads). Is this supported as a basic feature and if so, where can I find information on such system.

I know I could program it if I had access to source code, but I want to know the limitations of the UDK before making a switch for my current project on Torque3D to the UDK.

Also, does UDK support multiple animation files or sharing of animations between multiple models ?

Any information like tutorials, documentation or forum posting would be greatly appreciated.

badkangaroo
11-06-2009, 10:03 PM
You can use AttachComponent() to put other objects onto an object. each "actor" will have to be scripted into it's own class then spawned and attached to your main character. this also means that each attached component can have functions which the parent can use.

roychr
11-06-2009, 11:28 PM
You can use AttachComponent() to put other objects onto an object. each "actor" will have to be scripted into it's own class then spawned and attached to your main character. this also means that each attached component can have functions which the parent can use.

So basically this means that for example you can attach clothing elements with physX support to a 3d models for example ?

Denny
11-07-2009, 05:48 AM
Yes, you can attach physics objects and stuff like that. The attach function is pretty limited though as the object will be static and just follow a joint, not what you want for a character in many cases.

I suggest you either look into ParentAnimComponent or Mesh Merge. For any of them to work you first need the parent, this is the base mesh that should always be there when combining meshes. Let's say this is the naked player. If you want to give the player a Shirt you skin it to an identical skeleton and add it to the editor. If you choose to go ParentAnimComponent you essentially tell the Shirt to follow the character skeleton, there will be two objects running around but you can control them very well. It's not unusual that games use the head as a separate mesh with ParentAnimComponent. Things like individual morph targets, behaviors and materials are possible to do. The downside with ParentAnimComponent is that you get an object count, shadows will become more expensive and things like that. Here's where the Mesh Merge comes into place. What it does is take two meshes with identical skeletons and generates a new one from them. This is how Unreal Tournament 3 does with their characters. The upside is that you get one mesh, which means it will be a lot faster to render but depending on how high poly the character is you'll get a slight hitch each time you need to mesh merge. Another downside is that any morph targets will become obsolete as the vertex numbers changes, essentially making the morphs explode into randomness. The mesh merge can also be combined with a texture merge, is also used in UT3, which I won't go into detail about.

Unsure whether you should use Attach, ParentAnimComponent or Mesh Merge? If you want to add a static item that doesn't need to deform based on the character, like a helmet, gun or sometimes cloth, use attach. Otherwise look into ParentAnimComponent or Mesh Merge depending on if you want to focus on rendering or memory performance.

I hope that clarify things for you. :)

roychr
11-07-2009, 01:03 PM
Wow Denny,

I wish every reply was as in-depth as that. It answered all my needs, now I just have to find the documentation on the api, on that subject, The UDK documentation seems well organised but there is no real SDK references easy to find. I googled "ParentAnimComponent" and found results, i will look into them. It would be nice for any moderator to ask for a more centralized Script SDK doc.

Thanks again Denny !

Denny
11-07-2009, 01:14 PM
Forgot to mention; if you want to preview how ParentAnimComponent looks like you can open an AnimSet/Skeletal Mesh and add your mesh(es) to these entries.
http://forums.epicgames.com/attachment.php?attachmentid=327&stc=1&d=1257617561

The Extra Mesh1/2/3 will copy their animation from the Skeletal Mesh.

Glad I could help. :)