Advertisement
illwieckz

q3map2's StoreSurfaceLightmaps craziness

Feb 4th, 2016
280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 12.58 KB | None | 0 0
  1.     /* -----------------------------------------------------------------
  2.        allocate output lightmaps
  3.        ----------------------------------------------------------------- */
  4.  
  5.     /* note it */
  6.     Sys_Printf( "allocating..." );
  7.     printf("\n"); // THD debug
  8.  
  9.     /* kill all existing output lightmaps */
  10.     if ( outLightmaps != NULL ) {
  11.         printf("1\n"); // THD debug
  12.         for ( i = 0; i < numOutLightmaps; i++ )
  13.         {
  14.             if (!i) printf("2\n"); // THD debug
  15.             free( outLightmaps[ i ].lightBits );
  16.             free( outLightmaps[ i ].bspLightBytes );
  17.         }
  18.         printf("3\n"); // THD debug
  19.         free( outLightmaps );
  20.         outLightmaps = NULL;
  21.     }
  22.     printf("4\n"); // THD debug
  23.  
  24.     numLightmapShaders = 0;
  25.     numOutLightmaps = 0;
  26.     numBSPLightmaps = 0;
  27.     numExtLightmaps = 0;
  28.  
  29.     /* find output lightmap */
  30.     for ( i = 0; i < numRawLightmaps; i++ )
  31.     {
  32.         if (!i) printf("5\n"); // THD debug
  33.         lm = &rawLightmaps[ sortLightmaps[ i ] ];
  34.         FindOutLightmaps( lm );
  35.     }
  36.     printf("6\n"); // THD debug
  37.  
  38.     /* set output numbers in twinned lightmaps */
  39.     printf("numRawLightmaps: %d\n", numRawLightmaps); // THD debug
  40.     for ( i = 0; i < numRawLightmaps; i++ )
  41.     {
  42.         if (!i) printf("7\n"); // THD debug
  43.         /* get lightmap */
  44.         lm = &rawLightmaps[ sortLightmaps[ i ] ];
  45.  
  46.         /* walk lightmaps */
  47.         for ( lightmapNum = 0; lightmapNum < MAX_LIGHTMAPS; lightmapNum++ )
  48.         {
  49.             if (!i && !lightmapNum) printf("8\n"); // THD debug
  50.             /* get twin */
  51.             lm2 = lm->twins[ lightmapNum ];
  52.             if ( lm2 == NULL ) {
  53.                 continue;
  54.             }
  55.             lightmapNum2 = lm->twinNums[ lightmapNum ];
  56.  
  57.             /* find output lightmap from twin */
  58.             lm->outLightmapNums[ lightmapNum ] = lm2->outLightmapNums[ lightmapNum2 ];
  59.             lm->lightmapX[ lightmapNum ] = lm2->lightmapX[ lightmapNum2 ];
  60.             lm->lightmapY[ lightmapNum ] = lm2->lightmapY[ lightmapNum2 ];
  61.         }
  62.         if (!i) printf("9\n"); // THD debug
  63.     }
  64.     printf("10\n"); // THD debug
  65. ___________________________________________________________________________
  66.  
  67. Building to bsp: maps/metro.map
  68. Building ./maps/metro.map, stage: bsp
  69. Build command: q3map2 -game unv -bsp -fs_pakpath . -prtfile /tmp/tmp5xm0v5zs_metro.prt -srffile /tmp/tmp6h2200m0_metro.srf -bspfile build/test/map-metro_test.pk3dir/maps/metro.bsp -meta -custinfoparms -samplesize 1 ./maps/metro.map
  70. 2.5.17n-git-43d32b8
  71. threads: 8
  72. Q3Map         - v1.0r (c) 1999 Id Software Inc.
  73. Q3Map (ydnar) - v2.5.17n-git-43d32b8
  74. NetRadiant    - v1.5.0n-git-43d32b8 Feb  4 2016 03:21:58
  75. Your map saw the pretty lights from q3map2's BFG
  76. VFS Init: .
  77.  
  78. --- BSP ---
  79. -bsp argument unnecessary
  80. Use /tmp/tmp5xm0v5zs_metro.prt as portal file
  81. Use /tmp/tmp6h2200m0_metro.srf as surface file
  82. Use build/test/map-metro_test.pk3dir/maps/metro.bsp as bsp file
  83. Creating meta surfaces from brush faces
  84. Custom info parms enabled
  85. Lightmap sample size set to 1x1 units
  86. entering scripts/shaderlist.txt
  87. entering scripts/metro.shader
  88. Loading /data/dev/foreign-maps/map-metro/./maps/metro.map
  89. entering /data/dev/foreign-maps/map-metro/./maps/metro.map
  90. Entity 761 (func_group) has lightmap scale of 0.2500
  91. Entity 762 (func_group) has lightmap scale of 0.1250
  92. Entity 982 (func_group) has lightmap scale of 0.2500
  93. Entity 983 (func_group) has lightmap scale of 0.2500
  94.        0 areaportals
  95. Size: -4096, -7232,  -512 to  4160,  7056,  3072
  96. block size = { 1024 1024 1024 }
  97. BOGUS Entity 39, Brush 0: Entity in solid
  98. Entity 40, Brush 0: Entity in solid
  99. Entity 79, Brush 0: Entity in solid
  100. Entity 92, Brush 0: Entity in solid
  101. Entity 153, Brush 0: Entity in solid
  102. Entity 156, Brush 0: Entity in solid
  103. Entity 184, Brush 0: Entity in solid
  104. Entity 185, Brush 0: Entity in solid
  105. Entity 259, Brush 0: Entity in solid
  106. Entity 261, Brush 0: Entity in solid
  107. Entity 265, Brush 0: Entity in solid
  108. Entity 273, Brush 0: Entity in solid
  109. Entity 375, Brush 0: Entity in solid
  110. Entity 376, Brush 0: Entity in solid
  111. Entity 409, Brush 0: Entity in solid
  112. Entity 414, Brush 0: Entity in solid
  113. Entity 491, Brush 0: Entity in solid
  114. Entity 508, Brush 0: Entity in solid
  115. Entity 551, Brush 0: Entity in solid
  116. Entity 558, Brush 0: Entity in solid
  117. Entity 564, Brush 0: Entity in solid
  118. Entity 607, Brush 0: Entity in solid
  119. Entity 648, Brush 0: Entity in solid
  120. Entity 698, Brush 0: Entity in solid
  121. Entity 702, Brush 0: Entity in solid
  122. Entity 716, Brush 0: Entity in solid
  123. Entity 751, Brush 0: Entity in solid
  124. Entity 782, Brush 0: Entity in solid
  125. Entity 785, Brush 0: Entity in solid
  126. Entity 789, Brush 0: Entity in solid
  127. Entity 790, Brush 0: Entity in solid
  128. Entity 791, Brush 0: Entity in solid
  129. Entity 796, Brush 0: Entity in solid
  130. Entity 797, Brush 0: Entity in solid
  131. Entity 813, Brush 0: Entity in solid
  132. Entity 815, Brush 0: Entity in solid
  133. Entity 816, Brush 0: Entity in solid
  134. Entity 817, Brush 0: Entity in solid
  135. Entity 818, Brush 0: Entity in solid
  136. Entity 819, Brush 0: Entity in solid
  137. Entity 820, Brush 0: Entity in solid
  138. Entity 821, Brush 0: Entity in solid
  139. Entity 822, Brush 0: Entity in solid
  140. Entity 823, Brush 0: Entity in solid
  141. Entity 824, Brush 0: Entity in solid
  142. Entity 826, Brush 0: Entity in solid
  143. Entity 827, Brush 0: Entity in solid
  144. Entity 829, Brush 0: Entity in solid
  145. Entity 833, Brush 0: Entity in solid
  146. Entity 835, Brush 0: Entity in solid
  147. Entity 838, Brush 0: Entity in solid
  148. Entity 839, Brush 0: Entity in solid
  149. Entity 840, Brush 0: Entity in solid
  150. Entity 841, Brush 0: Entity in solid
  151. Entity 842, Brush 0: Entity in solid
  152. Entity 843, Brush 0: Entity in solid
  153. Entity 844, Brush 0: Entity in solid
  154. Entity 845, Brush 0: Entity in solid
  155. Entity 846, Brush 0: Entity in solid
  156. Entity 847, Brush 0: Entity in solid
  157. Entity 848, Brush 0: Entity in solid
  158. Entity 849, Brush 0: Entity in solid
  159. Entity 850, Brush 0: Entity in solid
  160. Entity 851, Brush 0: Entity in solid
  161. Entity 852, Brush 0: Entity in solid
  162. Entity 853, Brush 0: Entity in solid
  163. Entity 854, Brush 0: Entity in solid
  164. Entity 855, Brush 0: Entity in solid
  165. Entity 856, Brush 0: Entity in solid
  166. Entity 857, Brush 0: Entity in solid
  167. Entity 858, Brush 0: Entity in solid
  168. Entity 859, Brush 0: Entity in solid
  169. Entity 860, Brush 0: Entity in solid
  170. Entity 861, Brush 0: Entity in solid
  171. Entity 862, Brush 0: Entity in solid
  172. Entity 863, Brush 0: Entity in solid
  173. Entity 864, Brush 0: Entity in solid
  174. Entity 868, Brush 0: Entity in solid
  175. Entity 869, Brush 0: Entity in solid
  176. Entity 870, Brush 0: Entity in solid
  177. Entity 871, Brush 0: Entity in solid
  178. Entity 872, Brush 0: Entity in solid
  179. Entity 873, Brush 0: Entity in solid
  180. Entity 874, Brush 0: Entity in solid
  181. Entity 875, Brush 0: Entity in solid
  182. Entity 876, Brush 0: Entity in solid
  183. Entity 891, Brush 0: Entity in solid
  184. Entity 892, Brush 0: Entity in solid
  185. Entity 893, Brush 0: Entity in solid
  186. Entity 895, Brush 0: Entity in solid
  187. Entity 896, Brush 0: Entity in solid
  188. Entity 897, Brush 0: Entity in solid
  189. Entity 898, Brush 0: Entity in solid
  190. Entity 899, Brush 0: Entity in solid
  191. Entity 900, Brush 0: Entity in solid
  192. Entity 901, Brush 0: Entity in solid
  193. Entity 902, Brush 0: Entity in solid
  194. Entity 903, Brush 0: Entity in solid
  195. Entity 904, Brush 0: Entity in solid
  196. Entity 915, Brush 0: Entity in solid
  197. Entity 916, Brush 0: Entity in solid
  198. Entity 976, Brush 0: Entity in solid
  199.     1382 leafs filled
  200. writing /tmp/tmp5xm0v5zs_metro.prt
  201. Fog 0 has visible side 1
  202. Fog 1 has visible side 0
  203. Fog 2 has visible side 2
  204. Fog 3 has visible side 3
  205. --- EmitMetaStats ---
  206.    21157 total meta surfaces
  207.    20915 stripped surfaces
  208.      188 fanned surfaces
  209.        0 maxarea'd surfaces
  210.         0 patch meta surfaces
  211.         0 meta verts
  212.         0 meta triangles
  213. --- WriteSurfaceExtraFile ---
  214. Writing /tmp/tmp6h2200m0_metro.srf
  215. Writing build/test/map-metro_test.pk3dir/maps/metro.bsp
  216. Wrote 11.0 MB (11511004 bytes)
  217.        15 seconds elapsed
  218. Building ./maps/metro.map, stage: vis
  219. Build command: q3map2 -game unv -vis -fs_pakpath . -prtfile /tmp/tmp5xm0v5zs_metro.prt -saveprt build/test/map-metro_test.pk3dir/maps/metro.bsp
  220. 2.5.17n-git-43d32b8
  221. threads: 8
  222. Q3Map         - v1.0r (c) 1999 Id Software Inc.
  223. Q3Map (ydnar) - v2.5.17n-git-43d32b8
  224. NetRadiant    - v1.5.0n-git-43d32b8 Feb  4 2016 03:21:58
  225. Your map saw the pretty lights from q3map2's BFG
  226. VFS Init: .
  227.  
  228. --- Vis ---
  229. Use /tmp/tmp5xm0v5zs_metro.prt as portal file
  230. saveprt = true
  231. Loading /data/dev/foreign-maps/map-metro/build/test/map-metro_test.pk3dir/maps/metro.bsp
  232. No portals means no vis, exiting.
  233.        0 seconds elapsed
  234. Building ./maps/metro.map, stage: light
  235. Build command: q3map2 -game unv -light -fs_pakpath . -srffile /tmp/tmp6h2200m0_metro.srf -bspfile build/test/map-metro_test.pk3dir/maps/metro.bsp -lightmapdir build/test/map-metro_test.pk3dir/maps/metro -fast -shade -fill -filter -dirty -patchshadows -samples 2 -samplesize 1 -bouncegrid -fastbounce -bounce 1 -deluxe -lightmapsize 2048 -external ./maps/metro.map
  236. 2.5.17n-git-43d32b8
  237. threads: 8
  238. Q3Map         - v1.0r (c) 1999 Id Software Inc.
  239. Q3Map (ydnar) - v2.5.17n-git-43d32b8
  240. NetRadiant    - v1.5.0n-git-43d32b8 Feb  4 2016 03:21:58
  241. Your map saw the pretty lights from q3map2's BFG
  242. VFS Init: .
  243.  
  244. --- Light ---
  245. --- ProcessGameSpecific ---
  246.  lightning model: quake3
  247.  lightmap size: 128 x 128 pixels
  248.  lightning gamma: 1.000000
  249.  lightmap colorspace: linear
  250.  texture colorspace: linear
  251.  _color colorspace: linear
  252.  lightning compensation: 1.000000
  253.  lightning exposure: 0.000000
  254.  lightgrid scale: 1.000000
  255.  lightgrid ambient scale: 1.000000
  256.  shader lightstyles hack: enabled
  257.  patch shadows: disabled
  258.  deluxemapping: disabled
  259. --- ProcessCommandLine ---
  260. Use /tmp/tmp6h2200m0_metro.srf as surface file
  261. Use build/test/map-metro_test.pk3dir/maps/metro.bsp as bsp file
  262. Lightmap directory set to build/test/map-metro_test.pk3dir/maps/metro
  263. Storing all lightmaps externally
  264. Fast mode enabled for all area lights
  265. Phong shading enabled
  266. Filling lightmap colors from surrounding pixels to improve JPEG compression
  267. Lightmap filtering enabled
  268. Dirtmapping enabled
  269. Patch shadow casting enabled
  270. Adaptive supersampling enabled with 2 sample(s) per lightmap texel
  271. Default lightmap sample size set to 1x1 units
  272. Fast bounce mode enabled
  273. Radiosity enabled with 1 bounce(s)
  274. Generating deluxemaps for average light direction
  275. Default lightmap size set to 2048 x 2048 pixels
  276. Storing all lightmaps externally
  277. Storing all lightmaps externally
  278. entering scripts/shaderlist.txt
  279. entering scripts/metro.shader
  280. Loading /data/dev/foreign-maps/map-metro/./maps/metro.map
  281. Loading /tmp/tmp6h2200m0_metro.srf
  282. Loading /data/dev/foreign-maps/map-metro/./maps/metro.map
  283. entering /data/dev/foreign-maps/map-metro/./maps/metro.map
  284. --- SmoothNormals ---
  285. 0...1...2...3...4...5...6...7...8...9... (40)
  286. --- SetupGrid ---
  287. Grid size = { 64, 64, 128 }
  288.    844480 grid points
  289. WARNING: Styled light found targeting
  290.  **WARNING: Styled light found targeting
  291.  **WARNING: Styled light found targeting
  292.  **      859 point lights
  293.         0 spotlights
  294.       537 diffuse (area) lights
  295.        21 sun/sky lights
  296.      1377 total lights
  297.        40 culled lights
  298. --- TraceGrid ---
  299. 0...1...2...3...4...5...6...7...8...9... (91)
  300. 130 x 224 x 29 = 844480 grid
  301. --- MapRawLightmap ---
  302. 0...1...2...3...4...5...6...7...8...9... (32)
  303. 158784949 luxels
  304.  81160061 luxels mapped
  305.  28923540 luxels occluded
  306. --- DirtyRawLightmap ---
  307. 0...1...2...3...4...5...6...7...8...9... (975)
  308. --- FloodlightRawLightmap ---
  309. 0...1...2...3...4...5...6...7...8...9... (0)
  310.         0 custom lightmaps floodlighted
  311.      1377 total lights
  312.         0 culled lights
  313. --- IlluminateRawLightmap ---
  314. 0...1...2...3...4...5...6...7...8...9... (492)
  315. 158784949 luxels illuminated
  316. --- IlluminateVertexes ---
  317. 0...1...2...3...4...5...6...7...8...9... (31)
  318.    147140 vertexes illuminated
  319. --- StoreSurfaceLightmaps ---
  320. Subsampling...sorting...allocating...
  321. 4
  322. 5
  323. 6
  324. numRawLightmaps: 17492
  325. 7
  326. 8
  327. 9
  328. 10
  329. storing...
  330. projecting...done.
  331. 108761817 luxels used
  332.         0 luxels stored (0.00 percent efficiency)
  333.         0 solid surface lightmaps
  334.         0 identical surface lightmaps, using 0 luxels
  335.         0 vertex forced surfaces
  336.         0 vertex approximated surfaces
  337.        58 BSP lightmaps
  338.        29 total lightmaps
  339.      1126 unique lightmap/shader combinations
  340.        67 custom shaders emitted
  341. Writing build/test/map-metro_test.pk3dir/maps/metro.bsp
  342. Wrote 17.4 MB (18271968 bytes)
  343.  
  344. --- Radiosity (bounce 1 of 1) ---
  345. 0...1...2...3...4...5...6...7...8...9... (1)
  346.    23353 diffuse surfaces
  347.     55790 total lights
  348.      5257 culled lights
  349. --- BounceGrid ---
  350. 0...1...2...3...4...5...6...7...8...9... (1798)
  351. --- IlluminateRawLightmap ---
  352. 0...1...2...3...4...5...6...7...8...9... (5550)
  353. 317525510 luxels illuminated
  354.    147140 vertexes illuminated
  355. --- IlluminateVertexes ---
  356. 0...1...2...3...4...5...6...7...8...9... (11)
  357.    294890 vertexes illuminated
  358. --- StoreSurfaceLightmaps ---
  359. Subsampling...sorting...allocating...
  360. 1
  361. 2
  362. 3
  363. 4
  364. 5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement