User posts donalffons
13 August 2017 13:56
I had a look at the canvas texture example, but it seems to use a different approach on how to apply the texture. I will look into it if my preferred way (applying the textures within Blender seems much easier) does not work.

Meanwhile, I was playing with more settings. If I disable 'Auto Refresh' for both textures, they seem to start paused. And I can start them with play_video(…) later (for example in the load_cb(…) function).

What I need to fix still (with my Blender way of doing things), is that I don't want to duplicate all the video textures. That would make the loading time of my project unbearable.
Thank you for your help so far, Will!
13 August 2017 11:53
Yes, If I have two separate video textures, the error message goes away.

I attached all files of this version of my example. However, both videos start playing when I launch the page. I think they should be paused after loading the scene, no?!
12 August 2017 20:26

I encountered the following problem with video textures: I made a simple scene with two planes having two different animated textures. These textures are using the same video file, however.

In my main js file, I want to pause both textures to prevent them from playing. I use the following code:

 * callback executed when the scene data is loaded
function load_cb(data_id, success) {

    if (!success) {
        console.log("b4w load failure");


    // place your code here

    var Obj01 = m_scenes.get_object_by_name("Obj01");
    var Obj02 = m_scenes.get_object_by_name("Obj02");
    var texname01 = m_tex.get_texture_names(Obj01);
    var texname02 = m_tex.get_texture_names(Obj02);

Chrome's console output gives the following error:

And both textures keep playing. I would expect both textures to not play. Is this a bug or am I missing something?

Best regards. And many thanks for your amazing software!
30 March 2016 21:44
Thanks again, Ivan, for listening and replying to me :).

So… I understand from your reply, that you assume that there is some kind of 1,5 GB memory restriction, imposed somehow by the web browser or the way WebGL works.

It would be helpful for my case if it would be possible to reduce memory consumption for multiple instances of the sames mesh.

Although I have some limited coding skills, I think it would not be feasible for my use case to have dynamical loading and unloading. I have to be able to show the whole model in one shot and generating levels of detail will be inefficient, I think.

Reducing the polygon count can definately be an option. Unfortunately, I don't think that there is a CAD conversion software that generates good quality models with low polygon counts. Also, I cannot go into the CAD models and delete thousand of nuts and bolts and other small details - this would not be time efficient.

I would be happy if you could find a solution for this problem. I will keep reading your blog and following your project along. But I can definately see a use of your solution for what we are doing at my company already. I will try to convince someone to get me a commercial license :).
29 March 2016 23:31
Thanks for your reply, Ivan.
By the way: The technology, that you guys are delevoping here, is very cool. If I would be able to supply our customers with interactive 3D presentations of our concepts, that would be a huge benefit.

On the topic:

I also tried the same scene on my personal laptop (previous tests were made with my work laptop) and everything worked fine. I was able to reproduce the error when increasing the number of objects in the scene.

Thanks for the link. The explanations there were very informative. I'm still not quite sure though what the best way would be to solve my problem. Do you suggest to limit the size of the scene (when loaded by the web browser) to 1,5 GB of RAM memory? How can I make sure that my application can run on any medium sized hardware (no problem if loading times are long or if animations play choppy)?
This is a screenshot of my work laptop's memory with no scene loaded:
This is my base scene: (strangely today, more monkeys are possible…)
This happens when I load this scene succesfully in firefox:
This happens when I add a couple of more monkeys - WebGL crashes in firefox:
This is how a crash looks like in chrome:
28 March 2016 14:06

I want to use Blend4Web to visualize concepts for my company's customers (I don't have a commercial license yet). Those concepts include meshes, generated from CAD data with great detail and high poly counts. I noticed that if my file has more than 1 - 2 Mio Polys, the exported HTML / JSON does not load up any more in my web browser (export works fine though). Attached is an example with a duplicated mesh, that reproduces the same error. I tried it with Firefox (31.6), Chrome (49.0.2623.108) and Chrome Canary (51.0.2692.0 canary). My operating system is Windows 7, 64 bit. Im using the blender addon & sdk version 16.2

Here is a blender screenshot:

Here is a screenshot of the error in Chrome:

print.js:50 B4W LOG: INIT ENGINE 16.03 DEBUG (28.03.2016 12:58:59)
print.js:50 B4W LOG: INIT WEBGL 1
print.js:50 B4W LOG: GET EXTENSION WEBGL_debug_renderer_info
print.js:50 B4W LOG: RENDERER INFO: Google Inc., ANGLE (Intel(R) HD Graphics 4600 Direct3D11 vs_5_0 ps_5_0)
print.js:50 B4W LOG: INIT WEBAUDIO: 48000Hz
print.js:50 B4W LOG: GET EXTENSION WEBGL_depth_texture
print.js:50 B4W LOG: GET EXTENSION WEBGL_compressed_texture_s3tc
print.js:50 B4W LOG: Chrome detected. Some of deprecated functions related to the Doppler effect won't be called.
print.js:50 B4W LOG: SET PRECISION: mediump
print.js:50 B4W LOG: LOAD METADATA ../../tmp/preview.json?t=28032016125901
print.js:133 B4W EXPORT WARNING: Missing active camera or wrong active camera object
print.js:50 B4W LOG: LOAD BINARY ../../tmp/preview.bin?t=28032016125901
print.js:50 B4W LOG: LOAD PHYSICS Using Separate Worker Thread, Max FPS: 60
print.js:50 B4W LOG: PHYSICS PATH http://localhost:6687/src/../deploy/apps/common/uranium.js?t=28032016125901
print.js:50 B4W LOG: GET EXTENSION OES_standard_derivatives
print.js:50 B4W LOG: GET EXTENSION OES_element_index_uint
print.js:74 B4W ERROR: shader compilation failed:
1 attribute vec2 a_position ;
2 varying vec2 v_texcoord ;
3 void main ( void ) {
4 v_texcoord = 2.0 * a_position ;
5 gl_Position = vec4 ( 4.0 * ( a_position . xy - 0.25 ) , 0.0 , 1.0 ) ;
6 }
debug.js:192 Uncaught Engine failed: see above for error messages
viewer.html:1 WebGL: CONTEXT_LOST_WEBGL: loseContext: context lost
print.js:74 B4W ERROR: WebGL context losterror @ print.js:74
print.js:112 B4W WARN: Canvas size exceeds platform limits, downscaling
camera.js:1687 Uncaught No aspect ratio
print.js:112 B4W WARN: Canvas size exceeds platform limits, downscaling
camera.js:1687 Uncaught No aspect ratio