Archived

This topic is now archived and is closed to further replies.

Monder

GTK Radiant .Map Format

Recommended Posts

Ok I''ve started to create a simple 3d engine. Instead of writing a map editor myself I thought I would use GTK Radiant. I have looked through the structure of the .map file format it uses worked out what does what and wrote a parsing routine to load the data in. Now each brush has a list of vertices. There are 3 vertices per line then a load of texture stuff. For a cuboid shaped brush there are six of these lines so you have altogether 6X3 vertices to describe a cube ie 12. I made a basic ogl app that runs through each line and treats each group of three as a tri which obviously didn''t work. So I have 12 vertices to create a cuboid from. I have no idea how. Can anyone help me out?

Share this post


Link to post
Share on other sites
Well I''ve found a post on some message board that says the brushes are described in the file by using a plane for each side. So in a file every brush is described by planes (I removed the texture stuff cause it isn''t relevent)

( 136 128 0 ) ( 0 128 0 ) ( 0 16 0 )
( 0 16 128 ) ( 0 128 128 ) ( 136 128 128 )
( 0 0 8 ) ( 136 0 8 ) ( 136 0 0 )
( 128 16 8 ) ( 128 128 8 ) ( 128 128 0 )
( 136 128 8 ) ( 0 128 8 ) ( 0 128 0 )
( 0 128 8 ) ( 0 16 8 ) ( 0 16 0 )

This is a cube shaped brush. It is 128 units tall,wide and long. So each line describes a plane that is 128 X 128 units. Can anybody work out how you would get the plane information from the stuff above?

Share this post


Link to post
Share on other sites