vengi icon indicating copy to clipboard operation
vengi copied to clipboard

VOXELFORMAT: KV6: kfa animation support is not implemented

Open mgerhardy opened this issue 9 months ago • 1 comments

Ken Silverman released kwalk with the voxlap library at http://advsys.net/ken/voxlap/voxlap05.htm

The included voxdata.zip contains a file called anasplit.kfa (the only file I could find for kwalk). This is for animating the anasplit.kv6 file.

The magic is Kwlk.

This is the imhex pattern:

struct point3d {
	float x;
	float y;
	float z;
};

struct hingetype {
	s32 parenthinge;
	point3d childPoint;
	point3d parentPoint;
	point3d childAxisRotationVector;
	point3d parentAxisRotationVector;
	s16 vmin;
	s16 vmax;
	s8 htype;
	s8 filler[7];
};

struct seqtyp {
	s32 timeMillis;
	s32 frm;
};

struct Header {
	u32 magic;
	u32 stringlen;
	u8 filename[stringlen];
	u32 numhinge;
	hingetype hinge[numhinge];
	u32 numfrm;
	// These are the hinge angles. 0 is 0 degrees, 16384 is 90 degrees, -16384 is -90 degrees
	s16 frmval[numfrm * numhinge]; //[numfrm][numhinge
	u32 seqnum;
	seqtyp seq[seqnum];
};

Header hdr @0x00;

The loading code is partially written in https://github.com/mgerhardy/vengi/blob/f3d04f3d7933e654388a4981eaed6fd914d72d51/src/modules/voxelformat/private/slab6/KV6Format.cpp#L177

mgerhardy avatar Oct 01 '23 12:10 mgerhardy