Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Ian Ross has just released a book on Anim8or. It's perect for a beginner and a good reference for experienced users. It contains detailed chapters on every aspect, with many examples. Get your own copy here: "Anim8or Tutorial Book"

Pages: [1] 2

Author Topic: High Memory Use and Slow Playback Problem  (Read 46142 times)

slex

  • Jr. Member
  • **
  • Posts: 96
  • 3D-TV
    • View Profile
High Memory Use and Slow Playback Problem
« on: March 10, 2016, 03:53:27 pm »

unfortunately, I had few crashes in scene editor when there are many steps with loaded object consisted of a mix of subdivision+mesh+textures and it's figure and sequence with multiple instances included in a scene, my laptop has 4gigs of ram so I guess it isn't computer. I've noticed in task manager that program becomes slow when there are too many undo steps, it starts with 25MB, after loading the project it goes to 50MB and with each new movement it adds few megabytes of ram in the task manager.
Maybe increasing undo buffer to 500MB or even more could solve the problem or limiting the undo-redo to maximum of let's say 15 steps so it 'forgets' older steps?
Logged

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 2125
    • View Profile
Re: High Memory Use and Slow Playback Problem
« Reply #1 on: March 10, 2016, 05:52:12 pm »

slex: My guess is that like Anim8or isn't freeing the undo history memory once it surpasses the limit.  It's supposed to delete the earliest data when this happens but it doesn't seem to be doing that. I'll see if I can find the cause.
Logged

slex

  • Jr. Member
  • **
  • Posts: 96
  • 3D-TV
    • View Profile
Re: High Memory Use and Slow Playback Problem
« Reply #2 on: March 10, 2016, 06:07:31 pm »

Actually, here is a prtscr. memory goes way beyond 100MB, I did very big number of steps in a scene  :o
Logged

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 2125
    • View Profile
Re: High Memory Use and Slow Playback Problem
« Reply #3 on: March 10, 2016, 09:17:28 pm »

The undo code seems to be working properly.  It can use a bit more that the limit, but just one undo record more at the most.  When it frees history it deletes the earliest records until it is just *above* the limit instead of just *below* it.

I don't see why your project should be that big.  Are you using a lot of textures, especially large ones?  How many scenes, etc are there?  Have you been runnning Anim8or for a long time and the size keeps getting bigger?  That *could* mean a memory leak.  I always develop using a debug mode that checks for leaks and I don't know of any, but that doesn't mean there aren't any.

Note that the number used for the max size of the undo buffer is just for that, the undo buffer.  There are many other things that can use much more memory than this.  All geometry is stores at least twice (for the model and for the OpenGL buffers), textures are stored as full size images (i.e. a 4k by 4k RGB .jpg file might use only a bit 1 or 2 MB on disk but in memory it uses almost 100 MB, including mipmaps), and subdivision meshes, while they are very compact on disk, can grow quite large when expanded into memory.

However keys for animation do not use very much memory.  I doubt that the length of the animation makes much difference.
Logged

cooldude234

  • Sr. Member
  • ****
  • Posts: 902
  • You know what I realized, I dont have an avatar :\
    • View Profile
Re: High Memory Use and Slow Playback Problem
« Reply #4 on: March 11, 2016, 05:43:39 am »

textures are stored as full size images (i.e. a 4k by 4k RGB .jpg file might use only a bit 1 or 2 MB on disk but in memory it uses almost 100 MB, including mipmaps), and subdivision meshes, while they are very compact on disk, can grow quite large when expanded into memory.

And he is not kidding either,
I made a drawing application that handled large images (I made it just for quick tests) and needed fully uncompressed images in memory so a image would take the full space it required. A 10000 x 10000 32 bit (rgba) sized image took up around 400 Mb in ram.

8 bits per channel = 32 bits
32 / 8 = 4 bytes = one pixel
4 bytes * 10,000 * 10,000 = 400,000,000 bytes
400,000,000 / 1000 = 400,000 Kilobytes
400,000 / 1000 = 400 Megabytes

Also I was using (one of) the oldest opengl function for taking image data from Ram and uploading it to the Vram (glTexSubImage2D) in real-time. That probably spawns nightmares in Steves dreams :P
Logged
¼

Trevor

  • Full Member
  • ***
  • Posts: 220
  • Goldfinger64 Dev OS:10 CPU:5960x Gfx:RX480
    • View Profile
    • LS Tech Services
Re: High Memory Use and Slow Playback Problem
« Reply #5 on: March 11, 2016, 06:43:27 am »

That calculation while correct comes in 2 flavours.
The second is
(400,000,000/1024)/1024=381MB

heh, what is the average texture size people are using here?
My average is 64x64x4 and my largest would have to be 3200x1600x24 360 panorama

