RDNWiki: DOWObjectEditor/ObjectEditorBasicTutorial ...

RDN Wiki Home | Page Index | Recent Changes | Recently Commented | Users | Registration | Login:  Password:  

Object Editor Basic Tutorial


Contents

Introduction


This tutorial will introduce you to the working of the Object Editor. It will provide you with a quick basic overview of what can be accomplished in the OE, and run you through the setup of some basic animations for a new unit.


What we will be doing is setting up typical animations that units exhibit. First of all we’ll setup running and idle animations. We will then setup running and idle while firing animations. Finally we’ll setup a death animation.


In this tutorial we’ll be working with the scout model. This tutorial assumes that you’ve already modeled your unit, and have made any appropriate animations as well or will be using xref animations.


First thing you’ll want to do is Select File-> New and select the sgb file of the unit that you’ll want to animate. When you first open the file the only thing that will be filled in is the Model Properties and the animations that the sgb file contains will be visible in the Anims/Motions/Actions rollout. The bold animations are local unused animations. So without further ado, let’s begin.

Setting up a unit

Running


The first thing you’ll want to do is to setup a new action, and call it default.


First click on “New Action”, and in the dialog pop-up that appears type in “default”. A default game action should appear under “Game Actions”. Note that game actions are actions that the game can call specifically. These are outline in the ActionGameNames.lua file


Now that that’s done you’ll want to setup the actual running animation. Select “XREF Anims”, click “Load From” and select the Space Marine, select the Run_1 animation add it to the selected animations, and click OK. You should now see a “Run_1: XREF: space marine” action that has been added.


Now Create a new motion, call it “run”. You’ll notice that this motion is red, this means that it doesn’t have any associated animations. Now select the newly created run option and under options from the animations drop down select the “Run_1” animation and click add.. Make sure that this motion is set to looping. Once you refresh the screen, the motion should no longer be red, however, it will be bold which indicates that currently the motion is unused.


If you now select the “run” motion (double click on it), you’ll notice that nothing appears. This is because the right visibility (vis from now on) animation hasn’t been chosen. You can however see the running animation by going into Info->Display Skeleton. In general vis animations work in the following way: you have a base model, to this base model weapons and upgrades are added, when a unit has an upgrade, that “animation” (a single frame animation in reality) is shown.


Now let’s make sure we can see our unit. Create a new motion and call it vis_bolter. Add the “Scout_bolter_vis” animation to the motion.


Create a new action, call it “moving”, it’ll be created under internal actions, but we’ll add it under default. Select the default action, and action properties. Add the moving action under default.


Select the moving action. And add to it the vis_bolter and run motions. Make sure the vis_bolter motion is on top of the run motion. You can now play the motion and see the scout running. When you refresh the anims/motions/actions view, you’ll notice that the moving action has turned blue. This means it can be played in the OE and has motions attached to it.


Now, we’ll want to create a new modifier so that we can tell the scout unit how fast he’s moving.


In the modifiler list, create a new modifier, call it velocity. Now go into the modifier properties, from the variable drop down select velocity, set type to Speed scale. Set the ref value to 16 (this is the movement speed of the unit taken from the attribute editor).


