Optimalisation Questions

Hi, first I must sorry for my English, I hope you´ll understand :smiley:

  1. What is better one big texture - 1000kb,without repeating or one texture with 1kb, but 1000x repeating on the model.
    2.are scripts better for optimalisation, or connected log. bricks are better
    3.what is better 1000kb 512x512 texture or 1000kb 1024x1024-but very compressed in JPEG(images are looking in same quality)
    3.what is better for optimalisation - one poly mesh with texture with alpha or 500poly mesh with texture without alpha…
  2. Can I use for example 1000x3000 or is better 2048x2048


Power of two textures are better than non-power of two.

You’re better off using a one poly mesh + clip alpha than a 500 poly mesh and no alpha.

Now, about texture compression. The file size you see on your hard drive is not the amount of vram the texture will take! You upload raw image data to the graphics card, not the compressed data. So, at 4 bytes per pixel (1 byte each for R, G, B, and A) and at 1024x1024 pixels you’re looking at 4MB of vram used (my logic could be a little off). If you want to use compressed image data on the GPU then you need to use DDS textures with DXT compression. However, while you can use DDS textures in the BGE, it still will send the raw image data instead of storing it on the gpu compressed.


1- If you can get away with a repeating texture, it will save a lot of memory. Otherwise there’s not much difference.
2- i’ve not delved into BGE logic much myself, but I imagine a script is better than long contrived logic brick setups. But if you can do it simply with logic bricks that will most likely be faster.
3- An alpha channel will add a bit to the memory overhead, otherwise texture fills are quite cheap. I can only really suggest trial and error for this to find a balance between quality and speed.
4- A 2048x2048 texture is better in this case. It is best to stick with powers of 2 with textures (1024,2048,4096 etc), if you give it a texture size 1000x3000 I believe the graphics hardware will fill the extra space to make the texture 1024x4096 so the memory overhead is much larger, especially if that texture has 4 channels.

Thanks to all, but one question:
When I use 1024x1024 jpg textures- one will be at 80% quality(250kb) and one at 10%quality(10kb), the size of that textures in VRAM (in graphic card) will be uncompressed - for example 2MB??? difference will be only insize on HDD, but never in Graphic card??


With regards to Logic Bricks, they are technically faster than Python because they are compiled in C. However, accomplishing advanced features is basically impossible with them, so it’s basically inevitable that you will use Python scripts. I seem to remember people with more experience than me commenting that the speed difference between Python and LB setups wasn’t too bad anyway.

Yup, except I think the size on the vram would be 3MB with RGB, 4MB with RGBA. Bringing it down to 512x512 would bring the size down to 768KB with RGB, and 1MB with RGBA. So, texture size can make a huge difference. :wink:

What is the better?
Leave quads or conver them to triangles. I heard, quads are automatically converted to triangles in GE, can it be hard for performance??Should I conver them??
Sorry for English :smiley: .

convert :D:D

As the conversion is done automatically, there is no reason to do it by yourself.

Depending on the mesh’s topology it might be better to keep the quads. Especially when working with edge loops.
The downside is that you might end up with distorted quads (non-planar).

As far as I know, the BGE doesn’t convert quads to tris. It keeps buckets of both and draws quads and tris. This is why alpha can get really messed up when you mix quads and tris in a mesh with alpha. :wink:

No reason to use DDS? I disappointed. :frowning: