Game Development Community

dev|Pro Game Development Curriculum

AFX Spell-Design Blog #2 (Fire Tower)

by Matthew Durante · 03/20/2007 (3:01 pm) · 9 comments

I'm back, with another update on our progress with this new spell, one of many in a future pack of spells for Arcane-FX. The previous installment of this blog can be found at AFX Spell-Design Blog #1 (Fire Tower)

.
.
.

You're going to ask yourself why there's a Fire Tower blog with no Fire Tower. Well, the answer is I've just been concentrating on the casting of the spell, going all-out to make it exciting and dynamic, completely dismissing principles of efficiency and moderation in favor of the ultimate coolness. This has obviously become one of our "show-stopper" spells in contrast to the more practical type. I am now at the point where the tower rises up, but to see that, you'll have to wait for my next blog installment.

So here's where we're at:
www.arcane-fx.com/visuals/blog2-movieA.avi <7mb, 512x384>
www.arcane-fx.com/visuals/blog2-movieB.avi <4mb, 320x240>
Sorry for the large files, but there's some serious shaking at the end... Shake-FX.
[EDIT: they're both essentially the same, with varying resolution.]


=== Casting Zodiacs ===

www.arcane-fx.com/visuals/blog2-castingzodiac2.JPG
In the last installment I mentioned that the zodiac felt upside-down to me, relative to the orc and the tower's design, so I played with it some more to "right" it. Once I had rotated the "horns", I completed the design by adding the bull's head to the bottom. Some more glow effects complement the bull-head-horns... Jeff has his doubts, but I think it's coooooooool.

Watch for the eyes!

There is a lot going on here with zodiacs, with multiple zodiacs turning on and off, layered in a complex sequence. Perhaps some of you are interested in more details but I'll save that for now...

=== Orc Animation ===

The animation on our hero has progressed, but there is still some funny-business at the end that needs adjusting. The animation itself ends before the spell completes, but I'm not yet sure how we're going to get the orc out of the path of the rising tower -- so I'm holding off.

I'm hoping Jeff can come up with some procedural way to throw him into the air! The chief problem with animating the orc (sequence-style) is that all the animations must end at the origin, which means I can throw him vertically easy enough, but not along X and Y. There is something called a ground-frame in the sequence node, and perhaps something can be done with that.

=== Fire Staff ===

The staff the orc summons here demonstrates a lot of useful ideas.
www.arcane-fx.com/visuals/blog2-staffmaya.JPG
For one, the staff is put into the orc's hand using AFX's powerful constraint system. I simply specify:
> constraint = "caster.Mount0";
and the staff pops into the orc's hand (the mount point Mount0 is located in the right hand). But it's important to note that whatever is at the origin-point in the Maya file will be attached to the mount point in the orc, so I've been very careful to adust the staff's position in Z to be just where I want the orc to grasp it.

Also note the two mount points I've added to this model myself, at the top and bottom of the staff. With Arcane-FX, I can constrain to mount points in any model, not just in the orc. So once I've created these, exported them with the model and imported it as an afxModel, I can constrain other effects to these new mount points. It's easy to do, and I do it here to properly place the particle emitters that create the fireballs at the staff's top and bottom.

One other interesting aspect to note is a simple trick that the staff demonstrates, and I use it all the time. How do I get the staff to release from the orc's hand once he sticks it into the ground? It's not with some kind of fancy constraint animation ability, which would probably be a very advanced feature for a realtime effects package, and I don't think I've even asked Jeff about it. Rather, I do a good-old model swap. By carefully setting my timing parameters and being sure my transformations align, I make the staff model in the orc's hand disappear at the same time a new model appears in the same position, stuck into the ground.

=== Fire Ring ===

www.arcane-fx.com/visuals/blog2-firering.JPG
One of the more useful transform modifiers that is provided by Arcane-FX is the Path. In AFX, transform modifiers are used to modify the position or orientation of an effect after its constraints have resolved. So, I can constrain a ball to the orc's hand, then with transform modifiers make it move up a certain distance and spin around; I can also make it move along a path.

The Fire Ring is created by layering multiple transform modifiers in exactly this way. There are 14 emitters in total. Each is constrained to the caster, then moved along a unique path. All transform modifers have timing parameters that make them animatable and here, the path moves its emitter from start point to end point over one second, after which the emitter remains at the end point. Then a spin modifer fades in, and the emitters start spinning around caster. There are some details that make it a bit more complex, but that's the basic idea!

To create the paths, I don't try to visualize them in Torque. Rather, I create them using nurbs curves in Maya:
www.arcane-fx.com/visuals/blog2-pathsmaya.JPGThen, with a simple MEL script, I export the paths into a format compatible with AFX and bring them into my scripts. Although AFX's paths are hermite splines and not nurbs, it's the contol points that are exported, and while the interpolation won't be exactly the same it's usually good enough.

Here's one other complexity that might be of interest. I'm not actually animating the emitters directly. Instead, all these transform modifiers I've mentioned are actually attached to moorings:
www.arcane-fx.com/visuals/blog2-moorings2.JPGThese axis markers are an AFX component type that serve as a common mount point for other effects. I wouldn't have used them if it was only the emitters that followed the animation I had created, but, you'll notice that underneath each fireball coursing along the ground there is a light-halo visible during the first second of the fireball's existence. This is done using a zodiac, one for each fireball. Now because I want to share animation, instead of copying all these transform modifiers to multiple effects, I do it all on the moorings, and constrain the fireballs and the zodiacs to them. This keeps the file cleaner and also allows me to prototype and modify animation in one place, simplifying my life!

As to the fire particles themselves, I'll say more later. We did add a new particle blend mode attribute...

=== Camera Shake ===

I've just started working with this. Arcane-FX taps into the built-in TGE camera shake directly, and it seems to work by steadily descreasing in intensity over time and distance. I'm looking for something that increases over time, so here I've approximated it by using four distinct shakes... I need to talk more with Jeff about this. I bet I start digging into the default camera shaker to make this work...

.
.
.

Where's the Tower?

Done for now!

- Matthew Durante

#1
03/20/2007 (5:00 pm)
freakin awesome
#2
03/20/2007 (5:25 pm)
Thats one hell of a long spell, probably wouldnt want it being cast too often.
#3
03/20/2007 (8:07 pm)
All that just for a +2 to Boots of Escaping?
#4
03/20/2007 (9:29 pm)
The spinning star looked kinda of silly...but that's just nit-picking over one of the best spell effects I've ever seen.

Holy crap more soon.
#5
03/20/2007 (9:56 pm)
thats amazing. good work guys. helps get a better idea on how to make these wicked spells.
#6
03/20/2007 (11:41 pm)
so freaking cool
#7
03/22/2007 (11:53 am)
These .plans are invaluable to those of us still learning AFX. This illuminates the ties between assets and the AFX system quite well, and my team sends its appreciation for this information. Nice spell, and keep 'em coming.
#8
03/23/2007 (2:20 pm)
I agree, this information is invaluable, its filling in a lot of gaps on designing spells. also Iam trying to see a similiar path using Milkshape as my primary AFX model and prop creation. Its nice to see you mention all your maya methods.
#9
06/17/2007 (7:13 pm)
Wow, this turned into a mini-tutorial...the information about the mountpoints and constraints, coupled with Jeff's advice, just saved me a butt-load of time and head aches...thanks! =)