Forum

Why does using mirror / array modifiers not reduce filesize?

21 May 2017 08:19
One would think that using these modifiers (and NOT applying them before export) could be used to keep filesize low, but apparently this is not the case.

I tried using an array modifier with a very large count to test this, and to my surprise, the exported .bin filesize increased along with the array count. My expectation was that the engine would apply the array after reading the files, so that mirrors and arrays could be exploited to cut down massively on filesize.
22 May 2017 11:01
One would think that using these modifiers (and NOT applying them before export) could be used to keep filesize low, but apparently this is not the case.

I tried using an array modifier with a very large count to test this, and to my surprise, the exported .bin filesize increased along with the array count. My expectation was that the engine would apply the array after reading the files, so that mirrors and arrays could be exploited to cut down massively on filesize.
Hello,

If don't touch "Export Options" of the object, the engine tries to automatically apply object's modifiers during export if possible. It is done to simplify life for the beginners. This is why the file size increased.

At the moment Array modifier is the only one that can be processed dynamically. In this case auto-applied behavior is not correct obviously.

For now there is a little hack: you should just click twice (enable then disable) "Apply Modifiers" property for the object. Then modifiers won't be pre-applied.

Thank you for the report! We will correct this behavior in the nearest future
Blend4Web Team - developer
Twitter
LinkedIn
22 May 2017 21:24
For now there is a little hack: you should just click twice (enable then disable) "Apply Modifiers" property for the object. Then modifiers won't be pre-applied.
Yep, that worked.

For now Array modifier is the only one that can be processed dynamically.
Well, one could create a Mirror modifier from a 2-count, no-offsets Array modifier by adding an Empty at the same location, then setting the Array modifier's "Object Offset" to the Empty. You can now create mirror effects by manipulating the Empty (rotate Z by 180 degrees or set scale to -1 on the axis to be mirrored).
 
Please register or log in to leave a reply.