Game Development Community

Multiple animations per dsq

by Jonathon Stevens · in Artist Corner · 06/21/2006 (12:31 pm) · 9 replies

Wondering if their are resources describing how to put multiple animations in a single dsq?

Also wondering what people think of doing this? My game will have hundred of animations each character is capable of at any given time, so I need a lot of animations built!

About the author

With a few casual games under his belt as CEO of Last Straw Productions, Jonathon created the increasingly popular Indie MMO Game Developers Conference.


#1
06/21/2006 (12:42 pm)
Dsq's by nature are designed to be one animation, but re-usable.
#2
06/21/2006 (1:10 pm)
I know by nature they are, but can't you only have like x amount of DSQs which is FAR less than what I need? Also, I know someone has done the multiple per dsq before as I remember reading it, just can't find it now.

Is their another animation technique I don't know about that would allow us to have hundreds (or even thousands) of animations?

We'll have a lot of different skeletons, so the animations can't always be reused across players =(
#3
06/21/2006 (1:20 pm)
You can make DSQ's animations for each skeleton.
Just create a seperate folder called skeleton1 and put all you animations and DTS object in it.
Then do the same for Skeleton2 Skeleton3,4,5,6,7...ect

Repeat this same procedure for all you characters and all their animations.
Just because Stephen Zepp said you could reuse the animations, doesnt mean you have too.
You can make seperate animations for everything, his suggestion is to ease the workflow.

Just like in the starter.fps example how the player.cs is contained with its animations in a folder called player.
You should do the same for all of your characters.
#4
06/21/2006 (1:25 pm)
Stephen, that's not _quite_ true...
You can store however many sequences you want in a dsq (with the max exporter you simply place several sequence markers in your file and export). Then how to actually play the different sequences in the dsq in torque I have no idea about (it works fine in showtool pro though so I'm assuming there's some way).
#5
06/21/2006 (1:58 pm)
@Surge - I know you can make different ones for each skeleton, I was merely stating that I can't reuse a lot of them, and this is why I wanted to find a way to do a single DSQ per skeleton, so that the engine will get all the animations.

@Stephen - What's the limit to how many different DSQ's the engine can process?
#6
06/21/2006 (2:02 pm)
Jonathon - you might find some useful info in this resource. the resource is for TGE 1.3, and i think there may be improvements to the situation in 1.4.

edit: that resource covers increasing the number of animations which the system can *register*. as far as how many it can *process*, i would guess many.
#7
06/21/2006 (2:15 pm)
@Magnus: I didn't go into extended description of the why's and how's, but yes, you may be able to put more than one animation into a .dsq, but in stock the engine won't have any way to differentiate the fact that you have multiples in that manner...mostly because in the TSShapeConstructor data structure, it expects to tie in one animation per sequenceX line, which is mapped directly to one sequence name, which is then loaded into your Animation table.

As I mentioned, by design, .dsq files are meant to contain one animation file that can be used repeatedly across different TSShapes for animation purposes. You can as Surge kind of mentions embed animations within your dts shapes, but those are not .dsq's by definition--a .dsq is a standalone file outside of a shape file that contains animation information for an (assumed) externally defined skeleton.

The root question here is what exactly are you trying to do? Simply reduce the amount of files for a particular shape that has hundreds of animations? If that is all, and you don't care about re-using animations (although your artist team will be highly unproductive during production phase if that is the case), then place them in the .dts shape directly.

Otherwise, you can place them in a directory, and then treat it as a package deal, while still having the easy flexibility of editing a particular animation and re-exporting without having to worry about re-exporting the hundreds of other animations in a combined file format--not to mention restructuring the TSShape preload code to handle linking portions of your super-file to specific animation sequences.
#8
06/21/2006 (2:20 pm)
I just want the ability to have hundreds and hundreds of different animations per model. I don't really care how I get to that point, unless it has resource issues. I was under the impression you couldn't bake animations into the models themselves? The engine can read backed in models?
#9
06/21/2006 (4:07 pm)
You can put many "logical" animations in one "physical" animation. You can also write a mechanism to play portions of dsqs, but I've had trouble with animation transitions using this approach.

With lots of dsqs, there are some limitations in the stock engine to worry about. First is the number of physical animation files. Then you'll run into issues with the size of the datablock since it will contain a huge array of strings and the transfer buffer will overrun. These are both documented in a few other threads.

You can store and access animations in the dts itself, but I don't know why you would want to. I personally plan to replace the way the stock engine handles animations with a completely different system that works more like a global client-side only pool, but I will be using individual dsq files.