DGL
https://delphigl.com/forum/

Doom3 - Maps (Theory Stage)
https://delphigl.com/forum/viewtopic.php?f=19&t=3583
Seite 1 von 1

Autor:  Stucuk [ Mo Dez 20, 2004 02:52 ]
Betreff des Beitrags:  Doom3 - Maps (Theory Stage)

Doom3 maps are in text format rather than a compiled format like in previous id games. a .map format from gtkradient looks like follows:

Code:
  1.  
  2. // entity 0
  3. {
  4. "classname" "worldspawn"
  5. // brush 0
  6. {
  7. ( -200 216 264 ) ( -200 208 264 ) ( -200 208 256 ) chateau/wood_c06 -48 144 0 0.500000 0.500000 0 0 0
  8. ( 8 224 264 ) ( -200 224 264 ) ( -200 224 256 ) chateau/wood_c06 16 144 0 0.500000 0.500000 0 0 0
  9. ( 136 88 264 ) ( 136 96 264 ) ( 136 96 256 ) chateau/wood_c06 -48 144 0 0.500000 0.500000 0 0 0
  10. ( -88 -104 264 ) ( 120 -104 264 ) ( 120 -104 256 ) chateau/wood_c06 16 144 0 0.500000 0.500000 0 0 0
  11. ( -200 208 264 ) ( -200 216 264 ) ( 8 216 264 ) chateau/wood_c06 16 48 0 0.500000 0.500000 0 0 0
  12. ( 8 216 256 ) ( -200 216 256 ) ( -200 208 256 ) chateau/wood_c06 16 48 0 0.500000 0.500000 0 0 0
  13. }
  14. // brush 1
  15. {
  16. ( -704 384 -8 ) ( -824 384 -8 ) ( -824 256 -8 ) chateau/marblefloor_c04 -16 128 0 0.500000 0.500000 0 0 0
  17. ( -824 256 0 ) ( -824 384 0 ) ( -704 384 0 ) chateau/marblefloor_c04 -16 128 0 0.500000 0.500000 0 0 0
  18. ( -392 64 0 ) ( -272 64 0 ) ( -272 64 -8 ) chateau/marblefloor_c04 -16 0 0 0.500000 0.500000 0 0 0
  19. ( -192 72 0 ) ( -192 200 0 ) ( -192 200 -8 ) chateau/marblefloor_c04 -128 0 0 0.500000 0.500000 0 0 0
  20. ( -704 384 0 ) ( -824 384 0 ) ( -824 384 -8 ) chateau/marblefloor_c04 -16 0 0 0.500000 0.500000 0 0 0
  21. ( -824 384 0 ) ( -824 256 0 ) ( -824 256 -8 ) chateau/marblefloor_c04 -128 0 0 0.500000 0.500000 0 0 0
  22. }
  23. // brush 2
  24. {
  25. ( -824 64 0 ) ( -824 -64 0 ) ( -824 -64 -8 ) chateau/marblefloor_c04 0 0 0 0.500000 0.500000 0 0 0
  26. ( -704 64 0 ) ( -824 64 0 ) ( -824 64 -8 ) chateau/marblefloor_c04 -16 0 0 0.500000 0.500000 0 0 0
  27. ( -192 -248 0 ) ( -192 -120 0 ) ( -192 -120 -8 ) chateau/marblefloor_c04 0 0 0 0.500000 0.500000 0 0 0
  28. ( -392 -256 0 ) ( -272 -256 0 ) ( -272 -256 -8 ) chateau/marblefloor_c04 -16 0 0 0.500000 0.500000 0 0 0
  29. ( -824 -64 0 ) ( -824 64 0 ) ( -704 64 0 ) chateau/marblefloor_c04 -16 0 0 0.500000 0.500000 0 0 0
  30. ( -704 64 -8 ) ( -824 64 -8 ) ( -824 -64 -8 ) chateau/marblefloor_c04 -16 0 0 0.500000 0.500000 0 0 0
  31. }
  32.  
  33. Etc....
  34.  


Each line holds the information for 1 tryangle, it also tells the program the texture cordinates, scale and rotation. But a doom 3 map looks like follows:

Code:
  1.  
  2. Version 2
  3. // entity 0
  4. {
  5. "classname" "worldspawn"
  6. "call" "map_marscity2::main"
  7. // primitive 0
  8. {
  9.  brushDef3
  10.  {
  11.   ( 0 0 -1 184 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/common/player_clip" 0 0 0
  12.   ( 0 0 1 -344 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/common/player_clip" 0 0 0
  13.   ( 0 -1 0 -2944 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/common/player_clip" 0 0 0
  14.   ( 1 0 0 2928 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/common/player_clip" 0 0 0
  15.   ( 0 1 0 2908 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/common/player_clip" 0 0 0
  16.   ( -1 0 0 -2970 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/common/player_clip" 0 0 0
  17.  }
  18. }
  19. // primitive 1
  20. {
  21.  brushDef3
  22.  {
  23.   ( 0 0.7739573121 -0.6332377791 1451.9439697266 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/common/player_clip" 0 0 0
  24.   ( 0 -0.776113987 0.6305926442 -1465.2061767578 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/common/player_clip" 0 0 0
  25.   ( 0 -0.5547001958 -0.8320503235 -939.107421875 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/common/player_clip" 0 0 0
  26.   ( 0 1 0 1786 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/common/player_clip" 0 0 0
  27.   ( -1 0 0 -416 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/common/player_clip" 0 0 0
  28.   ( 1 0 0 352 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/common/player_clip" 0 0 0
  29.   ( 0 0 -1 82 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/common/player_clip" 0 0 0
  30.  }
  31. }
  32.  
  33. Etc....
  34.  


which at fist glance looks pritty similer, but the first line has 4 numbers. The first 3 might be normals? and the last number looks like it is added to the next 2 sets of 3 to gave them a position. Looking at it it looks like each line contains 2 vertex positions. But if each holds 2 vertex's wouldn't there not be enough information?

Im guessing when the map is loading u would also have to work out map clustors and which can see what.

Thoughts?

EDIT: looks like the AAS4B holds the info needed for working out what is visible, planes, nodes, clusters, etc. Its in text format too...

Autor:  LarsMiddendorf [ Mo Dez 20, 2004 09:55 ]
Betreff des Beitrags: 

The three points in the q3 map file describe a plane and not a triangle. In the doom3 map the four values are from the plane equation. The first three numbers define the normal and the last is the distance from the origin.

Autor:  Stucuk [ Mo Dez 20, 2004 16:56 ]
Betreff des Beitrags: 

do u know how to work out the vertex cordinates for each "primitive" ? (doom 3)

Seite 1 von 1 Alle Zeiten sind UTC + 1 Stunde
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/