0

First to be clear all the 'size' mentioned in this problem is power of 2.

I need an algorithm to support create/remove arbitrary size of sub-texture in a large 3D texture atlas, then texture atlas size could be (X, Y, Z) with three different dimension size, and sub-texture also could have three different dimension size, and the dimension of each sub-texture also could be different. The algorithm should be fast enough, best at linear speed, and have less fragmentation as possible.

If all the parameters for this problem is too general. A simple version may work as well. The simple version should be that the 3D texture atlas has same three dimension as X, and each sub-texture has same three dimension as Y, but Y could be a different value for each sub-texture. For example, a texture atlas with size of 128x128x128, create/remove sub-texture with size of 2x2x2 or 4x4x4 or 8x8x8 etc.

Orup
  • 559
  • 1
  • 5
  • 14
  • This question lacks enough detail for an answer. What are the desired properties of this allocation algorithm? – Sklivvz Jan 14 '16 at 11:48
  • added some details, hopefully it is clear enough. – Orup Jan 14 '16 at 12:16
  • Some more please: are you allocating a space at a time or many spaces together? E.g. is it more like "memory" or like "display known data"? When you say "best fit" it can mean many things, at least to me. – Sklivvz Jan 14 '16 at 13:59
  • 1
    I totally rewrite the problem to make it more specific. – Orup Jan 14 '16 at 14:45

0 Answers0