Animated Art Assets Tutorial

From HEWIKI
Jump to: navigation, search

Icon 3dsMax.png Icon Maya.png

Contents

He advanced.png


This is an advanced level tutorial for artists, that should be accomplished after the Static Art Assets Tutorial.

Overview

An animated asset is almost the same as a static asset, except that it has some sort of motion associated with it. This motion can be created using a variety of means, including helpers and constraints, expressions, bone rigging, or straight keyframe animation to create and drive the motion. LODs do not apply to animated assets, so there is no need to create them. Occluders can be applied to an animated asset; however, it really doesn't make sense, so occluders are generally not needed with animated assets either, except in very rare and unusual situations.

Once artists have created an animated model in 3ds Max, it must then be exported as an animated asset. This page provides information on how to accomplish this.

Note: Specific details on how to get clean error free exports are here Hero Export Guide.


Animated Assets

Build the geometry

First thing to do is to build yourself a piece of geometry in 3ds Max. Remember to name it and to make sure it is clean. The example used here has several components that are separate animated objects in max.


Use a HeroMaterial

Next add a HeroMaterial to your Geometry. Materials are added within 3ds Max using a custom material, The HeroMaterial. If you need more than one HeroMaterial that is fine, you can assign a Multi/Sub-Object material with as many hero sub materials as you want or you can just assign individual HeroMaterials directly to the appropriate polygons. This is an Example of using a a Multi/Sub-Object material with two HeroMaterials, One for the main texture and a second for a glow texture.


LODs


Occluder Geometry


Snap settings

If you intend on adding snap setting so that the engine can move your asset on the snap grid, then please look at the Tile Sets page. This is rare for animated assets, but say you have a dungeon room with a permanent animated pendulum or something, adding snap settings would then be appropriate.


Export

Last but not least, export your asset through the Hero Export. Set the mode as Animated Asset and make sure that post processing is always on. Export unhidden is the most common way of exporting whats viewable in your view port. Remember to hide any unwanted helper or rigging objects. They will only add weight and confusion to your file.

  1. Hide any unwanted objects/helpers in the background before export


Upload

Now that your asset is exported, upload your resulting animated mesh file and .dds textures using the Repository Browser and then add your asset into HeroEngine.


Animation Callbacks To Script

Animated Assets authored in 3DS Max may embed note tracks just like in character animations (Maya does not support note tracks). If there are note tracks present in the asset, HeroEngine will perform a callback provided one of the classes making up the node within the engine implements the following method.

method onAnimationNote(note as String, time as Float)

Please note, you must GLOM a class that implements this method onto the node for the callback to be made and only ONE class comprising the node may implement the method.


If the node's LW_FIELD_SCRIPT property is set, HeroEngine will attempt to call a function implemented in that script regardless of the existence of note tracks to indicate the animation has ended.

// Return true to freeze the animation at the end
function onAnimationEnd() as boolean

Controlling the Animation of an Animated Object

Animated Objects only have one animation, but it can be controlled from script:

external function ResetAnimation(modelNode as NodeRef)
external function PauseAnimation(modelNode as NodeRef, paused as Boolean)
external function GetAnimationDuration(modelNode as NodeRef) as Float
external function SetAnimationLooping(modelNode as NodeRef, looping as Boolean)
external function SetModelAnimationSpeed(modelNode as NodeRef, speed as Float)

If you wanted multiple animations, or possibly different states, you would make the chest an animated Static_Character, or a States_System object.

See also

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox