Tremulous Forum

Media => Mapping Center => Topic started by: MrFish on June 03, 2009, 03:24:08 am

Title: Z_Malloc: failed on allocation of 31481880 bytes from the main... [Kinda Solved]
Post by: MrFish on June 03, 2009, 03:24:08 am
Ok, so I didn't know it was possible to have too much stuff for the game to run. So after 3 hours of making this map I'm really disappointed because I haven't even started and it's already too big. What are some tips to decrease the memory needed? I don't understand how maps like the transit station has all that stuff but it runs fine. Here are some screenshots of my map so far. The bases weren't in the correct places but I was going to test out what I've done so far (it's a castle btw).

http://img268.imageshack.us/img268/3177/toomuchmemory.png

I'm guessing the stairs is what gave it a heart attack.
Title: Re: Z_Malloc: failed on allocation of 31481880 bytes from the main zone
Post by: Demolution on June 03, 2009, 06:56:03 am
You don't have that many things in there yet. Make sure to detail brushes for most of your brushes (take a look at this, specifically Ingar's response (http://tremulous.net/forum/index.php?topic=9719.0)), and remember to use hint brushes.
Title: Re: Z_Malloc: failed on allocation of 31481880 bytes from the main zone
Post by: MrFish on June 03, 2009, 04:23:09 pm
Ah I get it now with the hint brushes and stuff. So I tried it out but it didn't work. Could you tell me if I put these in the wrong place?

(http://img517.imageshack.us/img517/1686/visproblems.png)

This castle right now is just floating inside a huge box. It's got a basement so I put the hint brushes near the basement and anywhere you can look inside the basement, I also put it at the top of the castle so that it's not rendering all of the large box. I thought this would work.
Title: Re: Z_Malloc: failed on allocation of 31481880 bytes from the main... [Kinda Sol
Post by: MrFish on June 03, 2009, 06:30:24 pm
Ok so I figured out it's my textures that's screwing it up. I switched out the textures with another one from the church map and it ran fine. Why does my textures screw it up?
Title: Re: Z_Malloc: failed on allocation of 31481880 bytes from the main... [Kinda Solved]
Post by: Evoc on June 03, 2009, 07:44:39 pm
How large are the textures (in terms of file size), and what resolution are they?
Title: Re: Z_Malloc: failed on allocation of 31481880 bytes from the main zone
Post by: UniqPhoeniX on June 03, 2009, 09:16:51 pm
Ah I get it now with the hint brushes and stuff. So I tried it out but it didn't work. Could you tell me if I put these in the wrong place?
Yes, you didn't use hint brushes right. Understanding Vis and Hint Brushes (http://tremmapping.pbworks.com/Understanding+Vis+and+Hint+Brushes) in case you want to understand it. And still, make everything you can into detail.
Title: Re: Z_Malloc: failed on allocation of 31481880 bytes from the main zone
Post by: Demolution on June 03, 2009, 10:55:29 pm
Ah I get it now with the hint brushes and stuff. So I tried it out but it didn't work. Could you tell me if I put these in the wrong place?
Yes, you didn't use hint brushes right. Understanding Vis and Hint Brushes (http://tremmapping.pbworks.com/Understanding+Vis+and+Hint+Brushes) in case you want to understand it. And still, make everything you can into detail.

Forgot to post this link as well. :P
Title: Re: Z_Malloc: failed on allocation of 31481880 bytes from the main... [Kinda Sol
Post by: MrFish on June 03, 2009, 11:40:56 pm
Hey! It's evoc :D

Anyway, I think it was because the texture resolutions were too large. I tried a smaller door texture from the same location and it worked so I need to shrink down my textures. And I did read through that hint/vis tutorial thing before using the hint you see in the screen shots in my above post. Not sure what's wrong about it, I'll look over it again.

~Groog
Title: Re: Z_Malloc: failed on allocation of 31481880 bytes from the main... [Kinda Solved]
Post by: Bissig on June 04, 2009, 12:21:44 am
Textures should not exceed 800x600 pixel as far as I know. I think there is only one map that uses 1024x768 or bigger textures.
Title: Re: Z_Malloc: failed on allocation of 31481880 bytes from the main... [Kinda Solved]
Post by: Demolution on June 04, 2009, 03:54:33 am
Textures should not exceed 800x600 pixel as far as I know. I think there is only one map that uses 1024x768 or bigger textures.

Which map might that be?
Title: Re: Z_Malloc: failed on allocation of 31481880 bytes from the main... [Kinda Solved]
Post by: Amanieu on June 04, 2009, 06:08:58 am
Textures should always have side lengths as powers of 2: 128, 256, 512, 1024, 2048, 4096, etc.
Most graphic cards support texture sizes up to 2048, some more.
Title: Re: Z_Malloc: failed on allocation of 31481880 bytes from the main... [Kinda Solved]
Post by: gimhael on June 04, 2009, 07:17:31 am
Also remember that the textures have to be stored uncompressed in graphics memory, so even if your 2048x2048 texture is only a 20k jpeg, it will eat 16MB + ~5MB for mimaps of the texture memory.
Title: Re: Z_Malloc: failed on allocation of 31481880 bytes from the main... [Kinda Solved]
Post by: Ouisri on August 02, 2010, 04:08:05 pm
Wow, I didn't know this before about the resolution of texture 2048x2048 eat about 16MB+~5MB, you bring up a very good point. Thanks very much.
Title: Re: Z_Malloc: failed on allocation of 31481880 bytes from the main... [Kinda Solved]
Post by: UniqPhoeniX on August 02, 2010, 07:54:11 pm
I'm sure I've reported this necroer-spambot before, why is it still here?
Title: Re: Z_Malloc: failed on allocation of 31481880 bytes from the main... [Kinda Solved]
Post by: Aelita on August 02, 2010, 07:59:43 pm
This is the trem.net forums, do you think the mods actually do anything here?