Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Geometry Binary Viewer (C#)

Arrogant Wizard
Loyal Member
Joined
Mar 30, 2007
Messages
745
Reaction score
34
Hey all

Ok, newest project: A geometry binary (*.gb) viewer, in C#
So far it can render, which you can see on following image

DeathArt - Geometry Binary Viewer (C#) - RaGEZONE Forums


The project is made by phantom's specifications for the GB file layout, here is the latest version:
PHP:
[GBHeader (Version: 8; Size: 39; Reference: GBHeader - Version 12)]
Offset (Bytes)   Length (Bytes)   Reference Offset
---------------  ---------------  -----------------
0                4                0
4                4                72
8                12               76
20               2                100
22               2                102
24               2                104
26               2                106
28               2                108
30               2                110
32               2                116
34               1                118
35               2                120
37               2                122

[GBHeader (Version: 9; Size: 72; Reference: GBHeader - Version 12)]
Offset (Bytes)   Length (Bytes)   Reference Offset
---------------  ---------------  -----------------
0                4                0
4                4                72
8                24               76
32               2                100
34               2                102
36               2                104
38               2                106
40               4                108
44               4                112
48               2                116
50               1                118
51               1                119
52               2                120
54               2                122
56               16               148

[GBHeader (Version: 10; Size: 76; Reference: GBHeader - Version 12)]
Offset (Bytes)   Length (Bytes)   Reference Offset
---------------  ---------------  -----------------
0                4                0
4                4                4
8                4                72
12               24               76
36               2                100
38               2                102
40               2                104
42               2                106
44               4                108
48               4                112
52               2                116
54               1                118
55               1                119
56               2                120
58               2                122
60               16               148

[GBHeader (Version: 12; Size: 164)]
Description                     Length   Type     Offset   Comments
------------------------------  -------  -------  -------  ----------------------
Version                         1        UInt8    0        12
Bone Count                      1        UInt8    1
Bone Identifier                 1        UInt8    2
Material Count                  1        UInt8    3
Checksum                        4        UInt32   4
File Name                       64       String   8        Encrypted
File Name Length                4        UInt32   72    
Total Vertex Count 0            2        UInt16   76       XYZ | NORMAL | TEX1 = 32
Total Vertex Count 1            2        UInt16   78       XYZ | LASTBETA_UBYTE4 | NORMAL | TEX1 = 36
Total Vertex Count 2            2        UInt16   80       XYZB2 | LASTBETA_UBYTE4 | NORMAL | TEX1 = 40
Total Vertex Count 3            2        UInt16   82       XYZB3 | LASTBETA_UBYTE4 | NORMAL | TEX1 = 44
Total Vertex Count 4            2        UInt16   84       XYZB4 | LASTBETA_UBYTE4 | NORMAL | TEX1 = 48
Total Vertex Count 5            2        UInt16   86       XYZB5 | LASTBETA_UBYTE4 | NORMAL | TEX1 = 52
Total Vertex Count 6            2        UInt16   88       Always 0
Total Vertex Count 7            2        UInt16   90       Always 0
Total Vertex Count 8            2        UInt16   92       Always 0
Total Vertex Count 9            2        UInt16   94       Always 0
Total Vertex Count 10           2        UInt16   96       Always 0
Total Vertex Count 11           2        UInt16   98       Always 0
Total Index Count               2        UInt16   100      Total_Index_Size = Total_Index_Count * 2
Total Bone Count                2        UInt16   102
Total Key Frame Count           4        UInt32   104
Material Descriptor Length      4        UInt32   108
Collision Size                  4        UInt32   112
Key Frame Transformation Count  2        UInt16   116
Animation Count                 2        UInt16   118
Mesh Count                      2        UInt16   120
Start Frame                     2        UInt16   122      Always 1
Bounding Box Minimum            12       Vector3  124
Bounding Box Maximum            12       Vector3  136
Bounding Sphere Center          12       Vector3  148
Bounding Sphere Radius          4        Float    160

[GBBone (Size: 41; Condition: IF GBHeader.Bone_Count > 0 AND GBHeader.Bone_Identifier > 0; Read: FOR 0 TO GBHeader.Bone_Count))]
Description                     Length   Type         Offset   Comments
------------------------------  -------  -----------  -------  ----------------------
Transformation                  64       4x4 Matrix   0
Link                            1        UInt8        64       Root = 255

[GBMaterialHeader (Size: 18; Condition: IF GBHeader.Material_Count > 0; Read: FOR 0 TO GBHeader.Material_Count)]
Description                     Length   Type     Offset   Comments
------------------------------  -------  -------  -------  ----------------------
Texture File Name Offset        4        UInt32   0
Texture Map Option              2        UInt16   4
Texture File Name Length        4        UInt32   6
Texture Overlay String Offset   4        UInt32   10       "Water" is the only overlay available
Material Offset                 4        UInt32   14       Ambient, Diffuse, Specular, Power

[GBMeshHeader (Size: 15; Condition: IF GBHeader.Mesh_Count > 0; Read: FOR 0 TO GBHeader.Mesh_Count)]
Description                     Length   Type     Offset   Comments
------------------------------  -------  -------  -------  ----------------------
Name Offset                     4        UInt32   0
Material Header Index           4        UInt32   4
Vertex Type                     1        UInt8    8        0 to 11 (Only 0-5 are used)
Triangle Type                   1        UInt8    9        0 = List, 1 = Strip
Vertex Count                    2        UInt16   10
Index Count                     2        UInt16   12
Bone Count                      1        UInt8    14

>>> [GBMesh]
    Description   Type     Length
    ------------  -------  -----------------------------------------------------
    Bones         UInt8    GBMeshHeader.Bone_Count
    Vertices      FVF      GBMeshHeader.Vertex_Count * (((GBMeshHeader.Vertex_Type % 4) * 4) + 32)
    Indices       UInt16   GBMeshHeader.Index_Count * 2

[GBAnimationHeader (Size: 6; Condition: IF GBHeader.Animation_Count > 0)]
Description                     Length   Type     Offset   Comments
------------------------------  -------  -------  -------  ----------------------
Identifier                      4        UInt32   0
Key Frame Count                 2        UInt16   4

>>> [GBAnimationKeyFrame (Size: 6; Read: FOR 0 TO GBAnimationHeader.Key_Frame_Count)]
    Description                 Length   Type     Offset   Comments
    --------------------------  -------  -------  -------  ----------------------
    Duration                    2        UInt16   0        Seconds
    Animation Identifier        4        UInt32   2

[GBAnimationBone (Read: FOR 0 TO GBAnimationHeader.Key_Frame_Count, FOR 0 TO GBHeader.Bone_Count)]
Description                         Type     Length
----------------------------------  -------  -----------------------------------
Key Frame Transformation Index      UInt16   GBHeader.Bone_Count * 2

[GBAnimationKeyFrameTransformation (Size: 40; Read: FOR 0 TO GBHeader.Key_Frame_Transformation_Count))]
Description                     Length   Type        Offset   Comments
------------------------------  -------  ----------  -------  -------------------
Translation                     12       Vector3     0
Rotation                        16       Quaternion  12
Scale                           12       Vector3     28

