*************************************************************

                 dgo file format v1.0

                   1999.2.24 Gamza
		         dgPIX entertainment

*************************************************************

file format ϱ  structure...
=============================================================
typedef signed	 char	S8;
typedef signed	 short  S16;
typedef signed   long	S32;
typedef unsigned char	U8;
typedef unsigned short  U16;
typedef unsigned long	U32;

typedef struct _tagDGO_HEADER
{
	S32 Version;
	S32 ImageCount;
	S32 SurfaceCount;
	S32 VertexCount;
	S32 FaceCount;
	S32 PivotCount;
	S32 ShadeType;
}	_DGO_HEADER;

typedef struct tagVertex
{
	float x,y,z;
} Vertex;

typedef struct tagFace
{
	U32		numvertex;
	U16		vertex[4];
	float	u[4],v[4];
}	Face;

typedef struct tagSurface
{
	U8	r, g, b, a;
	S16	imageindex;
	U16	drawoption;
	U32	faceCount;
}	Surface;

typedef struct tagPivot
{
	Vertex	point;
	S16		parentindex;
	U16		vertexcount;
} Pivot;

typedef struct tagGoraudColor
{
	U8	cr[4],cg[4],cb[4];
}	GoraudColor;

typedef struct tagFlatColor
{
	U8	cr,cg,cb;
	U8	padding;
}	FlatColor;
=============================================================

	dog file size description.

=============================================================
_DGO_HEADER	header
header.ImageCount * 128
header.SurfaceCount * sizeof(Surface)
header.VertexCount * sizeof(Vertex)
header.FaceCount * sizeof(Face)
header.PivotCount * sizeof(Pivot)
switch( header.ShadeType )
{
case 0:	0
case 1:	header.VertexCount * sizeof(Vertex)
case 2: header.FaceCount * sizeof(Vertex)
case 3:	header.FaceCount * sizeof(GoroudColor)
case 4: header.FaceCount * sizeof(FlatColor)
}
=============================================================

	dog file format.

=============================================================
1. Header
	dgo file    ִ κ.

	S32 Version;		//	version information. ( 0x0010 )
	S32 ImageCount;		//	image file .
	S32 SurfaceCount;	//	surface() .
	S32 VertexCount;	//	 vertex .
	S32 FaceCount;		//	 face .
	S32 PivotCount;		//	pivot 
	S32 ShadeType;		//	shde type

2. Image filename list
	dgo ϱ ʿ image filename list
	filename 128byte ϹǷ  κ ũ
	( header.ImageCount * 128 ) ̴.
	dgoSurface.exe ̿  Ҽ ִ.

3. Surface list
	dgo Ǵ  list.
	face   ϰ ȴ.
	
	U8	r, g, b;	
		texture   facecolor		
	U8	a;			
		alpha option   alpha
	S16	imageindex;	
		texture  Image filename list index
		texture   -1 ̴.
	U16	drawoption;
		face ׸  ɼ.
		  or  .
		ALPHA			0x0001
		ZBUFFER			0x0002
		SHADE			0x0004
		TEXTURE			0x0008
		FOG				0x0010
		TRANSPARENCY	0x0020
		PERSPECTIVE		0x0040
		FILTER			0x0080
		LAMPALPHA		0x0100
		DOUBLESIDE		0x1000

		[]
		ALPHA     : ( screencolor*(255-alphavalue) + sourcecolor*alphavalue )/255
		LAMPALPHA : ( screencolor*(255           ) + sourcecolor*alphavalue )/255

	U32	faceCount;
		dgo file  face surface ĵǾִ.
		  surface ϰ ִ face ̴.

4. vertex list


5. face list
	 ٰ   'numvertex' ׸ ־ 
	  ο  'ﰢ'( 3ds ﰢ  )
	̸鼭 'װ'   ִ.
	 ̻ ̱   簢  
	𸣰 ؼ, c structure ׳ о
	Ⱚ ä־.

	U32	numvertex;	
		face vertex.  3.
	U16	vertex[4];	
		vertex index. 3 ǹ̰ .
	float u[4],v[4];
		texture ǥ.  3 ǹ̰ .
		texuture  ʾƵ Ⱚ ä .

6.	Pivot list
	pivot 0  ִϸ̼   
	  ϰ  ȿ  κ .
	lws dgoMaker 'Animation'  üũؾ߸ pivot 
	dgo file exportȴ. 
	Pivot  Ʈ   Ǹ 
	ִϸ̼ǽ ȴ.

	Vertex	point;
		Pivot ġ.
	S16	parentindex;
		Parent pivot index.
		-1ϰ ֻ Pivot ̴.
	U16	vertexcount;
		 vertex  ڽ  Pivot־ Pivot
		Matrix Ŀ  vertex ϰ Ǿִ.
		̸ ϰ ϱ dgo Vertex list Pivotȣ
		 ĵǾ.
		  Pivot  vertex ̴.

7.	ShadeType  .

	Shade Type
	-----------------------------------------
    case 0:
	   No shading 
       ϳ ̸ rgb÷ normal  .
	case 1:
       Real time goroud shading
       ϳ vertex normal ϴ .
	case 2:
	   Real time flat shading
	   ϳ face normal ϴ .
	case 3:
       precalculated goroud shading
       lws ϳ light object ؼ  rgb. 
	   ︶  ŭ rgb ´.
	      4̹Ƿ   
	   faceŭ Ѵ.
		typedef struct tagGoraudColor
		{
			U8	cr[4],cg[4],cb[4];	// 3 ȿ.
		}	GoraudColor;
		
	case 4:
       precalculated flat shading
       lws ϳ light object ؼ  rgb. 
	   ︶ ϳ rgb ´.
	     face ŭ Ѵ.
		typedef struct tagFlatColor
		{
			U8	cr,cg,cb;
			U8	padding;	// 4Ʈ  ..
		}	FlatColor;

