Jump to content

Mesh serialize doubles its weight


Recommended Posts


Is it normal that after serializing is the double weight of a model not serialized.

I have a model with Skeleton and animation that 16 MB, but once serialize, the file is now 38 MB Why is not it the same weight. is there information duplicate add?

I think the difference is huge. it has 22 MB add to the original file 16MB

Link to comment
Share on other sites

Yet when I look in the file, the numbers have no 0.0000., I see 0.

By cons it is true that each number has a float number rise after the comma compare the original file.

4 decimal in the original file and 16 after the decimal point in the serialized file. (4 * 4)

There is no possibility to reduce the number of decimal 4 or 6 at the time of serialization in Babylon.


Link to comment
Share on other sites

With PHP if I had done this instead of recording in gross, decreases the file is 26 MB rather that 38 MB I still fails to get closer to the initial weight of the file (before serialization 16 MB). There I  +10MB.

But the file babylon load after :D

$json = json_decode($value, true);

$json["meshes"][0]["scaling"][0] = (float)$_POST['scale'];
$json["meshes"][0]["scaling"][1] = (float)$_POST['scale'];
$json["meshes"][0]["scaling"][2] = (float)$_POST['scale'];

$save = json_encode($json);

@chmod($root, 0777);
file_put_contents($root, $save);



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...