The project will be open source when complete. Credits to phantom for the help so far.

P.S. I'm also planning on building in a texture-edit function, so you can easy change the filename of the textures.

And remember that you can use PNG,GIF,TGA instead of converting to GTX every time, it's not nessary :eek:
 
Last edited:
This Time = Dead Time!
Joined
Oct 5, 2006
Messages
364
Reaction score
1
Re: [DEV] Geometry Binary Viewer (C#)

sweet, been waiting forever for a better gb view
 
Newbie Spellweaver
Joined
Sep 20, 2006
Messages
71
Reaction score
0
Re: [DEV] Geometry Binary Viewer (C#)

looks interesting... thx 4 specs
 
Newbie Spellweaver
Joined
Dec 3, 2006
Messages
62
Reaction score
0
Re: [DEV] Geometry Binary Viewer (C#)

Looking cool!
*thumbs up* :drinks_no
 
Blender Fan|Kinenbi Owner
Loyal Member
Joined
Mar 27, 2006
Messages
800
Reaction score
355
Re: [DEV] Geometry Binary Viewer (C#)

read topic title -->Geometry Binary Viewer (C#)
 
Arrogant Wizard
Loyal Member
Joined
Mar 30, 2007
Messages
745
Reaction score
34
Re: [DEV] Geometry Binary Viewer (C#)

Progress (Yes, it IS 3D, and I can pan it around if I want)

DeathArt - Geometry Binary Viewer (C#) - RaGEZONE Forums
 
Skilled Illusionist
Joined
Apr 3, 2007
Messages
311
Reaction score
1
Re: [DEV] Geometry Binary Viewer (C#)

Yea looks very nice
 
Junior Spellweaver
Joined
Aug 8, 2006
Messages
107
Reaction score
1
Re: [DEV] Geometry Binary Viewer (C#)

phantom` is not in european timezones FYI.
 
Arrogant Wizard
Loyal Member
Joined
Mar 30, 2007
Messages
745
Reaction score
34
Re: [DEV] Geometry Binary Viewer (C#)

First public beta release:
- Compiled:
- Source:
Requires .NET 2.0 framework as always. And uses the swordcrypt.dll (so don't throw it away :p)

Added a new feature: Dump as Image - Allows you to dump the rendered graphics as a JPEG.
 
aka Reb3lzrr
Joined
Aug 23, 2006
Messages
325
Reaction score
47
Re: [DEV] Geometry Binary Viewer (C#)

Hmm, Its kinda nice:)

I'm not sure what your planning next but I'd like to see:
- Camera movements
- Zoom

and btw: It crashes as soon as you trying to open bones, and effects

Gl
 
Experienced Elementalist
Joined
Aug 27, 2006
Messages
223
Reaction score
183
Re: [DEV] Geometry Binary Viewer (C#)

It's all TDA's hard work. I'm only helping out when needed. His determination is a testament of his support for this community and love for programming.
 
Back
Top