Engine Limits
#1 posted by
Preach on 2024/02/18 15:33:19
Hi CV. There are two issues at play here - it's possible that you've already figured out the first one and are stuck at the second one. But I'll go into both.
To start with, there are two kinds of animation in Quake. The first one is how monsters animate - they have a bunch of individual frames and the QuakeC drives the change from one frame to the next. The other is things like torches, where a single frame of the model contains a whole loop of animation than the engine automatically animates without the QuakeC doing anything.
To get the first kind of animation, AD would have to know in advance about your model - but it doesn't; the mod already exists and your model came second! So generally misc_model animations are the ones of the second kind, where the engine does the animation automatically. Creating that kind of animation group for a sprite is even harder than normal - you need a tool called Fimg to create them, and it's quite fiddly.
I'm not going to go into more detail about Fimg because of the second issue - even if you can create a sprite with automatic animation, most engines don't properly support them! It seems like back in 1996 ID added support in the .spr file format for automatic animation, but didn't get round to making the engine cycle the frames*. I tested a small selection of engines; classic winquake/glquake and more modern sourceport quakespasm all get stuck on the first frame of the animation. Only engine I found that played the loop was darkplaces.
So you might be stuck unless
a) You require people to use a fixed engine to play your map (perhaps getting one of the popular sourceports to add the darkplaces behaviour).
b) You modify AD to have a custom entity that understands your sprite and drives the animation "by hand" like a monster animates.
c) You petition for a feature added to AD that allows for generic animation loops like type b) but without hardcoding them.
If you decide you'd like to go down path a) but would like more detail about using Fimg, please just ask!
*probably because classic quake didn't use many sprites and there were no looping sprites in the final product. One interesting detail is that there is still a sense check in the file load code, which fatally crashes all these engines if the looped animation is nonsensical, even though they would not loop it anyway!
It Is Hader Than Expected, But Soluble
#2 posted by
CV on 2024/02/18 16:56:23
by three way at least! I'll try some of them. Thank You for such detailed explain, Preach!
@Preach
#3 posted by
bmFbr on 2024/02/19 20:06:38
misc_model entities in most (all?) mods support animation by inputting a frame range, or even mode advanced stuff like togglable different ranges, pausing/resuming animation on command etc. It's the case for AD.
Since sprites animate the same way as MDLs (IE just changing the frame field) it should work the same way.
I don't remember off the top of my head which field you set to define an animation range, but I'd just check the available fields, or lastly check sock's test maps as there's one that specifically covers misc_model animations.
Ah Great
#4 posted by
Preach on 2024/02/20 17:51:28
That means that option c) is effectively already done, the mod supports animation loops by setting some keys on misc_model, check the docs and test maps for the details.
Wip AD Map
#5 posted by
CV on 2024/02/24 09:02:40
You can turn me on
I was blind then I saw the light
My angel coming in a brilliant white
Shine for me
(Martin L. Gore)
https://quaketastic.com/files/screen_shots/shiningfloyd.jpg
All the sudden new AD maps to play after ~1 year of drought.