Memory usage?

my blender game atm takes about 800mb memory :S why does it take so damn much? its just 1 room with 12 faces and 30 vertices. is it because of my textures?! :S

The game looks like this atm. The wall, roof, and floor got 3 textures each. Spec, Normal and Defuse map. they got 4000x4000 resolution each. except the wall that got 4000x1500

As you can see the memory usage atm is about 450 mb. Its a real problem when the game will get bigger.

Sorry for the posting. Didnt knew you could edit

can i fix it somehow? i dont really want to lower the grapics on the textures thats on the wall and stuff. somehow it should go?

someone gotta know. if i cant fix it i dont think i will still working on the game

You can edit your post rather than replying to yourself every few minutes.
How do you expect anyone is able to give you a sensible answer when no-one can actually see what your game looks like, what physics you’re using or able to view the blend file itself. Post the file somewhere. Remember that the textures are also needed if you think they could be a problem.
If you want help, then you have to pull your weight in helping out as well.

4000x4000 seems rather large, especially if it is uncompressed. Still most of the memory usage is probably just the engine, more than likely the memory usage will not continue to grow as much as it has already.

hmm, yeah i know its big. but i really like the detail it gives me. dont think its the engine. got no scripts or anything. just the material at this moment. Is there a way to compresse the image and still have the detail of it?

Those textures are way to big. Each pixel has an rgba value, which means you need 4 bytes to represent each pixel. At 4000x4000 that’s 16,000,000 pixels. At 4 bytes a piece, that’s 64,000,000 bytes, or close to 64MB. And that’s one texture. Just taking into account the floor and the roof, you have 6 4000X4000 textures. 64MB * 6 = 384MB. My graphics card only has 256MB of vram, so I’d be hosed trying to play your game. :stuck_out_tongue:

So, just a thought, I think 1024x1024 can typically be seen as “high quality” when it comes to Blender games, and they are only 4MB a piece. :wink:

the textures are way too big. why don’t you just make them 256x256 seamless textures and make them repeat?

i will test it out with a lower resolution and check how it will become, thx for the reply :slight_smile:

if you use a seamless texture and make it repeat it should turn out exactly the same. good luck

i hate patterns. looks uggly as hell. thats why i make different for every wall and stuff :stuck_out_tongue:

Okey. changed all pics to a much lower resolution. this is the result. 35mb memory from 450mb. The details aint that good at very close but what the hell… its a game. MANY games looks like crap if you really look into it. but its the whole game that make it good :stuck_out_tongue:

I have a question about faces and polys and stuff. does it slow down the computer or use allot memory if there are much of them in the level? or is it only what i see in the “viewport” thats calculates (dunno how it spells)

Be an artist and make it nice ;).

Now you got the point of a game. It is always a balance between “looking good” and speed. For a game speed rules. Similar to movies: fake, fake, fake as much as you can.

Everything of a scene is hold in memory, even if you suspend it.

The speed of rendering depends on how many faces are seen by the camera (inside the camera frustum).
There is some optimization.
e.g. frustum culling: Objects that are completely outside of the frustum culling are not parsed for rendering (that means not every single face is checked if it should be rendered)

Faces have no backside. This reduces the number of rendered faces by at least 50%. But you need to close your objects.

The speed of geometry transformation depends on the number of vertices. Remember each single vertex has a position in space. This must be recalculated at each single frame.

Also the number of vertex groups of an mesh has influence on the speed.

The speed of the logic depends on the number of objects, number and type of logic bricks, number of triggered controllers/actuators.

The speed of the pyhsics depends on the number of faces and number of objects with and without physics enabled. There is no frustum culling, so physics works even if you do not see it.

As you see there is a lot that influences speed.

Golden rule:
as more you have at one time as more it eats speed and memory at this time.

Thank all for the replies :slight_smile: going back to work on the game now when i know what to do :slight_smile:

If u want to have some details, then use 2 textures-second will be repeated more times than first one and will be presented as overlay, so when you close up to your wall, the second texture will appear as very detailed texture:this is used in lots of games like TimeShift, STALKER, etc.
And you can add one more texture with less repeats, this makes your wall like “no repeating” :smiley:

Yokozuna now i dont really understand how you meen. can you give a example blend file?

He means make multiple textures for each material and use the blending modes to lay the second texture on top of the first, scaling the second texture down a bit to make it look more detailed.

The way GLSL textures work in Blender (the blending modes, the feature that allow you to make the texture greyscale so you can give it any color you want, and the fact you can have 18 texture layers per-material), allows you to mix and match the textures almost any way you desire to give the appearance of variation with fewer textures.

is that like the bathroom demo? Someone who can show me how to do this or give me direction to a tutorial about it?

Watch this video, and pay close attention!
I think that’s what they wanted to say(in part of texturing it is clear)! :smiley:

Excuse my English