What is the average number of KB in memory for a 3D character? Granted, this will obviously be biased based on what game we're talking about. However, I am less interested in actual size in KB, and more interested in the range. Simply, a general idea.

I want to know this information, to compare it to my 2D game. Currently, my 2D game has an almost exact scale for how much RAM a character takes up in memory.

The current formula is this: 95KB * Number of Animations * Number of Frames * Number of Directions. So for example, if a character had an Idle Animation with 15 frames, and a Walk animation of 15 frames, and there were 4 directions the character could move, the character would take 11.4MB in memory.

3D Characters have to load their mesh, textures, and animations. 2D characters simply load a image. However, with hundreds of animations- I can only imagine the 2D character would eventually exceed the memory requirements of a 3D character.

I need to get a general idea of how many characters I should limit on screen, how I should load my characters and their animations in memory, etc. I get some performance hits when swapping out textures in memory, probably because they are large spritesheets. I do not know if not using spritesheets would fix this or not. I was always told "Sprite Sheets are good for performance."

What about 3D games? Any example would work, and it doesn't have to be a real range. I just want to know what I may be looking at. An example of a lower quality 3D game and an example of a higher quality 3D game would be perfect.

  • \$\begingroup\$ I guess this really depends to the budget for your particular style of game? If you make a game that is all about watching the main character and nothing else it can be super high definition with a million triangles.. If you are making a MMO where lots of characters will be on screen at the same time, you probably want to cap each the poly count to 2k or something on each.. \$\endgroup\$ – Grimshaw Sep 13 '13 at 9:41
  • 3
    \$\begingroup\$ I found this answer, but I will not post it as an answer because I am afraid of the user's knowledge and accuracy on the subject. "Memory consumption of a texture is roughly width * height * 2 * 4 with mipmapping enabled. Memory consumption of a mesh is roughly vertices * (6+6+4) + triangles * 6" Is this a legit answer? \$\endgroup\$ – Carter81 Sep 13 '13 at 9:57
  • 1
    \$\begingroup\$ Is there any reason you want to calculate memory consumption in advance? I'd imagine the best way to find out is to build the game and monitor performance. \$\endgroup\$ – Marcks Thomas Sep 13 '13 at 11:19
  • 1
    \$\begingroup\$ actually if you keep poses (frames of animation) in terms of rotations of the joints (with a mesh for each limb), then the formula will be different (static mesh + number of jointsnumber of animationsnumber of frames) \$\endgroup\$ – ratchet freak Sep 13 '13 at 11:27
  • 1
    \$\begingroup\$ This really depends on the implementation, the answer to this question is too broad in my opinion as there is no definitive answer.. How much RAM will the model and its texture consume? Depends. If you store geometry in a GPU buffer, then nothing will be in the RAM, but rather in the VRAM. Depends on what you store locally vs the GPU, what data types you use, what kind of animation data you have, the resolution and format of your textures.. There's a lot in the table I guess :D \$\endgroup\$ – Grimshaw Sep 13 '13 at 11:31

General idea is very simple - "how much it needs to be" and depends on your artistic needs. You can make a model in Minecraft style (just a few Kb) or go a full scale NVidia-quality character (hundreds of Mb).

Calculate your budget first, how much memory you can spend on a model, what kind of quality do you need. Then you can do the estimates if you can fit an acceptable quality model in. Perceived model quality also greatly affected by artistic skills of the maker and rendering (dynamic lighting, complex SSS and SSAO shaders, etc.).

Try to compare with similar games.

P.S. From personal experience with racing games models. Good car model can take from 400kb to 26mb with the quality totally unrelated to the models size.

  • \$\begingroup\$ Thank you for being the only person to actually provide an example. This is all I wanted. 400kb to 26MB is perfect. That is all I needed. All I was asking for. \$\endgroup\$ – Carter81 Sep 13 '13 at 12:05
  • 1
    \$\begingroup\$ This is only an example from a racing game. In your game it might be a lot different and depend on other factors. \$\endgroup\$ – Kromster Sep 13 '13 at 12:10
  • \$\begingroup\$ My game is 2D though, with predictable (almost exact) memory consumption per character. I just wanted to know if mine were significantly larger or significantly smaller than 3D games. It would make me feel more like I won't have to struggle with performance is my 2D sprite atlases were as large in memory as typical 3D characters. \$\endgroup\$ – Carter81 Sep 13 '13 at 12:24

First, we eyeball the memory requirements for a 3d model.

  • Each polygon has three vertices.
  • Each vertex consists of three coordinates.
  • Each coordinate is a floating point value of 4 bytes (or a double of 8 bytes)

So the amount of memory used for a 3d model is polygons * 3 * 3 * 4 or polygons * 36 byte. When your graphic engine uses double-precision floating point values, the size gets doubled.

So how many polygons does a character need? That depends on your level of detail. The characters from Minecraft have just about 100 polygons. But in a game which aims for a highly realistic graphic style, the polygon count for a single character can be tens of thousands of polygons.

This is just the 3d mesh. What we also need is the texture which is a simple 2d graphic. Maybe you want to use multi-texturing with normal maps, specular maps etc. Each of them is another 2d graphic. The memory consumption of each of them is width * height * color-depth. How large the texture needs to be depends on your desired level of detail. When the object is displayed up close you need a much higher texture resolution than when it is always small and far away, so it is hard to say which texture resolution is appropriate for your specific game.

Then we need the texture coordinates for each polygon (which part of the texture is mapped to each polygon). These are again 3 floating-point or integer values per polygon, so another 12 byte per polygon, getting us to 48 bytes per polygon.

Now we have a 3d model with a texture standing in our game. What's needed now? Yes, animation! Compared to 2d sprites, animations for 3d models are rather cheap. You don't need a whole new 3d model for each animation frame. You usually just specify how whole parts of the 3d model move for each animation. You usually just define the end-points of keyframes and when your 3d engine excutes the motion, it interpolates the positions in-between. That means that the additional memory requirement for a whole animation sequence are usually just a few hundred to a few thousand bytes.

By the way: Usually, 3d models are not stored in RAM of the system but in the VRAM of the graphic card.

  • 2
    \$\begingroup\$ Remark: usually, vertices are shared by 6 polygons on average. You have a vertex buffer, an index buffer, an whatever kind of attribute buffers. Maybe you ought to count memory that way. \$\endgroup\$ – teodron Sep 13 '13 at 13:20
  • \$\begingroup\$ So if I used this character as an example: turbosquid.com/3d-models/crusader-modelled-sword-c4d/422369, assuming he has two textures, both at 2048x2048, along with his 34k polygons, it would be something like... 69MB for the character fully loaded in memory? That is a lot for a single character. \$\endgroup\$ – Carter81 Sep 15 '13 at 13:29
  • \$\begingroup\$ Meaning that 97% of the required RAM is for the textures. So if using DDS/DXT, it would result in something like 19MB for the 30k poly character. Polygons are really, really cheap on memory. \$\endgroup\$ – Carter81 Sep 15 '13 at 13:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.