Select the run motion. Under the timing section select the velocity modifier. Also set transition out (sec) to 0.2 (this is used to transition between one animation and another, if you do not apply this the unit will snap out of any animation it’s currently in and snap into an animation that it just entered, you’ll sometimes want to tweak these values to get a nice transition between animations, but 0.2 will work for our case.


Now select the moving attribute. You will notice that the unit isn’t moving. What you have to do is set one of the variables at the bottom of the screen as the velocity variable. Now, as you increase the velocity value you will notice that the scout moves.


So, you’ve got yourself a running scout. (NewUnit_Running.ebp)

Idle


The next thing we’ll do is add the idle animation. This proceeds somewhat similar to the running animation.


First X-ref the idle motion from the space marine (the IDLE_1 animation)


Create a new motion and call it idle


Attach the idle animation to this motion, and add in the 0.2 transition out effect.


Now, create an idle action, and add it under the default action as we did before. Be sure to also associate the idle motion with the action as well as the vis_bolter motion.


At this point we have both an idle animation and a running animation, however, the game doesn’t know how to transition between them. This is where clauses and conditions come in. Basically clauses and conditions define when certain functions happen.


First create a new condition, called idle. Now create a new clause and make it a float based clause. Under Clause properties Set variable for the idle clause to be velocity, leave the comparison at equals and leave the both value and default at 0.


Under conditions, select the idle clause and add the idle clause to it.
Now do a similar procedure for a moving clause (add a new moving clause and a moving condition that has velocity greater then 0)


Now back to the actions menu. Select the default action. In the Action properties select moving, set “Compare type” to “if” selection condition to “moving” and then select idle, and set this condition to “else”.


Now if you play the default animation when you set the velocity to 0 the unit will go into idle mode when you increase the velocity he will begin running.


NewUnit_Running_and_Idle.ebp


Now that we’ve got the unit running and idle, it’s time to setup it’s idle fire sequence. First up is the idle fire, and after that the running fire.
First thing, as before, is we’ll xref in the firing animation from the Space Marine. This is the “FIRE” animation.


After this, create a new motion and call it fire. Then create an action and call it “Idle_firing”. Now attach both the firing animation and the vis animation to this action. Finally place it under the default action.


Now that that’s done we have a unit that can fire but can’t aim. To get aim working create a new motion and call it aim_horizontal and attach the aim_idle animation to it. Attach this to the idle_firing action.


Create a new modifier, call it aim_horizontal, from variable select Aim_Horizontal_Main, and set the type to absolute time and the default value to 50 (this represents 50 percent and is equivalent to the unit facing forward. This is due to the fact that the animation is a 360 degree animation of the torso and so 50% would be 180 degrees, and thus facing forward)


Now go back to motion properties and add the aim_horizontal modifier. Your unit can now aim horizontally and fire. However we’re still not done, we have to be able to tell the unit when to fire.


So, we create a new condition and call it idle_fire, we also add a new range_firing clause, this one we make boolean, set variable to Weapon_Range_Firing_Main, in comparison set equal for value set true.. Now add this clause to the idle_firing condition.


Now go back to the actions menu and make sure that the conditions says if moving then moving if idle_firing then idle_firing else idle.


And now we have a unit that idle fires horizontally, however we still need to add vertical aiming and firing, which proceeds much in the same way. Create a new motion, import aim_vertical_idle from the space marine, add aim_vertical modifier with Aim_Vertical_Main as the variable (with default of 50), and finally add the aim_vertical motion that you just created to the aim_idle action.


Now you have a complete unit that can aim while idle. Next up is the aim while firing animation.

Running- Fire


Setting this animation is in many ways similar to setting up the idle fire animation animation.


Create an action and call it move firing. To that action add the vis fire and run motions. You’ll need to xref RUN_3 from the space marine as well as the AIM_VERTICAL. As usual you’ll want to create an aim_fire_horizontal and aim_fire_vertical motion, but for these you can use the already existing modifiers in place. Then simply add the following to the to the move_firing: the vis_bolter, aim_fire_vertical, aim_fire_horizontal, moving_fire and run_fire actions.


Take a look at the NewUnit_FiringDone for an example.

Die 


Finally let’s setup the die animation, which is a fairly simple task.


First, create a new action and call it die, it’ll be created in the game action folder. Now Xref the die animation from the space marine (Die_1). Create a motion with hold_end and attach the die animation to it. (note that you don’t need to set an out transition).


Now, add the die motion and the vis bolter motion to the die action and you’re done.

Conclusions


Hopefully this tutorial has given you a good idea of how to setup a unit in the object editor. This is of course a minor subset of the actions necessary to get a fully animated unit in game, but it’s a good starting point. The object editor can also be used to setup sound effects and weapon fx. You may want to read the bolter tutorial if you’re interested in hooking up fx to the models. One thing that wasn’t mentioned in the bolter tutorial was the fact that you can copy and paste references from other models into your models (ie. Import motions, and then just copy and paste their event list), which is something you may want to do when you first start working with the object editor and events.

Links


Object Editor
Mod Tools
RDN Wiki Home

End of Page


Referring pages: DOWObjectEditor
DOWTutorials

There are 6 files on this page. [Display files/form]
There is no comment on this page. [Display comments/form]