Author Topic: HELP - file size problem  (Read 4583 times)

2017-08-02, 19:50:22

Bormax

  • Active Users
  • **
  • Posts: 568
    • View Profile
Hi

Have a problem with file sizes. Working with my projects noticed that if I merge some objects from another scene file size grows even if that objects have just few polygons. Made some tests and find out this issue:
Start new empty scene and save it - file size is 375Kb
Merge objects with just 5000 polys of Max's geometry, save file - file size 47.5Mb (which is too much for 5000 polys)!
Delete everything from the scene, clean material editor's views, save file - file size 47.5Mb!!!!

I tried to inspect this file, but didn't find anything... I'm wondering how many extra megabytes I have in my files if deleting unnecessary geometry doesn't make them lighter.

I attached described above scene here. This is the empty scene with file size 47.5Mb

I would be very grateful if someone could help to inspect this file and find out what is wrong with it.

Thanks in advance!


2017-08-02, 21:09:44
Reply #1

Frood

  • Active Users
  • **
  • Posts: 1922
    • View Profile
    • Rakete GmbH
Unfortunately Max2014 and Max2016 both crash when I try to open it. The 2016 minidump indicates a crash in msvcr110.dll after trying to allocate memory. The last action max did was

ParamBlk2.dll!ParamBlock2::Load(class ILoad *)

From SDK help:
"The Parameter Block 2 library. Plug-ins that use the parameter blocks require this library"

*shrug* :)

However, Max2018 opens it, everything seems to be in order. And when I save, the filesize is what is to expect (1,8MB uncompressed, 800kb compressed).

I tried to inspect this file, but didn't find anything...

This is Max2014, right? Have you checked the trackview nodes bug? Even when I could not find any after opening with Max2018 there is still a chance that this is the cause.


Good Luck



Never underestimate the power of a well placed level one spell.

2017-08-02, 21:40:36
Reply #2

Bormax

  • Active Users
  • **
  • Posts: 568
    • View Profile
Thank you Frood for your try!

You are right, this is Max 2014

I tried now to run suggested script line - it didn't help. Here I've attached screenshot with my track views and what MaxScript Listener said. Plus I saved the file as 2011 version, it's attached here also.

I found in Dope sheet huge amount of AnimLayers...
« Last Edit: 2017-08-02, 21:46:45 by Bormax »

2017-08-02, 23:27:06
Reply #3

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8856
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Try to search on scriptspot for some garbage collecter/cleaner script and run it in your scene. Should help with those pesky animation layers.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2017-08-03, 00:29:48
Reply #4

Frood

  • Active Users
  • **
  • Posts: 1922
    • View Profile
    • Rakete GmbH
The 2011 version still crashes here but with that file and max2018 I can see the layers. They can be removed with 2 lines in the MaxScript Listener. There were 786 layers to delete :) Too bad that the cleaner script does not check this Edit: now it does.


Good Night


« Last Edit: 2018-07-02, 10:37:42 by Frood »
Never underestimate the power of a well placed level one spell.

2017-08-03, 01:00:19
Reply #5

Bormax

  • Active Users
  • **
  • Posts: 568
    • View Profile
There were 786 layers to delete

Yes! That was the thing! These 2 lines made magic, this scene now cleaned and file size is 244 Kb after all.

Thank you so much for your help!

Now I have to check my files I'm working with and clean them too. Looks like the problem is in starting scene I'm using for the most of the scene I create, so if I merge something from the scenes I created started from that file I bring this "infection" to the current file even if it's been started from totally new empty scene. Am I guessing right? And of course, it's interesting, how did I get such a huge amount of that layers and how to avoid this problem in future?....

Thank you once again! And good night

2017-08-03, 21:14:46
Reply #6

Frood

  • Active Users
  • **
  • Posts: 1922
    • View Profile
    • Rakete GmbH
Thank you so much for your help!

Welcome, but you discovered the problem yourself :)

how to avoid this problem in future?....

Attached is a script you just have to throw in your scripts\startup directory. It will warn you everytime it finds additional animation layers and asks if you want to delete them. So everytime you load a scene with more than the default animation layer it will allert you.


Good Luck


Never underestimate the power of a well placed level one spell.

2017-08-03, 22:28:19
Reply #7

Bormax

  • Active Users
  • **
  • Posts: 568
    • View Profile
Attached is a script you just have to throw in your scripts\startup directory. It will warn you everytime it finds additional animation layers and asks if you want to delete them. So everytime you load a scene with more than the default animation layer it will allert you.
Wow! That's just great! Tried your script just a minute ago and it works perfectly! That will make my cleaning job much easier! Thank you very very much! And thank you once again for the pointing me to the problem location, I would not find it without your help!

THANKS!