safe_malloc failed... and light compiling


(Zombie) #1

Hi!,

i have a weird Problem with the new version of q3map2.
This is a big outdoor-map with terrain made of brushes.

Now, i wanted to add some trees as md3 Models to the map (onle 5 or 6 for a test), an now i receive this error during light compiling(BSP and VIS are without errors):

************ ERROR ************
safe_malloc failed on allocation of 110376448 bytes
Disconnecting

I have many Gbytes of free Disk-Space and 512 MB RAM.
With an older Version of q3ma2 ( 2.3.38 ), the map compiles properly.

has anybody an idea, what is the couse of the problem?

All the terrain-groups are detail-brushes with standard textures. At the moment, there is only one SUN (in the skyboxshader) and ambient-light.

textures/skies/yavin2
{
qer_editorimage textures/skies/sky.tga
q3map_surfacelight 10
sun 1 0.9 0.8 300 315 40
surfaceparm sky
surfaceparm noimpact
surfaceparm nomarks
q3map_nolightmap
skyParms textures/skies/yavin 512 -
}

================================

the model-shader of the trees looks like this:

models/map_objects/yavin/tree08b_b
{
qer_editorimage models/map_objects/yavin/tree08b
q3map_nolightmap
q3map_onlyvertexlighting
cull disable
{
map models/map_objects/yavin/tree08b
alphaFunc GE128
rgbGen lightingDiffuse
}
}


(Valhue2) #2

Post your compile log please.

V^2


(Zombie) #3

ok, here it is:

P.S. I have now solved this Problem with the new Beta v2.5.5 and the “-lomem” switch

BIG THX @YDNAR for Helping :smiley:

==============================

Q3Map - v1.0r © 1999 Id Software Inc.
Q3Map (ydnar) - v2.5.4
GtkRadiant - v1.3.5-dev Apr 1 2003 11:13:34
It’s a long road and we’ve got a dirty windshield
— InitPaths —
VFS Init: E:/Spiele/LucasArts/Star Wars JK II Jedi Outcast/GameData/base/
VFS Init: E:/Spiele/LucasArts/Star Wars JK II Jedi Outcast/GameData/baseq3/

— BSP —
Creating meta surfaces from brush faces
0 shaderInfo
— LoadMapFile —
Loading E:\Spiele\LucasArts\Star Wars JK II Jedi Outcast\GameData\base\maps\jango_terr.map
entering E:\Spiele\LucasArts\Star Wars JK II Jedi Outcast\GameData\base\maps\jango_terr.map
WARNING: Couldn’t find image for shader textures/skies/yavin2
WARNING: Couldn’t find image for shader textures/yavin/grass_jf1
29233 total world brushes
29207 detail brushes
0 patches
76285 boxbevels
36950 edgebevels
16 entities
94694 planes
0 areaportals
Size: -2080, -6176, -96 to 26656, 10272, 2211
— CreateMapFogs —
0 fogs
############### model 0 ###############
block size = { 4096 4096 4096 }
— PatchMapDrawSurfs —
— FaceBSP —
156 faces
536 leafs
— MakeTreePortals —
0 tiny portals
0 bad portals
— FilterStructuralBrushesIntoTree —
26 structural brushes
184 cluster references
— FloodEntities —
82 flooded leafs
— FillOutside —
184 solid leafs
270 leafs filled
82 inside leafs
— CullSides —
116540 hidden faces culled
1 coincident faces culled
— ClipSidesIntoTree —
— FaceBSP —
31 faces
244 leafs
— MakeTreePortals —
0 tiny portals
0 bad portals
— FilterStructuralBrushesIntoTree —
26 structural brushes
193 cluster references
— NumberClusters —
90 visclusters
177 visportals
215 solidfaces
— WritePortalFile —
writing E:\Spiele\LucasArts\Star Wars JK II Jedi Outcast\GameData\base\maps\jango_terr.prt
— FloodAreas —
2 areas
— AddTriangleModels —
— FilterDetailBrushesIntoTree —
29207 detail brushes
47122 cluster references
----- FogDrawsurfs -----
0 fog polygon fragments
0 fog patch fragments
0 fogged drawsurfs
— SubdivideFaceSurfaces —
— FixTJunctions —
738 axial edge lines
26310 non-axial edge lines
0 degenerate edges
1144 verts added for T-junctions
90183 total verts
29351 naturally ordered
196 rotated orders
4 can’t order
0 broken (degenerate) surfaces removed
— ClassifyEntitySurfaces —
— TidyEntitySurfaces —
0 empty or malformed surfaces deleted
— MakeEntityMetaTriangles —
0…1…2…3…4…5…6…7…8…9… (2)
29551 total meta surfaces
29451 stripped surfaces
100 fanned surfaces
0 patch meta surfaces
90283 meta verts
31281 meta triangles
— TidyEntitySurfaces —
29551 empty or malformed surfaces deleted
— SmoothMetaTriangles —
No smoothing angles specified, aborting
— MergeMetaTriangles —
0…1…2…3…4…5…6…7…8…9…10… (21)
17616 surfaces merged
116633 vertexes merged
— FilterDrawsurfsIntoTree —
25950 references
17696 (17696) emitted drawsurfs
29451 stripped face surfaces
100 fanned face surfaces
0 surface models generated
0 SURFACE_BAD surfaces
0 SURFACE_FACE surfaces
0 SURFACE_PATCH surfaces
80 SURFACE_TRIANGLES surfaces
0 SURFACE_FLARE surfaces
0 SURFACE_FORCED_META surfaces
17616 SURFACE_META surfaces
0 SURFACE_FOGHULL surfaces
59559 redundant indexes supressed, saving 232 Kbytes
— FixBrushSides —
— EndModel —
0 light entities stripped
94694 BSP planes
— WriteSurfaceExtraFile —
Writing E:\Spiele\LucasArts\Star Wars JK II Jedi Outcast\GameData\base\maps\jango_terr.srf
Writing E:\Spiele\LucasArts\Star Wars JK II Jedi Outcast\GameData\base\maps\jango_terr.bsp
273 seconds elapsed
Disconnecting
1 threads
Q3Map - v1.0r © 1999 Id Software Inc.
Q3Map (ydnar) - v2.5.4
GtkRadiant - v1.3.5-dev Apr 1 2003 11:13:34
It’s a long road and we’ve got a dirty windshield
— InitPaths —
VFS Init: E:/Spiele/LucasArts/Star Wars JK II Jedi Outcast/GameData/base/
VFS Init: E:/Spiele/LucasArts/Star Wars JK II Jedi Outcast/GameData/baseq3/

