Well


Well, the design-by-livejournal worked pretty good the past couple days so I'm planning on extending it! How exciting for you, my nonexistant reader. =:)

@p Okey! I will tackle in order of decreasing difficulty, as a rule. So my problem to tackle today is multiple animations, since materials and shading will employ basically the same solution that I used for ships.

@p A few problems, a few solutions; they don't always match up:

@p Problem 1: blender doesn't seem to support multiple animations for a single object. This is a problem, because I want to have just one file for a model, and be able to export and work on the different animations within that one file. Ideally, the export script would be able to sense all the different animations and export them all automagically, but I think that at least hasn't an easy solution. So far, I've been using multiple .blend files, a messy solution at best. I guess I should ask in #blender how to do this one!

@p Problem 2: animation switches require a bit of .info-typing; that is, it's not a huge amount of work but I would like to minimize this as much as possible. Now, if I look at crawler, what I notice is that it has a default animation as "walking", and this it turns out may have been a really good design choice. What I can do, is extend my ganim_matrixanim module a little bit, and give a "stop" frameset; what that means is, I add some .info lines like:

@p stop_key = leg_stop

@p stop_phase = .5

@p stop_range = .1

@p Then, when it recieves the stop key, it goes into "matrixanim stop mode"; which means it basically orbits the current frame around stop_phase (.5 means, the center of stop frames is .5 * num_frames, and stop_range means, orbit out to .1 * num_frames)

@p If stop_key is absent, then I can just disable it. A better solution:

@p [keys] : {

@p [default] : { mode = loop; start = 0; end = 1; }

@p [stop] : { mode = orbit; phase = .5; range = .1; }

@p [jump] : { mode = once; start = .2; end = .4; }

@p [land] : { mode = once; start = .6; end = .0; time_factor = 2; }

@p }

@p So what I am telling it, is to play back the matrixanim differently depending on key mode. I can do things like, set time_factor to be twice as fast, make the animation loop, orbit, play once, etc.; the main benefit to doing it this way is that, it's quite a bit less typing, and I can sort of hack out different animations that I may want fairly easily.

@p This doesn't solve the problem of wanting multiple proper animations in a single .blend file, again i have to check #blender for that. It seems like it should be possible but again I don't know.

@p Then, the question is, what are the actual animations that I need! Well, I have default which is walking. I need to allow it to stop; i'll call that one stop. jump and land in the above example probably won't come into play; it would be nice to have an "attack" animation howeve. I am thinking, crawling creatures will attack by throwing spines/fire/whatever at you; yes it's kind of random but who cares hehehe. I remember in a very early version the only enemies were "kingsnails" (which were actually in d13, though they didn't attack). So I'm thinking, throwing electricy, etc., sort of attacks should work reasonably well. It will work sort of like ground-based enemies in other space/aerial combat games (e.g., storm troopers in rogue squadron). Anyhow, if they are shooting, they probably don't need to jump or land. The attack animation can probably just be implemented in body_layout, which is fine. Other body parts, like tails especially I am thinking, might be alright to implement the attack animation, but it's not really neccesary.

@p I might want to do a "hurt" animation; this one is even less neccesary, but it would show the creature react to getting shot, which is valuable because it provides feedback. But, it's also relatively easy to just have some global animation, like, the thing shakes/lets off sparks/flashes red or something, without actually putting the animations for each part in. So maybe "hurt" should be global.

@p Likewise, I want "kill" to be global. Hehehe! My idea is, since these models are segmented (which is, well, kind of passe since all models are skinned nowadays... who cares right!) then when the things are killed, I should be able to automagically split it by segments and kind of have them bounce off the ground and disappear. Or, I could even try some kind of auto boning ragdoll system, but that is hard because I am not using bones in the animation system; so I'd have to derive them. Plus then, you have to do ragdoll. PAH! I'm not going to bother with something like that. I'll just have the enemies fall into pieces when they are killed.

@p I can implement other incidental animations; for instance, head might periodically turn to look around, etc.; but those things will be automatic, not controllable, so I don't really have to plan them here. I can just implement them in each layout class as I feel like it, basically it is just part of the "default" animation.

@p So, for animations I think I need: walk, stop, attack.

@p Stop I can implement as an orbit of the basic walk animation, just choose frames somewhere in the middle. Attack will have to be implemented on the body_layout, it will generally look like scrunching up or a seizure or something, I'm not really sure to tell the truth.

2004-03-04


◀ Back