Convert KR Monster animations to 2d. Possible?

Diskussion und Informationen über UO:KR
Nachricht
Autor
soulsoul656
Newbie
Beiträge: 11
Registriert: 03 Aug 2008 05:13

Convert KR Monster animations to 2d. Possible?

#1 Beitrag von soulsoul656 » 17 Mär 2009 15:44

Hello guys, i'm need an information. Have any tool with capacity to view KR animations or any tool that convert kr animations to mul format?
Thanks guys

cya =]

RadstaR
Junior Mitglied
Beiträge: 70
Registriert: 29 Dez 2006 06:22
Kontaktdaten:

#2 Beitrag von RadstaR » 19 Mär 2009 12:55

Nothing impossible if you can programming ;)

Wyatt

#3 Beitrag von Wyatt » 22 Mär 2009 16:58

All possible.

SiENcE

#4 Beitrag von SiENcE » 14 Apr 2009 17:52

Lol

Malganis

#5 Beitrag von Malganis » 25 Mai 2009 17:23

Structure of the animation frame seems to be like this (not completle sure). It is very similar to anim.mul format...

Code: Alles auswählen

Animation Frame File Format (.BIN)
---------------------------------

[1] Format Header
BYTE	-> 'A'
BYTE	-> 'M'
BYTE	-> 'O'
BYTE	-> 'U'
DWORD	-> Version
DWORD	-> Length
DWORD	-> Animation ID
WORD	-> start coord X, relative to center of a tile
WORD	-> start coord Y, relative to center of a tile
WORD	-> end coord X, relative to center of a tile
WORD	-> end coord Y, relative to center of a tile
DWORD	-> Color count
DWORD	-> Color table address
DWORD	-> Frame count
DWORD	-> Frame table address

	[2] Color table
	BYTE	-> R
	BYTE	-> G
	BYTE	-> B
	BYTE	-> Alpha

	[3] Frame table
	WORD	-> Move ID
	WORD	-> Frame number
	WORD	-> start coord X, relative to center of a tile
	WORD	-> start coord Y, relative to center of a tile
	WORD	-> end coord X, relative to center of a tile
	WORD	-> end coord Y, relative to center of a tile
	DWORD	-> Frame pixel data offset, relative to start of the frame table

	[4]  Pixel data
	Unknown

Kons

#6 Beitrag von Kons » 25 Mai 2009 18:18

well we can try to make a program that shows a picture from ani.bin :)

RadstaR
Junior Mitglied
Beiträge: 70
Registriert: 29 Dez 2006 06:22
Kontaktdaten:

#7 Beitrag von RadstaR » 25 Mai 2009 18:28

Hmmmm, this soud good.

Kons

#8 Beitrag von Kons » 01 Jun 2009 14:35

this is simple project that shows Table Color.

Only thing to add is Frame rendering, cause we don't know how it works ;)

www.kingdomreborn.it/files/KRFrameViewer0.2a.rar

Bild

Kons

#9 Beitrag von Kons » 02 Jun 2009 14:14

This is function to read Animation Frame in 2D client from uoflidder:

Crap i can't manage to show it full.

Code: Alles auswählen

public unsafe Frame(ushort[] palette, BinaryReader bin)
		{
			int xCenter = bin.ReadInt16();
			int yCenter = bin.ReadInt16();

			int width = bin.ReadUInt16();
			int height = bin.ReadUInt16();
			if (height == 0 || width == 0)
				return;
			Bitmap bmp = new Bitmap(width, height, PixelFormat.Format16bppArgb1555);
			BitmapData bd = bmp.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.WriteOnly, PixelFormat.Format16bppArgb1555);
			ushort* line = (ushort*)bd.Scan0;
			int delta = bd.Stride >> 1;

			int header;

			int xBase = xCenter - 0x200;
			int yBase = (yCenter + height) - 0x200;


			line += xBase;
			line += yBase * delta;

			while ((header = bin.ReadInt32()) != 0x7FFF7FFF)
			{
				header ^= DoubleXor;

				ushort* cur = line + ((((header >> 12) & 0x3FF) * delta) + ((header >> 22) & 0x3FF));
				ushort* end = cur + (header & 0xFFF);

				while (cur < end)
					*cur++ = palette[bin.ReadByte()];
			}

			bmp.UnlockBits(bd);

			Center = new Point(xCenter, yCenter);
			Bitmap = bmp;
		}

RadstaR
Junior Mitglied
Beiträge: 70
Registriert: 29 Dez 2006 06:22
Kontaktdaten:

#10 Beitrag von RadstaR » 04 Jun 2009 12:18

Oooo nice.

Kons