— Vis —
Loading E:\Spiele\LucasArts\Star Wars JK II Jedi Outcast\GameData\base\maps\jango_terr.bsp
Loading E:\Spiele\LucasArts\Star Wars JK II Jedi Outcast\GameData\base\maps\jango_terr.prt
90 portalclusters
177 numportals
215 numfaces
354 active portals
0 hint portals
visdatasize:1448

— BasePortalVis (354) —
0…1…2…3…4…5…6…7…8…9… (0)
3 average number of passages per leaf
0 MB required passage memory

— CreatePassages (354) —
0…1…2…3…4…5…6…7…8…9… (0)

— PassagePortalFlow (354) —
0…1…2…3…4…5…6…7…8…9… (0)
creating leaf vis…
cluster 0 : 21 visible
cluster 1 : 21 visible
cluster 2 : 19 visible
cluster 3 : 19 visible
cluster 4 : 13 visible
cluster 5 : 13 visible
cluster 6 : 13 visible
cluster 7 : 13 visible
cluster 8 : 13 visible
cluster 9 : 13 visible
cluster 10 : 25 visible
cluster 11 : 25 visible
cluster 12 : 21 visible
cluster 13 : 21 visible
cluster 14 : 13 visible
cluster 15 : 13 visible
cluster 16 : 13 visible
cluster 17 : 13 visible
cluster 18 : 13 visible
cluster 19 : 13 visible
cluster 20 : 34 visible
cluster 21 : 34 visible
cluster 22 : 34 visible
cluster 23 : 35 visible
cluster 24 : 34 visible
cluster 25 : 35 visible
cluster 26 : 33 visible
cluster 27 : 33 visible
cluster 28 : 35 visible
cluster 29 : 35 visible
cluster 30 : 37 visible
cluster 31 : 37 visible
cluster 32 : 33 visible
cluster 33 : 33 visible
cluster 34 : 33 visible
cluster 35 : 33 visible
cluster 36 : 33 visible
cluster 37 : 33 visible
cluster 38 : 37 visible
cluster 39 : 38 visible
cluster 40 : 37 visible
cluster 41 : 38 visible
cluster 42 : 42 visible
cluster 43 : 42 visible
cluster 44 : 37 visible
cluster 45 : 37 visible
cluster 46 : 35 visible
cluster 47 : 35 visible
cluster 48 : 33 visible
cluster 49 : 33 visible
cluster 50 : 37 visible
cluster 51 : 38 visible
cluster 52 : 37 visible
cluster 53 : 38 visible
cluster 54 : 42 visible
cluster 55 : 42 visible
cluster 56 : 42 visible
cluster 57 : 42 visible
cluster 58 : 37 visible
cluster 59 : 38 visible
cluster 60 : 37 visible
cluster 61 : 38 visible
cluster 62 : 33 visible
cluster 63 : 33 visible
cluster 64 : 35 visible
cluster 65 : 35 visible
cluster 66 : 37 visible
cluster 67 : 37 visible
cluster 68 : 39 visible
cluster 69 : 39 visible
cluster 70 : 35 visible
cluster 71 : 33 visible
cluster 72 : 35 visible
cluster 73 : 33 visible
cluster 74 : 25 visible
cluster 75 : 25 visible
cluster 76 : 23 visible
cluster 77 : 23 visible
cluster 78 : 23 visible
cluster 79 : 23 visible
cluster 80 : 35 visible
cluster 81 : 35 visible
cluster 82 : 33 visible
cluster 83 : 33 visible
cluster 84 : 29 visible
cluster 85 : 29 visible
cluster 86 : 25 visible
cluster 87 : 25 visible
cluster 88 : 23 visible
cluster 89 : 23 visible
Total visible clusters: 2710
Average clusters visible: 30
Writing E:\Spiele\LucasArts\Star Wars JK II Jedi Outcast\GameData\base\maps\jango_terr.bsp
2 seconds elapsed
Disconnecting
1 threads
Q3Map - v1.0r © 1999 Id Software Inc.
Q3Map (ydnar) - v2.5.4
GtkRadiant - v1.3.5-dev Apr 1 2003 11:13:34
It’s a long road and we’ve got a dirty windshield
— InitPaths —
VFS Init: E:/Spiele/LucasArts/Star Wars JK II Jedi Outcast/GameData/base/
VFS Init: E:/Spiele/LucasArts/Star Wars JK II Jedi Outcast/GameData/baseq3/

