AFX Spell-Design Blog #1 (Fire Tower)
by Matthew Durante · 02/26/2007 (1:21 pm) · 18 comments
Hello everyone. I'm Matthew Durante, the effect's artist for Arcane-FX. I've been doing my best to demonstrate the power of Jeff Faust's special effects package for TGE, as well as prodding and pushing him for new and exciting features. (When I'm feeling sneaky I'll implement something myself and wait 'til he catches me.)
Jeff and I have started work on a second pack of spell effects! We're not focusing on any specific theme at the moment, but are looking for a pack of spells that demonstrate a variety of useful effects for fantasy-genre games.
After some user feedback, we decided it would be a good idea to blog the creation of some of these spells, to give users an idea of the process of spell design. And therefore...
.
.
.
I've never actually played World of Warcraft, but Jeff has, and using that and similar games as a model, he roughly categorized the spell types he'd like to see demonstrated in this new pack. On that list I saw "totems" -- this idea of a spell that creates an independent object in the environment that has some kind of long-lasting effect. When I saw examples of WoW totems, however, I was saddened, for they were not exciting. I can understand the practicality of a totem that influences player stats for all those in its proximity, like +5 sexiness for all nearby elves, but clearly this needed to be enhanced for +1000 coolness.
What about towers as totems? Clearly summoning giant towers is a core fantasy cliche, and much cooler than some floating doo-dad. Yes!
And so here is the Fire Tower:

This is a giant tower of destruction the caster can summon. The tower rises up from beneath the earth, casting aside all players in its way. Atop it forms an unrelenting sequence of fireballs that, by a deep and capriciously wicked will buried in its stone, are sent arcing throughout the environment at enemy players and places and perhaps even the caster himself. But it can be destroyed. Perhaps a group of brave orcs will bind together to bring it down...
Here's where we're at: www.arcane-fx.com/visuals/blog1-movieA.avi
I'm designing this tower effect with little thought for its behavior after it is formed. Jeff is confident he knows how to structure the scripts properly to make it work as a long-lasting environment effect that keeps shooting off fireballs. He may even be able to make it take damage. All that's for future blogs... The spell also needs a proper name.
=== Tower Model ===

The design is fairly cliche but I think it's okay; I always liked the bull-skull/horns motif. The tower was modeled in Maya, textured there and exported in .dts format. It's probably too high-poly at the moment, but oh how I hate to destroy a nice curve with tessellation. I did the texture in ArtRage and Photoshop, a kind of marbly-granite thing with some noise run through it. The model has a collision box, and when loaded into AFX as a StaticShape the orc collides as expected. There's also some rising animation on it that is first-pass.
=== Casting/Summoning ===
The current idea here is that the caster summons the tower with the use of a staff that represents the tower (which leaves us some room perhaps for reusing these effects with a different staff for other tower spells). A zodiac forms beneath the caster with a rotating pentagram, he gestures appropriately, the staff forms in his hand as it is summoned or magically-removed from his inventory, and he strikes the ground with it. If the summoning is successful, the tower rises up from the pentagram and he had better run; if not, the spell backfires with a fiery poof from the pentagram that knocks the caster on his butt.
We need to make the casting conditional because there are instances where the tower shouldn't form, such as when the caster is inside an interior object, or when the terrain is especially non-flat. While it would be awesome to see the tower form inside one of the orc hovels and watch the hovel disintegrate... that's a bit beyond what can be done, unfortunately. How this test will be performed is something Jeff is thinking about.
> Orc Animation
This is just a start. The strike especially needs more action. Perhaps more on this later...
> Staff
Currently it is untextured. It was very simple to get into Torque however. Inside the staff Maya model, I simply made sure the place I wanted the orc to grasp the staff was at the origin, and once exported, I loaded it as an afxModel and constrained it to "caster.Mount0" -- and it worked! No animation on the staff was necessary; it's all the AFX constraint system.
> Casting Zodiac

I'm going for an embedded zodiac design here: the outer zodiac is stationary and mimics the bull-skull motif from the tower, and the inner is the rotating pentagram.
I create these zodiac textures by building geometry and rendering out of an orthographic view in Maya. I generally work with nurbs to build quick shapes that don't visibly tessellate. Maya's shader glow provides nice halos. To get the noisy broken-up look, I project a 3D fractal texture through the color and transparency of each shader (with projection, I can get the fractal to remain continuous across multiple surfaces). I'll end-up tweaking the color a lot, but by doing it in Maya all I need to do is tweak the shader color (and glow color). Building zodiacs in this way is very nice and fairly fast, but it could also be done in Photoshop of course, with the careful use of layers to separate color from shape (so that you can do color-tweaking easily).

For each zodiac I render one version with color and one that is all white and glowy. The latter is used to reveal the main zodiac in a flash of white.
Once these textures are brought-in as zodiacs in Torque with AFX, it's time to play. First, I'll try to get everything in the right position. Both zodiacs are constrained to the caster, however they need to placed off-center from his location. In AFX, we use a chain of procedural modules called Transform Modifiers to further adjust the constrained parameters of an effect. In this case I used a local-offset to adjust the position of each zodiac relative to the caster and freeze modifiers to keep them from following the orc around if he moves. I also adjust the zodiac's radii (radiuseses) here to get good sizes, and put a spin modifier on the pentagram. With position, size and rotation established I take a look at timing parameters, which are adjusted relative to the orc animation. All of this is and will be tweaked as the effect evolves.
As for timing the glowing white zodiacs, which are used to reveal the main zodiac but also make the edges of the fire patterns glow, I'll have more on that later...
The problem with the current zodiac design is it seems upside-down, which just works naturally with the embedded design, but I may take another stab at it...
> Light-Beam Effects

Both the outer ring of the main zodiac and the pentagram have glow beams that shoot upward. These are needed not only because they look cool, but they are loosely-timed to actions of the orc and complement them.
I do these with polygonal meshes in Maya that are usually exported as two-sided. I'll use Maya to set up an animated sequence. Once in AFX I'll force texture attributes to be additive and self-illuminating, and specify the name of the sequence to play. I use the same local-offsets that are on the zodiacs to get the beams in the right place, then play with scale-factors so they line-up to the zodiacs.
The easiest way to animate light-beams like this is to simply key scale on the whole thing in Maya, and when the motion is perfectly vertical just scale about Z. But in the case of the outer-ring beams I wanted a more dynamic effect, so I needed to actually rig the cylinder. One bone did the trick, with the mesh smooth-bound to it. Then I just animated the translation and scale of the top joint.

This effect does illustrate a problem though: because the beam isn't perfectly vertical, it won't line-up with the underlying zodiac accurately on non-level terrain. Since the tower itself requires relatively level terrain, we hope this won't be a problem here.
As for the textures that are on these, they were created procedurally using ramp textures in Maya. This makes them easy to change, versus doing something by hand.
.
.
.
And there you go, our first spell-blog. Hope you enjoyed it. More to come here and there.
Such an elaborate "totem" as this somewhat contradicts our stated goal of practical spells for the practical user.
But we've gone too far to turn back now.
- Matthew Durante
Jeff and I have started work on a second pack of spell effects! We're not focusing on any specific theme at the moment, but are looking for a pack of spells that demonstrate a variety of useful effects for fantasy-genre games.
After some user feedback, we decided it would be a good idea to blog the creation of some of these spells, to give users an idea of the process of spell design. And therefore...
.
.
.
I've never actually played World of Warcraft, but Jeff has, and using that and similar games as a model, he roughly categorized the spell types he'd like to see demonstrated in this new pack. On that list I saw "totems" -- this idea of a spell that creates an independent object in the environment that has some kind of long-lasting effect. When I saw examples of WoW totems, however, I was saddened, for they were not exciting. I can understand the practicality of a totem that influences player stats for all those in its proximity, like +5 sexiness for all nearby elves, but clearly this needed to be enhanced for +1000 coolness.
What about towers as totems? Clearly summoning giant towers is a core fantasy cliche, and much cooler than some floating doo-dad. Yes!
And so here is the Fire Tower:
This is a giant tower of destruction the caster can summon. The tower rises up from beneath the earth, casting aside all players in its way. Atop it forms an unrelenting sequence of fireballs that, by a deep and capriciously wicked will buried in its stone, are sent arcing throughout the environment at enemy players and places and perhaps even the caster himself. But it can be destroyed. Perhaps a group of brave orcs will bind together to bring it down...
Here's where we're at: www.arcane-fx.com/visuals/blog1-movieA.avi
I'm designing this tower effect with little thought for its behavior after it is formed. Jeff is confident he knows how to structure the scripts properly to make it work as a long-lasting environment effect that keeps shooting off fireballs. He may even be able to make it take damage. All that's for future blogs... The spell also needs a proper name.
=== Tower Model ===
The design is fairly cliche but I think it's okay; I always liked the bull-skull/horns motif. The tower was modeled in Maya, textured there and exported in .dts format. It's probably too high-poly at the moment, but oh how I hate to destroy a nice curve with tessellation. I did the texture in ArtRage and Photoshop, a kind of marbly-granite thing with some noise run through it. The model has a collision box, and when loaded into AFX as a StaticShape the orc collides as expected. There's also some rising animation on it that is first-pass.
=== Casting/Summoning ===
The current idea here is that the caster summons the tower with the use of a staff that represents the tower (which leaves us some room perhaps for reusing these effects with a different staff for other tower spells). A zodiac forms beneath the caster with a rotating pentagram, he gestures appropriately, the staff forms in his hand as it is summoned or magically-removed from his inventory, and he strikes the ground with it. If the summoning is successful, the tower rises up from the pentagram and he had better run; if not, the spell backfires with a fiery poof from the pentagram that knocks the caster on his butt.
We need to make the casting conditional because there are instances where the tower shouldn't form, such as when the caster is inside an interior object, or when the terrain is especially non-flat. While it would be awesome to see the tower form inside one of the orc hovels and watch the hovel disintegrate... that's a bit beyond what can be done, unfortunately. How this test will be performed is something Jeff is thinking about.
> Orc Animation
This is just a start. The strike especially needs more action. Perhaps more on this later...
> Staff
Currently it is untextured. It was very simple to get into Torque however. Inside the staff Maya model, I simply made sure the place I wanted the orc to grasp the staff was at the origin, and once exported, I loaded it as an afxModel and constrained it to "caster.Mount0" -- and it worked! No animation on the staff was necessary; it's all the AFX constraint system.
> Casting Zodiac
I'm going for an embedded zodiac design here: the outer zodiac is stationary and mimics the bull-skull motif from the tower, and the inner is the rotating pentagram.
I create these zodiac textures by building geometry and rendering out of an orthographic view in Maya. I generally work with nurbs to build quick shapes that don't visibly tessellate. Maya's shader glow provides nice halos. To get the noisy broken-up look, I project a 3D fractal texture through the color and transparency of each shader (with projection, I can get the fractal to remain continuous across multiple surfaces). I'll end-up tweaking the color a lot, but by doing it in Maya all I need to do is tweak the shader color (and glow color). Building zodiacs in this way is very nice and fairly fast, but it could also be done in Photoshop of course, with the careful use of layers to separate color from shape (so that you can do color-tweaking easily).
For each zodiac I render one version with color and one that is all white and glowy. The latter is used to reveal the main zodiac in a flash of white.
Once these textures are brought-in as zodiacs in Torque with AFX, it's time to play. First, I'll try to get everything in the right position. Both zodiacs are constrained to the caster, however they need to placed off-center from his location. In AFX, we use a chain of procedural modules called Transform Modifiers to further adjust the constrained parameters of an effect. In this case I used a local-offset to adjust the position of each zodiac relative to the caster and freeze modifiers to keep them from following the orc around if he moves. I also adjust the zodiac's radii (radiuseses) here to get good sizes, and put a spin modifier on the pentagram. With position, size and rotation established I take a look at timing parameters, which are adjusted relative to the orc animation. All of this is and will be tweaked as the effect evolves.
As for timing the glowing white zodiacs, which are used to reveal the main zodiac but also make the edges of the fire patterns glow, I'll have more on that later...
The problem with the current zodiac design is it seems upside-down, which just works naturally with the embedded design, but I may take another stab at it...
> Light-Beam Effects
Both the outer ring of the main zodiac and the pentagram have glow beams that shoot upward. These are needed not only because they look cool, but they are loosely-timed to actions of the orc and complement them.
I do these with polygonal meshes in Maya that are usually exported as two-sided. I'll use Maya to set up an animated sequence. Once in AFX I'll force texture attributes to be additive and self-illuminating, and specify the name of the sequence to play. I use the same local-offsets that are on the zodiacs to get the beams in the right place, then play with scale-factors so they line-up to the zodiacs.
The easiest way to animate light-beams like this is to simply key scale on the whole thing in Maya, and when the motion is perfectly vertical just scale about Z. But in the case of the outer-ring beams I wanted a more dynamic effect, so I needed to actually rig the cylinder. One bone did the trick, with the mesh smooth-bound to it. Then I just animated the translation and scale of the top joint.
This effect does illustrate a problem though: because the beam isn't perfectly vertical, it won't line-up with the underlying zodiac accurately on non-level terrain. Since the tower itself requires relatively level terrain, we hope this won't be a problem here.
As for the textures that are on these, they were created procedurally using ramp textures in Maya. This makes them easy to change, versus doing something by hand.
.
.
.
And there you go, our first spell-blog. Hope you enjoyed it. More to come here and there.
Such an elaborate "totem" as this somewhat contradicts our stated goal of practical spells for the practical user.
But we've gone too far to turn back now.
- Matthew Durante
About the author
#2
02/26/2007 (1:41 pm)
Very cool Matthew. Thanks for the insight into the FX world!
#3
Great job!
02/26/2007 (2:04 pm)
Nice!! One suggestion - make some dust or rubble appear at the ground to make it look like something is actually coming up through the ground? Just a thought ;)Great job!
#4
There will definitely be alot of dust and destruction when the tower bursts through! We're not that far yet. I'm looking forward to it though...
02/26/2007 (2:20 pm)
@RodneyThere will definitely be alot of dust and destruction when the tower bursts through! We're not that far yet. I'm looking forward to it though...
#5
02/26/2007 (2:50 pm)
Heh, yeah after looking at that, it kinda makes the totem summoning in WOW a little bit under powered looking LOL. This info is great, looking forward to the future blogs. :) uh a name what about plain ol DOOM TOWER.
#6
I didnt buy the last pack simply because non of my current games have a relevant theme.
The one thing that strikes me about that tower is its very big... Almost impractical.. I notice the camera zooms out a lot when the tower appears... I would expect the fireballs to hit me from 2 miles away..
Im sure you considered that already though! A 1000 points for inventiveness btw...
02/26/2007 (2:53 pm)
I really liked looking at the last spell pack.. Very nice eye candy.I didnt buy the last pack simply because non of my current games have a relevant theme.
The one thing that strikes me about that tower is its very big... Almost impractical.. I notice the camera zooms out a lot when the tower appears... I would expect the fireballs to hit me from 2 miles away..
Im sure you considered that already though! A 1000 points for inventiveness btw...
#7
We do want it to feel very epic hence the scale, but it may be too big as you say. We'll know once it actually has offensive behaviors. It's not the kind of thing you should be able to get close too without getting torched...
02/26/2007 (3:00 pm)
@BarryWe do want it to feel very epic hence the scale, but it may be too big as you say. We'll know once it actually has offensive behaviors. It's not the kind of thing you should be able to get close too without getting torched...
#8
My only concern is the lack of practical spells. I heard the next spell pack would be more for casting regular spells rather than "epic" type spells. Can we still expect to see those in the pack?
02/26/2007 (4:03 pm)
Looks amazing!My only concern is the lack of practical spells. I heard the next spell pack would be more for casting regular spells rather than "epic" type spells. Can we still expect to see those in the pack?
#9
02/26/2007 (4:16 pm)
slick stuff!
#10
In this pack, we'll have a mix of very-involved and less-involved spells. This one is obviously the former. For very simple, very practical type effects (e.g. open-a-door magically, light a torch, have something disappear into inventory, etc.) Jeff is considering a seperate pack.
02/26/2007 (5:39 pm)
@PeterIn this pack, we'll have a mix of very-involved and less-involved spells. This one is obviously the former. For very simple, very practical type effects (e.g. open-a-door magically, light a torch, have something disappear into inventory, etc.) Jeff is considering a seperate pack.
#11
02/26/2007 (5:55 pm)
What I am looking for is generic spell casting effects. Simple effects for buffs/nukes/heals etc, ones that you would expect to be seen casted frequently in a battle. Also, are the pure particle effect players still in the works?
#12
Check book already lined up.. want want want :))))
This will accomplish the alien technology steam punk environment unknown technology defense system I need :)
Keep up the great work
Regards
Graham
02/26/2007 (7:08 pm)
Matthew, awesome, awesome awesome.. I need two at the gates to my outpost, able to target a player or an NPC based on Karma or something similar.. so it needs to be able to target based on a variable stored as %player.foo field :)))))Check book already lined up.. want want want :))))
This will accomplish the alien technology steam punk environment unknown technology defense system I need :)
Keep up the great work
Regards
Graham
#13
@ Peter -- An epic spell here does not supersede other plans to do some more practical spells, however, Matt's designs will tend to skew towards the epic and by their nature, practical spells don't make good subjects for a process blog. The epic spell designs continue to be an important part of our overall process because they have the side benefit of pushing the boundaries of the software and forcing improvements. The Fire Tower effect has lots of pieces and it should pave the way for a number of solutions such as:
-- How to evaluate the immediate surroundings for spells that require relatively flat terrain.
-- How to have the effects system spawn a semi-permanent targetable scene object.
-- How to use a non-Player object as a spellcaster.
-- How to implement a simple AI for spell targeting.
Some of this will be useful for practical spells also.
(The effects based character is still in the works.)
02/26/2007 (7:24 pm)
@ Barry -- I had the same response when Matt first sketched out the effect... the height of the tower might be problematic. However, as a rule, we try real hard not to preemptively censor our ideas over issues of practicality, especially early on. We've found it useful to go with the flow of the idea for a while and see how far we can push it or see what we can make work. This way, even if we eventually make compromises, we may learn a few things like -- How big is too big? or Under what circumstances would effects like this work. For example, flying mounts have been introduced to WoW. From the view of an orc on the ground, the tower is huge and impractical, but make that orc airborne and the height is much less of an issue. Perhaps this effect makes sense as a ground defense against flying attackers. From another angle, with a simplified tower geometry, this spell might fit better as a building unit in an RTS.@ Peter -- An epic spell here does not supersede other plans to do some more practical spells, however, Matt's designs will tend to skew towards the epic and by their nature, practical spells don't make good subjects for a process blog. The epic spell designs continue to be an important part of our overall process because they have the side benefit of pushing the boundaries of the software and forcing improvements. The Fire Tower effect has lots of pieces and it should pave the way for a number of solutions such as:
-- How to evaluate the immediate surroundings for spells that require relatively flat terrain.
-- How to have the effects system spawn a semi-permanent targetable scene object.
-- How to use a non-Player object as a spellcaster.
-- How to implement a simple AI for spell targeting.
Some of this will be useful for practical spells also.
(The effects based character is still in the works.)
#14
Thanks for the response. I'm glad to hear that practical spells and effect based characters are still in the works. Keep up the good work guys.
02/26/2007 (8:45 pm)
@JeffThanks for the response. I'm glad to hear that practical spells and effect based characters are still in the works. Keep up the good work guys.
#15
02/26/2007 (11:14 pm)
Very interesting!
#16
"How to evaluate the immediate surroundings for spells that require relatively flat terrain."
As I see it: performing 4 raycasts from top to bottom, down to terrain near player.
E.g. X, Y, Z = player position.
X1 = X+1, Y1 = Y+1 ---- first scan
X2 = X-1, Y1 = Y-1 ---- second
X2 = X+1, Y1 = Y-1 ---- third
X2 = X-1, Y1 = Y+1 ---- fourth
Then you compare the Z value of all four calls, and if the same - you have a flat terrain... The best way of performing this by C++ not in TS.
And, not sure if it's right way of handling that, but that's my idea :)
good luck!
02/27/2007 (3:34 am)
Jeff, regarding:"How to evaluate the immediate surroundings for spells that require relatively flat terrain."
As I see it: performing 4 raycasts from top to bottom, down to terrain near player.
E.g. X, Y, Z = player position.
X1 = X+1, Y1 = Y+1 ---- first scan
X2 = X-1, Y1 = Y-1 ---- second
X2 = X+1, Y1 = Y-1 ---- third
X2 = X-1, Y1 = Y+1 ---- fourth
Then you compare the Z value of all four calls, and if the same - you have a flat terrain... The best way of performing this by C++ not in TS.
And, not sure if it's right way of handling that, but that's my idea :)
good luck!
#17
i'd generalize a little bit to change the "1"s to a variable like %radius or something.
and also, in my experience, since these raycasts are going to be done fairly rarely, like when a player attempts a spell, versus say once per player per frame, it'd be fine to do it in script..
also if you want to unload a little more work from the server you could first do the raycasts client-side, and only if that succeeds, then double-check it server side. note that client-side raycasts require some minor modifications to the engine.
02/27/2007 (7:40 am)
that's a pretty good idea -i'd generalize a little bit to change the "1"s to a variable like %radius or something.
and also, in my experience, since these raycasts are going to be done fairly rarely, like when a player attempts a spell, versus say once per player per frame, it'd be fine to do it in script..
also if you want to unload a little more work from the server you could first do the raycasts client-side, and only if that succeeds, then double-check it server side. note that client-side raycasts require some minor modifications to the engine.
#18
03/07/2007 (12:12 pm)
On the same not, why not do a radius search with x,y radius 1 and z radius .1 at xcord,ycord,getterrainheight(xcord ycord)+1 or something to that effect. And since its called very rarely the overhead shouldn't be too great. 
Torque Owner Surge
MDNAMEDIA