Trev
Logged

kreator

  • Hero Member
  • *****
  • Posts: 1146
  • Anim8or, Blender, & Carrara. A Great Combination!
    • View Profile
    • Anim8orWorld
Re: High Memory Use and Slow Playback Problem
« Reply #6 on: March 11, 2016, 08:31:59 am »

Perhaps this is me (or my Little tablet) but I make up a Rig with some objects attached , go to figure editor to manipulate the bones do a sequence all looks good. Next I go to scene to build/Add figure and this is where it all falls down , I have a figure without the rig, I can add sequences to a non -existent rig, but obviously nothing animates. Build 1222
« Last Edit: March 12, 2016, 01:08:54 am by kreator »
Logged
O

slex

  • Jr. Member
  • **
  • Posts: 96
  • 3D-TV
    • View Profile
Re: High Memory Use and Slow Playback Problem
« Reply #7 on: March 11, 2016, 10:21:17 am »

Memory 'thing' didn't happen to 1219 dev. version and on 0980 version with the same project. Also, after removing two jpeg files used for eyes and body everything worked without memory increase. Here is the whole project, anyone can use/change the given model for every purpose, without those two .jpg files which are not mine- I downloaded them from internet, just point that 'Slex' made the base model if you want. cheers
Logged

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 2125
    • View Profile
Re: High Memory Use and Slow Playback Problem
« Reply #8 on: March 11, 2016, 12:35:07 pm »

slex: Thanks for the project. This very well could be a memory leak since it doesn't happen with earlier versions. I'll look into it.
Logged

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 2125
    • View Profile
Re: High Memory Use and Slow Playback Problem
« Reply #9 on: March 11, 2016, 01:02:48 pm »

slex: can you tell me the image size and format of the two missing textures? I.e. .jpg 1024x1024, .png 64x64, or whatever. I don't think I need the actual images.
Logged

cooldude234

  • Sr. Member
  • ****
  • Posts: 902
  • You know what I realized, I dont have an avatar :\
    • View Profile
Re: High Memory Use and Slow Playback Problem
« Reply #10 on: March 11, 2016, 04:55:12 pm »

That calculation while correct comes in 2 flavours.
The second is
(400,000,000/1024)/1024=381MB

heh, what is the average texture size people are using here?
My average is 64x64x4 and my largest would have to be 3200x1600x24 360 panorama

Trev

Yea I was rounding numbers just for simplicity.
As for that res, it depends on what I am doing.
If I am dealing with scans or master copies I usually have resolutions above 5000 x 5000 (like that 10,000x10,000 I mentioned), but If I am just making a simple ground texture it is usually just a 512 x 512 image.
Logged
¼

slex

  • Jr. Member
  • **
  • Posts: 96
  • 3D-TV
    • View Profile
Re: High Memory Use and Slow Playback Problem
« Reply #11 on: March 11, 2016, 11:38:22 pm »

Steve, only those two pictures within the zipped file were used on the body. One of the missing pictures is about 600kb, and others are about 15kb.
Logged

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 2125
    • View Profile
Re: High Memory Use and Slow Playback Problem
« Reply #12 on: March 12, 2016, 01:58:49 am »

slex: I need to know the image sizes, not the file sizes.  It makes a difference on how they are handled inside of Anim8or.

Note:  I googled "eye-162183_960_720.png" and was able to download it, so all I need is the image size of "images (2).jpg".  (I love Google!)
Logged

slex

  • Jr. Member
  • **
  • Posts: 96
  • 3D-TV
    • View Profile
Re: High Memory Use and Slow Playback Problem
« Reply #13 on: March 12, 2016, 03:25:14 am »

that was a cunning way to find the picture   ???, I'll upload all the included pictures in few hours because I'm not at home near the working comp.
Logged

Trevor

  • Full Member
  • ***
  • Posts: 220
  • Goldfinger64 Dev OS:10 CPU:5960x Gfx:RX480
    • View Profile
    • LS Tech Services
Re: High Memory Use and Slow Playback Problem
« Reply #14 on: March 12, 2016, 06:19:59 am »

I also loaded your project and noticed some things.

When I load the object or figure its fine, but when I enter sequence mode it slows down dramatically.

When I press play in sequence it playes at 8fps, yet I can drag the timetrackbar accross the screen and play the animation at probably double that (pretty much as fast as I can rotate round the object in arc rotate, which while slower than in object or figure mode, is still a lot faster that 8 fps)

Scene is also the same.

I noticed that while you said there were no textures, when I downloaded the zip it did have textures, the eye and metal.
I had no problems with these at this time.

Trev
Logged
Pages: [1] 2