User manual CONITEC 3D GAMESTUDIO-A4 PROGRAMMER S MANUAL

DON'T FORGET : ALWAYS READ THE USER GUIDE BEFORE BUYING !!!

If this document matches the user guide, instructions manual or user manual, feature sets, schematics you are looking for, download it now. Diplodocs provides you a fast and easy access to the user manual CONITEC 3D GAMESTUDIO-A4. We hope that this CONITEC 3D GAMESTUDIO-A4 user guide will be useful to you.


CONITEC 3D GAMESTUDIO-A4 PROGRAMMER S MANUAL: Download the complete user guide (177 Ko)

Manual abstract: user guide CONITEC 3D GAMESTUDIO-A4PROGRAMMER S MANUAL

Detailed instructions for use are in the User's Guide.

[. . . ] The interface contains pointers to engine variables and functions, like the frame buffer, the DirectX interface, the network interface, the DirectInput interface, the level, the WDL functions and so on. Theoretically everything - MP3 or MOD players, a physics engine, another 3D engine or even another scripting language could be added to the engine this way. On accessing system resources like sound, video, joystick and so on, the DLL must take care of possible resource conflicts. The engine shares its resources and expects the same from the code inside the DLL. [. . . ] 3rd point / Plane normal is oriented towards the cross product of (p1 - p2) and (p3 -p2) Texture - name of the texture. X_offs - texture x-offset in pixels Y_offs - texture y-offset in pixels A4 Programmer's Manual © Conitec 2000 9 Angle - texture rotation angle, in degree X_scale - size of a pixel in x-direction (pixels per quant) Y_scale - size of a pixel in y-direction (pixels per quant) flags - render mode flags for the texture. Here is the format of the . MDL file header: typedef float vec3[3]; typedef struct { char version[4]; long final; vec3 scale; vec3 offset; float pad; vec3 eye; long numskins ; long skinwidth; long skinheight; long numverts; long numtris; long numframes; long numskinverts; long flags; long numbones; } mdl_header; // // // // // // // // // // // // // // // "MDL3" or "MDL4" not used yet 3D position scale factors. number of skin textures width of skin texture; must be a multiple of 2 height of skin texture number of 3d wireframe vertices number of triangles surfaces number of frames number of 2D skin vertice 0 = normal, 1 = terrain model number of bone vertices (MDL4 only, otherwise 0) The size of this header is 0x54 bytes (84). The "MDL3" format is used by the A4 engine, while the "MDL4" format is used by the A5 engine. After the file header follow the skins, the skin vertices, the triangles, the frames, and finally the bones (future expansion). A4 Programmer's Manual MDL skin format © Conitec 2000 11 The model skins are flat pictures that represent the texture that should be applied on the model. You will find the first skin just after the model header, at offset baseskin = 0x54. Each of these model skins is either in 8-bit palettized (type == 0) or in 16-bit 5-6-5 format (type == 2). The structure is: typedef byte unsigned char; typedef struct { int skintype; // 0 for 8 bit (bpp == 1), 2 for 16 bit (bpp == 2) byte skin[skinwidth*skinheight*bpp]; // the skin picture } mdl_skin_t; 8 bit skins are a table of bytes, which represent an index in the level palette. If the model is rendered in overlay mode, index 0x00 indicates transparency. 16 bit skins are a table of shorts, which represent a true colour with the upper 5 bits for the red, the middle 6 bits for the green, and the lower 5 bits for the blue component. Green has one bit more because the human eye is more sensitive to green than to other colours. If the model is rendered in overlay mode, colour value 0x0000 indicates transparency. The width of skins should be a multiple of 4, to ensure long word alignement. The skin pictures are usually made of as many pieces as there are independent parts in the model. For instance, for the a player, there may be two pieces that defines the body, and two others that define the gun. MDL skin vertices The list of skin vertices indicates only the position on texture picture, not the 3D position. That's because for a given vertex, the position on skin is constant, while the position in 3D space varies with the animation. The list of skin vertices is made of these structures: typedef struct { short u; // position, horizontally in range 0. . skinwidth-1 short v; // position, vertically in range 0. . skinheight-1 } mdl_uvvert_t; mdl_uvvert_t skinverts[numskinverts]; u and v are the pixel position on the skin picture. The skin vertices are stored in a list, that is stored at offset basestverts = baseskin + skinsize. [. . . ] The normal is necessary to calculate the Gouraud shading of the faces, but actually a crude estimation of the actual vertex normal is sufficient. That's why, to save space and to reduce the number of computations needed, it has been chosen to approximate each vertex normal. The ordinary values of lightnormalindex are comprised between 0 and 161, and directly map into the index of one of the 162 precalculated normal vectors: float lightnormals[162][3] = { {-0. 525725, 0. 000000, 0. 850650}, {-0. 442863, 0. 238856, 0. 864188}, {-0. 295242, 0. 000000, 0. 955423}, {-0. 309017, 0. 500000, 0. 809017}, {-0. 162460, 0. 262866, 0. 951056}, {0. 000000, 0. 000000, 1. 000000}, {0. 000000, 0. 850651, 0. 525731}, {-0. 147621, 0. 716567, 0. 681718}, {0. 147621, 0. 716567, 0. 681718}, {0. 000000, 0. 525731, 0. 850651}, {0. 309017, 0. 500000, 0. 809017}, {0. 525731, 0. 000000, 0. 850651}, {0. 295242, 0. 000000, 0. 955423}, {0. 442863, 0. 238856, 0. 864188}, {0. 162460, 0. 262866, 0. 951056}, {-0. 681718, 0. 147621, 0. 716567}, {-0. 809017, 0. 309017, 0. 500000}, {-0. 587785, 0. 425325, 0. 688191}, {-0. 850651, 0. 525731, 0. 000000}, {-0. 864188, 0. 442863, 0. 238856}, {-0. 716567, 0. 681718, 0. 147621}, {-0. 688191, 0. 587785, 0. 425325}, {-0. 500000, 0. 809017, 0. 309017}, {-0. 238856, 0. 864188, 0. 442863}, {-0. 425325, 0. 688191, 0. 587785}, {-0. 716567, 0. 681718, -0. 147621}, {-0. 500000, 0. 809017, -0. 309017}, {-0. 525731, 0. 850651, 0. 000000}, {0. 000000, 0. 850651, -0. 525731}, {-0. 238856, 0. 864188, -0. 442863}, {0. 000000, 0. 955423, -0. 295242}, {-0. 262866, 0. 951056, -0. 162460}, {0. 000000, 1. 000000, 0. 000000}, {0. 000000, 0. 955423, 0. 295242}, {-0. 262866, 0. 951056, 0. 162460}, {0. 238856, 0. 864188, 0. 442863}, {0. 262866, 0. 951056, 0. 162460}, {0. 500000, 0. 809017, 0. 309017}, {0. 238856, 0. 864188, -0. 442863}, {0. 262866, 0. 951056, -0. 162460}, {0. 500000, 0. 809017, -0. 309017}, {0. 850651, 0. 525731, 0. 000000}, {0. 716567, 0. 681718, 0. 147621}, {0. 716567, 0. 681718, -0. 147621}, {0. 525731, 0. 850651, 0. 000000}, {0. 425325, 0. 688191, 0. 587785}, {0. 864188, 0. 442863, 0. 238856}, {0. 688191, 0. 587785, 0. 425325}, A4 Programmer's Manual © Conitec 2000 13 {0. 809017, 0. 309017, 0. 500000}, {0. 681718, 0. 147621, 0. 716567}, {0. 587785, 0. 425325, 0. 688191}, {0. 955423, 0. 295242, 0. 000000}, {1. 000000, 0. 000000, 0. 000000}, {0. 951056, 0. 162460, 0. 262866}, {0. 850651, -0. 525731, 0. 000000}, {0. 955423, -0. 295242, 0. 000000}, {0. 864188, -0. 442863, 0. 238856}, {0. 951056, -0. 162460, 0. 262866}, {0. 809017, -0. 309017, 0. 500000}, {0. 681718, -0. 147621, 0. 716567}, {0. 850651, 0. 000000, 0. 525731}, {0. 864188, 0. 442863, -0. 238856}, {0. 809017, 0. 309017, -0. 500000}, {0. 951056, 0. 162460, -0. 262866}, {0. 525731, 0. 000000, -0. 850651}, {0. 681718, 0. 147621, -0. 716567}, {0. 681718, -0. 147621, -0. 716567}, {0. 850651, 0. 000000, -0. 525731}, {0. 809017, -0. 309017, -0. 500000}, {0. 864188, -0. 442863, -0. 238856}, {0. 951056, -0. 162460, -0. 262866}, {0. 147621, 0. 716567, -0. 681718}, {0. 309017, 0. 500000, -0. 809017}, {0. 425325, 0. 688191, -0. 587785}, {0. 442863, 0. 238856, -0. 864188}, {0. 587785, 0. 425325, -0. 688191}, {0. 688197, 0. 587780, -0. 425327}, {-0. 147621, 0. 716567, -0. 681718}, {-0. 309017, 0. 500000, -0. 809017}, {0. 000000, 0. 525731, -0. 850651}, {-0. 525731, 0. 000000, -0. 850651}, {-0. 442863, 0. 238856, -0. 864188}, {-0. 295242, 0. 000000, -0. 955423}, {-0. 162460, 0. 262866, -0. 951056}, {0. 000000, 0. 000000, -1. 000000}, {0. 295242, 0. 000000, -0. 955423}, {0. 162460, 0. 262866, -0. 951056}, {-0. 442863, -0. 238856, -0. 864188}, {-0. 309017, -0. 500000, -0. 809017}, {-0. 162460, -0. 262866, -0. 951056}, {0. 000000, -0. 850651, -0. 525731}, {-0. 147621, -0. 716567, -0. 681718}, {0. 147621, -0. 716567, -0. 681718}, {0. 000000, -0. 525731, -0. 850651}, {0. 309017, -0. 500000, -0. 809017}, {0. 442863, -0. 238856, -0. 864188}, {0. 162460, -0. 262866, -0. 951056}, {0. 238856, -0. 864188, -0. 442863}, {0. 500000, -0. 809017, -0. 309017}, {0. 425325, -0. 688191, -0. 587785}, {0. 716567, -0. 681718, -0. 147621}, {0. 688191, -0. 587785, -0. 425325}, {0. 587785, -0. 425325, -0. 688191}, {0. 000000, -0. 955423, -0. 295242}, {0. 000000, -1. 000000, 0. 000000}, {0. 262866, -0. 951056, -0. 162460}, {0. 000000, -0. 850651, 0. 525731}, {0. 000000, -0. 955423, 0. 295242}, {0. 238856, -0. 864188, 0. 442863}, {0. 262866, -0. 951056, 0. 162460}, {0. 500000, -0. 809017, 0. 309017}, {0. 716567, -0. 681718, 0. 147621}, {0. 525731, -0. 850651, 0. 000000}, {-0. 238856, -0. 864188, -0. 442863}, {-0. 500000, -0. 809017, -0. 309017}, {-0. 262866, -0. 951056, -0. 162460}, {-0. 850651, -0. 525731, 0. 000000}, {-0. 716567, -0. 681718, -0. 147621}, {-0. 716567, -0. 681718, 0. 147621}, {-0. 525731, -0. 850651, 0. 000000}, {-0. 500000, -0. 809017, 0. 309017}, {-0. 238856, -0. 864188, 0. 442863}, {-0. 262866, -0. 951056, 0. 162460}, {-0. 864188, -0. 442863, 0. 238856}, {-0. 809017, -0. 309017, 0. 500000}, {-0. 688191, -0. 587785, 0. 425325}, {-0. 681718, -0. 147621, 0. 716567}, {-0. 442863, -0. 238856, 0. 864188}, {-0. 587785, -0. 425325, 0. 688191}, {-0. 309017, -0. 500000, 0. 809017}, {-0. 147621, -0. 716567, 0. 681718}, {-0. 425325, -0. 688191, 0. 587785}, {-0. 162460, -0. 262866, 0. 951056}, {0. 442863, -0. 238856, 0. 864188}, {0. 162460, -0. 262866, 0. 951056}, {0. 309017, -0. 500000, 0. 809017}, {0. 147621, -0. 716567, 0. 681718}, {0. 000000, -0. 525731, 0. 850651}, {0. 425325, -0. 688191, 0. 587785}, {0. 587785, -0. 425325, 0. 688191}, {0. 688191, -0. 587785, 0. 425325}, {-0. 955423, 0. 295242, 0. 000000}, {-0. 951056, 0. 162460, 0. 262866}, {-1. 000000, 0. 000000, 0. 000000}, {-0. 850651, 0. 000000, 0. 525731}, {-0. 955423, -0. 295242, 0. 000000}, {-0. 951056, -0. 162460, 0. 262866}, {-0. 864188, 0. 442863, -0. 238856}, {-0. 951056, 0. 162460, -0. 262866}, {-0. 809017, 0. 309017, -0. 500000}, {-0. 864188, -0. 442863, -0. 238856}, {-0. 951056, -0. 162460, -0. 262866}, {-0. 809017, -0. 309017, -0. 500000}, {-0. 681718, 0. 147621, -0. 716567}, {-0. 681718, -0. 147621, -0. 716567}, {-0. 850651, 0. 000000, -0. 525731}, {-0. 688191, 0. 587785, -0. 425325}, {-0. 587785, 0. 425325, -0. 688191}, {-0. 425325, 0. 688191, -0. 587785}, {-0. 425325, -0. 688191, -0. 587785}, {-0. 587785, -0. 425325, -0. 688191}, {-0. 688197, -0. 587780, -0. 425327} }; A whole frame has the following structure: typedef struct { long type; // 0 for byte-packed positions, and 2 for word-packed positions mdl_trivertx_t bboxmin, bboxmax; // bounding box of the frame char name[16]; // name of frame, used for animation mdl_trivertx_t vertex[numverts]; // array of vertices, either byte or short packed } mdl_frame_t; The size of each frame is sizeframe = 20 + (numverts+2) * sizeof(mdl_trivertx_t), while mdl_trivertx_t is either mdl_trivertxb_t or mdl_trivertxs_t, depending on whether the type is 0 or 2. The beginning of the frames can be found in the . MDL file at offset baseframes = basetri + numtris * sizeof(mdl_triangle_t). MDL bones This is only for future expansion of the MDL format, and not implemented yet. A4 Programmer's Manual © Conitec 2000 14 Bones are a linked list of 3D vertices that are used for animation in the MDL4 format. [. . . ]

DISCLAIMER TO DOWNLOAD THE USER GUIDE CONITEC 3D GAMESTUDIO-A4




Click on "Download the user Manual" at the end of this Contract if you accept its terms, the downloading of the manual CONITEC 3D GAMESTUDIO-A4 will begin.

 

Copyright © 2015 - manualRetreiver - All Rights Reserved.
Designated trademarks and brands are the property of their respective owners.