#11 Beitrag von Kons » 04 Jun 2009 18:26

i made some analysis of hex .bin, and i think format is not correct. I found files where "Frame Data Offset" does not always increase..

Also DATA has particullary instructions in itself: 0x80 and 0x81, that can be followed by an other by specifying something.. :) we'll see in future!

Kons

#12 Beitrag von Kons » 04 Jun 2009 20:05

See: this are some HEX files from animationFrame3.uop

Code: Alles auswählen

41 4D 4F 55 01 00 00 00 D7 00 00 00 F2 01 00 00 DF FF 85 FF 21 00 BF FF 
0E 00 00 00 28 00 00 00 
05 00 00 00 60 00 00 00 

85 65 3C 00 BE 99 79 00 8D 75 69 00 AA 85 5D 00 85 6D 4C 00 D6 BA 95 00 
99 79 50 00 8D 6D 38 00 B6 95 61 00 89 5D 28 00 99 71 44 00 A5 7D 4C 00 
8D 6D 40 00 8D 71 3C 00 

1B 00 04 00 EB FF BC FF ED FF BE FF 50 00 00 00 
1B 00 05 00 E7 FF BD FF E9 FF BF FF 48 00 00 00 
1B 00 08 00 01 00 BD FF 04 00 BF FF 40 00 00 00 
1B 00 12 00 DF FF B4 FF E0 FF B6 FF 39 00 00 00 
1B 00 2A 00 FF FF 85 FF 01 00 87 FF 2F 00 00 00 

80 20 01 01 
81 03 03 08 
81 20 09 05 01 
80 0C 00 
80 30 0B 02 
81 63 06 0C 07 
80 03 0A 
80 0D 0C 01 
80 03 02 
80 47 0D 04 

Code: Alles auswählen

41 4D 4F 55 01 00 00 00 40 01 00 00 F2 01 00 00 F4 FF E1 FF 0C 00 E5 FF 

17 00 00 00 28 00 00 00 
08 00 00 00 84 00 00 00 

34 24 10 00 CA 9D 59 00 69 55 34 00 FF FF E6 00 95 7D 4C 00 DE CE 89 00 
89 69 34 00 6D 44 24 00 D2 B6 7D 00 7D 61 3C 00 A1 89 55 00 8D 65 24 00 
48 28 24 00 89 6D 44 00 FF FF FF 00 81 48 14 00 79 59 34 00 9D 7D 3C 00 
81 65 40 00 8D 71 44 00 71 59 34 00 D2 B6 81 00 3C 24 10 00 

04 00 0B 	00 0A 00 E1 FF 0C 00 E3 FF 	80 00 00 00 
04 00 0C 	00 0A 00 E1 FF 0C 00 E3 FF 	78 00 00 00 
04 00 14 	00 0A 00 E1 FF 0C 00 E3 FF 	70 00 00 00 
04 00 18 	00 FC FF E3 FF FE FF E5 FF 	68 00 00 00 
04 00 19 	00 FD FF E3 FF FE FF E5 FF 	60 00 00 00 
04 00 1A 	00 FD FF E3 FF FF FF E5 FF 	56 00 00 00 
04 00 1B 	00 FD FF E3 FF FF FF E5 FF 	4E 00 00 00 
04 00 1C 	00 FD FF E3 FF FE FF E5 FF 	46 00 00 00 

81 		02 08 0E 
80 30 	00 01 
81 		02 05 0F 
80 30 	0C 01 
81 		02 15 0E 
80 30 	16 01 
80 22 	07 03 
81 60 	10 0A 
80 		03 06 
80 		0E 09 
80 22 	0B 02 
81 		06 12 14 
80 30 	11 01 
81 		02 0D 04 
80 		03 01 
80 		0E 13 

RadstaR
Junior Mitglied
Beiträge: 70
Registriert: 29 Dez 2006 06:22
Kontaktdaten:

#13 Beitrag von RadstaR » 06 Jun 2009 04:44

Nice, but i don't understand this hexa numbers. I am not skilled programmer as you :) I have only basic experience with file formats :/

Kons

#14 Beitrag von Kons » 20 Jun 2009 17:40

finally.. following ASM and stressing Wim:

Bild

i'll post program soon, it's still to fix a lot :)

Artaxerxes

#15 Beitrag von Artaxerxes » 20 Jun 2009 18:47

Kons hat geschrieben:finally.. following ASM and stressing Wim:
Call me Artaxerxes here, maybe, not Wim :).
And, no stress, though i got little sleep tonight! :D
Zuletzt geändert von Artaxerxes am 21 Jun 2009 10:20, insgesamt 1-mal geändert.

Antworten