Forum

Control exported file size

27 May 2015 21:28 #2546
Is there any way to control the file size. I would like to have a setting for the user like low, med and high and depending upon the selection control the file size. I'm reading but not finding anything.

You know I found this wonderful tool and now they want more.

Many thanks
28 May 2015 10:39 #2548
Hi,

Currently, we have performance profiles which can be switched during application initialization. Based on this, application will choose whether to use high quality textures & postprocessing or not. You can read more about it in this section. So, when the low quality is chosen - the low-resolution textures are uploaded and less data is send to the user.

Is it appropriate for your needs?
Blend4Web developer
28 May 2015 21:52 #2568
Sorry but not being a Blender coder, etc I'm not sure what you mean. When you say application do you mean Blender? The little spinet at the link will that convert my PNG/JPG to DDS or do I have to actually do something else? Sorry but truly a newbie here at this point.
29 May 2015 11:06 #2570
Well, as you probably know, Blend4Web offers two types of export:
1) HTML, which, I assume, you have already been using.
2) JSON + bin which is used for more serious tasks where some customization or coding is required.
When you say application do you mean Blender?
Here I speak about a Browser application which uses exported JSON and Blend4Web engine. This approach allows reducing the size and performance requirements when LOW-quality is chosen.

The little spinet at the link will that convert my PNG/JPG to DDS or do I have to actually do something else?
As it is written in documentation, when you have prepared dds or min50 textures, you need to pass assets_dds_available: true and assets_min50_available: true, params to the application init() function.
If you are under Linux, you can convert textures using converter.py script. Under Mac some dependencies should be installed. Under Windows some third-party soft have to be used. For example, Nvidia Photoshop plugin.

Min50 textures could be received by just scaling your image to the factor of 0.5 from the original size in any graphics software.

Summarizing. As HTML-exporter is very limited in its possibilities, you need to use JSON-exporter and a bit of coding will be required for this task.
Blend4Web developer
01 June 2015 20:20 #2607
Thanks for the info. I'll have to dive in and see what I can do. At the moment we are exporting as HTML in a Windows environment. Again, thanks.
 
Please register or log in to leave a reply.