Oryginalna strona colobot.cba.pl umarła, gdy cba.pl przestało oferować darmowy hosting. To jest statyczny mirror, pobrany w 2018. ~krzys_h
 Polski Portal COLOBOTa - COLOBOT Polish Portal
Nawigacja
Strona Główna
Forum
Nowe forum
Download
Regulamin
FAQ
Linki

Kody
Instalacja własnych poziomów
Tworzenie własnych poziomów
Forum angielskie
PPC na PIRC.PL

Artykuły
Kontakt
Galeria
Statystyki
Logowanie
Nazwa Użytkownika

Hasło



Nie jesteś jeszcze naszym Użytkownikiem?
Kilknij TUTAJ żeby się zarejestrować.

Zapomniane hasło?
Wyślemy nowe, kliknij TUTAJ.
Ankieta dla Użytkowników
Dogrywka głosowania: użytkownik marca 2012

Programerus
Programerus
25% [2 Głosów]

krzys_h
krzys_h
13% [1 Głosuj]

adiblol
adiblol
13% [1 Głosuj]

Mrocza
Mrocza
13% [1 Głosuj]

Poxipol
Poxipol
25% [2 Głosów]

Głosów: 8
Rozpoczęta: 01/04/2012 10:35
Zakończona: 16/04/2012 18:00

Archiwum Ankiet
Użytkowników Online
Gości Online: 1
Brak Użytkowników Online

Zarejestrowanych Uzytkowników: 421
Najnowszy Użytkownik: peter
Edycja MODów
P.S. you can change a mod and repack the colobot2.dat file while the
game is running and your changes will be seen on any NEW object created
that uses that MOD file!

Code:
** Header :: 34h bytes

Offset   Type   Description
----------------------------------------------------------
00h   DWORD   File Version Major
04h   DWORD   File Version Minor
08h   DWORD   Number of Triangle definitions that follow
0Ch   DWORD   Unknown - always 0
10h   DWORD   Unknown - always 0
14h   DWORD   Unknown - always 0
18h   DWORD   Unknown - always 0
1Ch   DWORD   Unknown - always 0
20h   DWORD   Unknown - always 0
24h   DWORD   Unknown - always 0
28h   DWORD   Unknown - always 0
2Ch   DWORD   Unknown - always 0
30h   DWORD   Unknown - always 0


Code:
** Point3D :: 0Ch Bytes
Note: contrary to most things, in computer graphics the world is drawn relative to the
screen not the "world". this means that Y is up and down, X is left to right, and Z is
toward and away from screen with Z going from the screen INTO the monitor.
 Y
 ^
 |     Z
 |     ^
 |    /
 |  /
 |/
 .---------> X

Offset   Type   Description
----------------------------------------------------------
00h   float   X
04h   float   Y
08h   float   Z


Code:
** PointUV :: 8h bytes
Just what is a UV you ask, it is a 2D point used to represent the location on a texture
e.g. the X, Y on an image. This value ranges form 0.0 to 1.0 (yes just multiply the U
by the image width in pixels to get the X position - ditto for the V), while values
outside this range are valid for most render systems i haven’t seen colobot use any values
outside this bound.

Offset   Type   Description
----------------------------------------------------------
00h   float   U
04h   float   V



Code:
** Vertex : 28h bytes
Offset   Type   Description
----------------------------------------------------------
00h   Point3D   Position
0Ch   Point3D Normal Vector (used for light calculations)
18h   PointUV   Texture 1 UV (Image/art)
20h   PointUV Texture 2 UV (Dirty Image - see the PDF on level making)



Code:
** ColorRGBA : 10h bytes
Offset   Type   Description
----------------------------------------------------------
00h   float   Red
04h   float   Green
08h   float   Blue
0Ch   float   Alpha (unused)



Code:
** Material : 44h bytes  (This is a good one to google)
This material is applied to all three vertices of the triangle, therefore to the entire
surface of the triangle.

Offset   Type       Description
----------------------------------------------------------
00h   ColorRGBA   Diffuse Color
10h   ColorRGBA   Ambient Color
20h   ColorRGBA   Specular Color (unused)
30h   ColorRGBA   Emissive Color
40h   float       Specular Power (unused)



Code:
** Triangle :: 0E8h Bytes
@@ This is the object your waiting for! @@
Offset   Type       Description
----------------------------------------------------------
000h   DWORD       If this is 0 the triangle is not displayed
004h   Vertex      Vertex 1
02Ch   Vertex      Vertex 2
054h   Vertex      Vertex 3
07Ch   Material    Material of the surface
0C0h   char[10h]   Name of the texture (art) file used - note this file is always a TGA even if it says BMP
0D0h   DWORD/float Unknown
0D4h   float       Range Geometry;    // See Note 1
0D8h   float       Unknown 1000000 for most things; 100 for crystals
0DCh   DWORD/float Unknown
0E0h   DWORD       Dirty Texture setting 0:NoDirt, 1:LevelCommanded, Other: Corresponds to "Dirty%d2.tga"
0E4h   DWORD/float Unknown


Well there you have it, the MOD file format.
----
Note 1:
The Range Geometry field is used to reduce the number of triangles in a scene. This is a floating-point number and you will see sets of overlapping geometry with this field varied. What does this mean? Lets say you find a model that has sets of geometry containing 0.0, 100.0, and 200.0 The triangles tagged with 0.0 will be rendered if the viewer is less than 100.0 units away, and the triangles tagged with 100.0 will be rendered if the viewer is between 100 and 200 units away, and if it's tagged 200.0 then the triangle will be rendered if the viewer is more than 200 units away.
In short the object contains more than one geometric representation of varying levels of detail.


Last edited by Ens on Mon Sep 18, 2006 4:17; edited 3 times in total
Komentarze
Brak komentarzy.
Dodaj komentarz
Zaloguj się, żeby móc dodawać komentarze.
Użytkowników Online
Gości Online: 1
Brak Użytkowników Online

Zarejestrowanych Uzytkowników: 421
Najnowszy Użytkownik: peter
Polski portal COLOBOTa © 2008 - 2012