Blender-to-Blender-to-Noesis-to-Q2: how to animate?

Discuss the creation of various model formats for Quake engines, and related matters to modeling.
taniwha
Posts: 401
Joined: Thu Jan 14, 2010 7:11 am
Contact:

Re: Blender-to-Blender-to-Noesis-to-Q2: how to animate?

Post by taniwha »

Well, I suppose I could do something silly like add md2 and sp2 support to QF, and since QF includes a blender io addon for mdl, and a pcx->spr converter... :)
Leave others their otherness.
http://quakeforge.net/
taniwha
Posts: 401
Joined: Thu Jan 14, 2010 7:11 am
Contact:

Re: Blender-to-Blender-to-Noesis-to-Q2: how to animate?

Post by taniwha »

I just had a look at the sp2 format. It's ridiculously simple (my jaw dropped when I saw the structs in qfiles.h).

Code: Select all

#define MAX_SKINNAME    64
#define IDSPRITEHEADER  (('2'<<24)+('S'<<16)+('D'<<8)+'I')
// little-endian "IDS2"
#define SPRITE_VERSION  2

typedef struct {
    int width, height;
    int origin_x, origin_y;     // raster coordinates inside pic
    char    name[MAX_SKINNAME];     // name of pcx file
}
dsprframe_t;

typedef struct {
    int ident;
    int version;
    int numframes;
    dsprframe_t frames[1];          // variable sized
}
dsprite_t;
It would be pretty trivial to put something together in python. I'm not sure it's worth doing in C, though if I do, I'll put it in qfspritegen as an option (spr or sp2).

Oh, I had a look at an actual sp2 file, and the name is the gamedir relative path including the .pcx extension.
Leave others their otherness.
http://quakeforge.net/
Rich
Posts: 35
Joined: Tue Nov 02, 2010 3:46 am

Re: Blender-to-Blender-to-Noesis-to-Q2: how to animate?

Post by Rich »

Gaku wrote:I've managed to setup a workflow of sorts for getting Blender files into Quake 2.

1) Create the model in Blender 2.63
2) Export it as a .obj
3) Import it into Blender 2.49b
4) Export as .mdl
5) Convert .mdl to .md2 using Noesis

Unfortunately my md2s are just a single frame, which results in spam error messages in-game.
I'm curious, what would be my best bet for compiling animation frames, and how could I pack them into the md2?

Also, is there a listing of which animation frames correspond to which states?

Thanks,
First, make sure your Noesis is up to date. Anything released in the last year or so will support auto-updating from within the program. Then, create and animate your skeletal model in anything you want, export to a suitable format (FBX, COLLADA from an OpenCOLLADA-based exporter, md5mesh+md5anim, SMD+SMD sequence, or any number of the other formats supported by Noesis), then use Noesis to go from that format directly to MDL or MD2. And you're done. It automatically gathers textures (in any supported format, as long as you have them in the model directory) and bakes them into a single page for both MDL and MD2, and it automatically bakes skeletal animations into vertex animations for those formats.
Post Reply