— Light —
Fast mode enabled
Map has shader script E:\Spiele\LucasArts\Star Wars JK II Jedi Outcast\GameData\base\maps/…/scripts/q3map2_jango_terr.shader
0 shaderInfo
Loading E:\Spiele\LucasArts\Star Wars JK II Jedi Outcast\GameData\base\maps\jango_terr.bsp
Loading E:\Spiele\LucasArts\Star Wars JK II Jedi Outcast\GameData\base\maps\jango_terr.srf
WARNING: Couldn’t find image for shader textures/yavin/grass_jf1
WARNING: Couldn’t find image for shader textures/skies/yavin2
— LoadMapFile —
Loading E:\Spiele\LucasArts\Star Wars JK II Jedi Outcast\GameData\base\maps\jango_terr.map
entering E:\Spiele\LucasArts\Star Wars JK II Jedi Outcast\GameData\base\maps\jango_terr.map
0 light entities
— SetupBrushes —
29233 opaque brushes
— SetupSurfaceLightmaps —
17696 surfaces
17222 raw lightmaps
80 surfaces vertex lit
17616 surfaces lightmapped
17616 planar surfaces lightmapped
0 non-planar surfaces lightmapped
0 patches lightmapped
0 planar patches lightmapped
— SetupTraceNodes —
************ ERROR ************
safe_malloc failed on allocation of 108134400 bytes
Disconnecting


(ydnar) #4

As I said in your email, you should use terrain, and not simple textured brushes for your terrain surface.

Either that or use q3map_nonplanar/q3map_shadeangle 120 style shaders for the terrain, so Q3Map2 can make a nonplanar mesh out of the terrain triangles as to not create the fabulous waste of resources that your map is currently doing… :slight_smile:

y


(Tigris) #5

Hmm, I have the same problem- but with a small map, however it occures in the light-process.
I do use some exotic options (-fast -shade -patchshadows -bounce -bouncescale 0.1 -samples 3 -super 4)…
Too I’m running out of virtual memory in windows. I have some other apps running, but only things like chat-clients, nothing that would eat away serious memory (with 512MB RAM and a virtual memory file of 3 GB).

Anyone having the same problem?


(Zombie) #6

try the new Beta v2.5.5 and the “-lomem” switch .
It is working with my new terrain-map :smiley:

du you have a Patch-Terrains in your map, or something like this ?
maybe with Vertex-light shaders ?.
It causes the same problem with my other map.
Try to compile without “-patchshadows”-Switch.


(ydnar) #7

Well, the -super 4 bit is causing it to use 16x the memory of a normal compile.

You don’t need to use -super if you’re using -samples 3, either. The -samples switch uses an adaptive supersampling algorithm to give you -super quality resuilts in 1/3 the time.

y


(Tigris) #8

Ok, will try- wondered already because it’s nothing more that a small room in which I test those shine-through windows (were the light is filtered by the window).