*************************************************************

                 mot file format v1.0

                   1999.2.24 Gamza
		         dgPIX entertainment

*************************************************************

file format ϱ  structure...
=============================================================
typedef struct tagKEYFRAMEDATA
{
	U32		framenumber;
	flaot	move[3];	//x,y,z
	flaot	rotate[3];	//rotation x,y,z  ( 360 )
	flaot	scale[3];	//scale x,y,z
} KEYFRAMEDATA;

=============================================================

	mot file size description.

=============================================================
4byte ( long LastFrame )
4byte ( long PivotCount )
{	
	4byte ( long framecount )
	{ 
		sizeof( KEYFRAMEDATA )
	} 
	//  '{}'  framecount ŭݺ̶ ...
}
//  '{}'  PivotCount ŭݺ̶ ...

=============================================================

	mot file format.

=============================================================
lgihtwave ִϸ̼  .
1. LastFrame
	ִϸ̼   ȣ. ( lws LastFrame
	о Ѱ. )

2. PivotCount
	lwsϿ ϴ Ʈ .
	ִϸ̼ ϴ ּ  Ʈ μ, Ʈ ŭ
	ִϸ̼ Ͱ ݺǾ ְ ȴ.

3. framecount
	Ʈ  Ű .

4. KEYFRAMEDATA
	״ Ű .
	U32		framenumber;
		 Ű ӹȣ
	flaot	move[3], rotate[3], scale[3];
		Ű. Ʈ   µ Ǵ .
	
	Pivot      dgoϿ ִ.
	  Ű ͸ Ʈ Ϸ 
	  Ʈ matrix   matrix ־
	Ұ̴.
	̷ Ұ ϳ mot    dgo ϴ°
	ϴ.
	 lws Ʈ ε  Ʈ ȣ ŰܹǷ
	   Ʈ εϴ   ؾ
	Ұ̴.
	׸ ߰    ΰ̻ Ű ̼
	ϰ Ǵµ, lightwaveִϸ̼ ׳ Ͼ ̼ص 
	׷ ´.

*************************************************************

                 cam file format v1.0

                   1999.2.24 Gamza
		         dgPIX entertainment

*************************************************************

=============================================================

	cam file size description.

=============================================================
4byte ( long framecount )
{ 
	sizeof( KEYFRAMEDATA )
} 
4byte ( long framecount_forParent )
{ 
	sizeof( KEYFRAMEDATA )
} 
4byte ( long framecount_forTarget )
{ 
	sizeof( KEYFRAMEDATA )
} 

=============================================================

	cam file format.

=============================================================
lightwave ī޶ ִϸ̼  .
ī޶ Ű Ʈ  ߿  Parent 
Target Object Ű Ʈ ɼ̴.
 framecount_forParent == 0 ̸  ī޶ Parent Object
 ʴ ī޶̰,
 framecount_forTarget == 0 ̸  ī޶ Target Object
 ʴ ī޶ ̴.
ī޶, Parent, Target   lightwave  
ī޶ִϿ    ִ ̴.
ٸ Parent Target ֻ Ʈ̾ Ѵ.
( NULL Object ϴ° . )
Camera Parent Target ִϸ̼ ϱ  Ʈ
Ű  ִ°  ȿ ʴٰ Ǵ, ƿ ׷
츦 ġ ʾұ ̴.

*************************************************************

                 dgl file format v1.0

                   1999.2.24 Gamza
		         dgPIX entertainment

*************************************************************

file format ϱ  structure...
=============================================================
typedef struct taglwsLIGHT
{
	long type;
	float x,y,z;
	float nx,ny,nz;
	unsigned char r,g,b;
	float intensity;
	float falloff;
	float coneangle;
	float edgeangle;
}	lwsLIGHT;

=============================================================

	dgl file size description.

=============================================================
4byte ( long LightCount )
{
	sizeof( lwsLIGHT )
}

=============================================================

	dgl file format.

=============================================================
lightwave light  export .

1. LightCount
	ü light.
2. lwsLight
	long type;
		lightwave light typeȣ.
		0	:	distant light ( or directional light )
		1	:	point light
		2	:	spot light
		3	:	linear light
		4	:	area light

	float x,y,z;
		 ġ

	float nx,ny,nz;
		 

	unsigned char r,g,b;
		 

	float intensity;
		 ( 1.0 ̸ 100% )

	float falloff;
		  ִ ִ Ÿ

	float coneangle;
		light   ϴ . ( 360 )

	float edgeangle;
		light ߴ ִ  ( 360 )
		(  0 coneangle ִ밭 
		߰, coneangle   ؼ
		edgeangle    0̵ȴ. )
	
	light  ڼ   lws ο
	' AddLight ' κ 캼.

=============================================================
	PS.
=============================================================
̰  3d ϸ鼭 ʿ信   format Դϴ.

format Ư¡
 - Ű ִϸ̼  (pivot) ԵǾְ,
 -  ӵ   face surface ĵǾ,
 - ִϸ̼ matrix vertex    
    vertex pivot ĵǾֽϴ.

и ̰   format ƴ, dgo ȯ, 
 ,  Ϻ մϴ.

  ¥ٺ Ϻȯ  ϴ ð 
ûٴ  ƽǰ̴ϴ.
̰   ̳ 帱  ڴٴ 
   ̺귯 Ǳ⵵  ̷
   ÷帳ϴ.

fileformat  ñ ôٰų,  ڴٴ
κ ø   ֽʽÿ.
ǰ ݿؼ  3d file format ؼ, tool
 帮 ϰڽϴ.

hitel ID : Gamza
E-mail	 : Gamza@hitel.net
