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!
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
12 August 2017 20:26
Hello,
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:
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!
-Sebastian
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");
return;
}
m_app.enable_camera_controls();
// 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);
console.log(texname01[0]);
console.log(texname02[0]);
m_tex.pause_video(texname01[0]);
m_tex.pause_video(texname02[0]);
}
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!
-Sebastian
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 :).
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:
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
Hi,
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:
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 }
({"vert":"postprocessing/postprocessing.glslv","frag":"postprocessing/postprocessing.glslf","directives":[["ALPHA",0],["ALPHA_CLIP",0],["ANAGLYPH",0],["BEND_CENTER_ONLY",1],["BILLBOARD_PRES_GLOB_ORIENTATION",0],["CAUSTICS",0],["CSM_BLEND_BETWEEEN_CASCADES",1],["CSM_FADE_LAST_CASCADE",1],["CSM_SECTION0",0],["CSM_SECTION1",0],["CSM_SECTION2",0],["CSM_SECTION3",0],["DEBUG_SPHERE",0],["DEBUG_SPHERE_DYNAMIC",0],["DEPTH_RGBA",0],["DISABLE_DISTORTION_CORRECTION",0],["DISABLE_FOG",0],["DOUBLE_SIDED_LIGHTING",0],["DYNAMIC",0],["DYNAMIC_GRASS",0],["DYNAMIC_GRASS_COLOR",0],["DYNAMIC_GRASS_SIZE",0],["FOAM",0],["FRAMES_BLENDING",0],["BILLBOARD_JITTERED",0],["BILLBOARD_SPHERICAL",1],["HAIR_BILLBOARD",0],["SHADOW_TEX_RES","2048.0"],["MAIN_BEND_COL",0],["MAX_BONES",0],["NUM_NORMALMAPS",0],["PARALLAX",0],["PARALLAX_STEPS",0],["PROCEDURAL_FOG",0],["PROCEDURAL_SKYDOME",0],["REFLECTION",0],["REFLECTION_PASS",0],["REFLECTION_TYPE",0],["REFRACTIVE",0],["USE_REFRACTION",0],["USE_REFRACTION_CORRECTION",0],["SHORE_SMOOTHING",0],["SKINNED",0],["SKY_COLOR",0],["SKY_TEXTURE",0],["SSAO_HEMISPHERE",0],["SSAO_BLUR_DEPTH",0],["SSAO_ONLY",0],["SSAO_WHITE",0],["STATIC_BATCH",0],["TEXTURE_COLOR",0],["TEXTURE_NORM",0],["TEXTURE_SPEC",0],["TEXTURE_STENCIL_ALPHA_MASK",0],["VERTEX_ANIM",0],["VERTEX_ANIM_MIX_NORMALS_FACTOR","u_va_frame_factor"],["VERTEX_COLOR",0],["WATER_EFFECTS",0],["WIND_BEND",0],["DETAIL_BEND",0],["SHORE_PARAMS",0],["ALPHA_AS_SPEC",1],["MTEX_NEGATIVE",0],["MTEX_RGBTOINT",0],["NUM_LIGHTS",0],["NUM_LFACTORS",0],["NUM_LAMP_LIGHTS",1],["MAX_STEPS",1],["BILLBOARD_ALIGN","BILLBOARD_ALIGN_VIEW"],["SHADOW_USAGE","NO_SHADOWS"],["POST_EFFECT","POST_EFFECT_X_EXTEND"],["SSAO_QUALITY","SSAO_QUALITY_32"],["TEXTURE_BLEND_TYPE","TEXTURE_BLEND_TYPE_MIX"],["TEXTURE_COORDS","TEXTURE_COORDS_UV_ORCO"],["AA_METHOD","AA_METHOD_FXAA_QUALITY"],["AU_QUALIFIER","NOT_ASSIGNED"],["BILLBOARD",0],["BILLBOARD_RANDOM",0],["PRECISION","mediump"],["EPSILON",0.0001],["USE_ENVIRONMENT_LIGHT",0],["USE_FOG",0],["WEBGL2",0],["WO_SKYBLEND",0],["WO_SKYPAPER",0],["WO_SKYREAL",0],["WO_SKYTEX",0],["WOMAP_BLEND",0],["WOMAP_HORIZ",0],["WOMAP_ZENUP",0],["WOMAP_ZENDOWN",0],["WIREFRAME_QUALITY",0],["SIZE_RAMP_LENGTH",0],["COLOR_RAMP_LENGTH",0],["PARTICLES_SHADELESS",0],["NUM_CAST_LAMPS",0],["SUN_NUM",0],["MAC_OS_SHADOW_HACK",0],["USE_COLOR_RAMP",0],["HALO_PARTICLES",0],["PARTICLE_BATCH",0]],"node_elements":[]})error @ print.js:74
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