OpenArena Message Boards

OpenArena Contributions => Maps => Topic started by: Czestmyr on July 04, 2007, 01:45:04 PM



Title: hunk alloc failed
Post by: Czestmyr on July 04, 2007, 01:45:04 PM
Hi,

First, I appologize for yet another stupid question thread :D
Now: I am finished with the last one of my work-in-progress maps. It's the Bridge Of Despair ctf, I posted on the forums a while ago. This time, it was compiled with dmn_clown's version of q3map2 and it was also fast-VISed. (Full VISing was too slow and the map also hasn't got much interior area, so it would have a little effect) But I am getting HUNK_ALLOC_FAILED error when running the map. I don't know what that means, but it seems like some internal engine memory allocation mechanism failure. Perhaps it is something to do with the map bsp's size - 14 megs or so. I can imagine, that storing lightgrid for such vast area is memory expensive.
If there is a way to make the grid more sparse or prevent some areas from being lit at all (would putting clip brushes in such areas work?), it would probably make the compiled map much smaller.


Title: Re: hunk alloc failed
Post by: stroggi on July 04, 2007, 02:29:09 PM
well you can change the lightgrid size using the worldspawn gridsize key, also maybe try using detail brushes, vis'sing shouldnt take more than a few minutes.


Title: Re: hunk alloc failed
Post by: kit89 on July 04, 2007, 03:21:55 PM
It means your map requires more memory than allocated.

Type com_hunkmegs in OA by default it is 64. So I would suggest you increase it to 256MB.

However I would recommend you do some editing:  removing some details like models, extra textures etc. To try and reduce your memory usage. :)


Title: Re: hunk alloc failed
Post by: dmn_clown on July 04, 2007, 03:42:27 PM
other suggestions that don't require the removal of detail:

increase the block size of the map (default is 1024)
make all of your interior brushes detail brushes (just remember to check viz data after a compile and add hint brushes accordingly)
be careful with the compile options you feed q3map2 it is easy to make a bsp much larger in file size than it needs to be.


Title: Re: hunk alloc failed
Post by: Czestmyr on July 05, 2007, 03:57:45 AM
Thanks for your suggestions. I'll try removing some details and making the lightgrid sparser. But I DO use detail brushes and I DO use hint brushes, so there's not too much room for improvement there. About compile options for q3map2: I use "-vis/-fastvis -saveprt -game oa".


Title: Re: hunk alloc failed
Post by: kit89 on July 05, 2007, 04:26:00 AM
Would it be possible to see the source file just to have a look at it?


Title: Re: hunk alloc failed
Post by: Czestmyr on July 05, 2007, 04:32:26 AM
Oh, sure. In the afternoon (that's in a few hours). I'm going on a hiking trip now. I have been sitting too much at the computer recently.


Title: Re: hunk alloc failed
Post by: Czestmyr on July 05, 2007, 12:00:33 PM
I have made the lightgrid sparser, the lightmaps less detailed and increased the block size of the map. It helped a lot (which I expected), the map is 5 megs big, so now I think it is ready to be commited. I am just posting the source, as promised. And dmn_clown can expect another e-mail with a .pk3 ;)