Forum

fast preview and html total size

28 March 2017 13:51
Hello,

I want to know how can I reduce the parameters like RTs and texture size inside fastpreview? ( I attached the image)
I went through the topics and I found this comment:'' you descrease resolution of shadow casting and blur samples, discrease Quality of Anti-Aliasing and so on, you will get less value of RTs, but it will have influence only on rendering. So, as I said before amount of shaders and dynamic objects has influence of loading. ''.
So, I tried to turn off shadow and anti-analising and I could decrease RTs from 50 MiB to 38.2MiB.
but what about the rest(38.2)? and how can I reduce texture size ?
In fastpreview, it shows that I have 27 shaders , Do they really effect on RTs size ?

another question: why I have 15.8 MB exported html file while in fastpreview the total size is 178.8 MiB?
Could you please explain these features?
28 March 2017 17:22
Hi,

I want to know how can I reduce the parameters like RTs and texture size inside fastpreview? ( I attached the image)
I went through the topics and I found this comment:'' you descrease resolution of shadow casting and blur samples, discrease Quality of Anti-Aliasing and so on, you will get less value of RTs, but it will have influence only on rendering. So, as I said before amount of shaders and dynamic objects has influence of loading. ''.

RTs shows the amount of memory occupied by Render Targets. This number is affected by Some visual effects (mostly postprocessing), Shadows and the rendering canvas size.
You can check all the components which influence this number using the HUD panel. Search for the "HUD info" on this page.
You can notice that this number changes as you resize the browser window.

and how can I reduce texture size ?
These are textures used by scene objects. So reducing the size of textures used in Blender will affect this number. When you have no textures this number equals zero.

In fastpreview, it shows that I have 27 shaders , Do they really effect on RTs size ?
No, they do not. Furthermore, in Viewer there are a lot of auxiliary shaders, for instance used in Color Picking or Debug Shaders.

why I have 15.8 MB exported html file while in fastpreview the total size is 178.8 MiB?
In short, there is no direct correlation between these numbers. The later number includes everything that is needed for rendering including OpenGL objects, RenderTargets, unpacked textures etc. HTML has packed raw data and doesn't have anything related to actual rendering inside itself.
10 April 2017 18:49
Hello,
I have another question related to html file size.
I have 2 different blender file. one just the geometry and another one just material.
when I export the files seperately, the first file size is around 8 MB and the material file size is around 5MB.
BUT, when I append the materials from the material file into the geometry file and export to html , the file size decreses to 40 MB. Is it normal or sth is wrong ?
10 April 2017 19:11
This might have happened because meshes have UVs. Maybe, even several.
When there is no material applied to the meshes, UVs are being omitted. After attaching the materials UV-data goes into the final json/html.
This is just an example, but anyway, Blend4Web tries to export as least data as possible. Some situations like this are also possible.
11 April 2017 11:25
Can I get the email to send our file to check If there is a way to reduce the size html file? or check If we can improve our blender file to get a lighter htm file?
Thanks
11 April 2017 12:27
Yes, sure.
Just send your file to the support email you got when you acquired the license.
11 April 2017 17:57
I've checked the blend-file you provided.
Images have the greatest impact on the file size. For instance, the nappa_normal image has a size of 12.3 MB. I believe it is not required in your case as it can be replaced with a very small tiled image.

Furthermore, there are several images packed into blend-file with similar file paths. For example, cubemap_rought and cubemap_rought.004. Currently, Blend4Web unpacks them as separate files, which leads to exported file size growth. We'll fix this in the nearest release.

As for now, you can just remove duplicated images and use the original images instead.

[EDIT]
An even easier solution is to use unpacked images. You can click File-External Data and switch off the Automatically pack flag. Then just press Unpack All into Files. I'm not sure if this is fine for your development pipeline, but it will reduce the export size in a similar manner.
 
Please register or log in to leave a reply.