Video background

22 February 2016 23:53 #7634

I wanted to try have a video play in the background of my scene.

In Blender I have been doing this by creating a video texture for the word so that it the video would take up the entire area seen by camera, even as the camera moves around the scene. And this is able to render out correctly in Blender.

I was hoping I could do something similar in Blend4Web. When I tried to export the scene out as a html page however I get an error message for the world texture, which is my video.

I made sure the video texture I was using is the webm format, but I am still encountering this problem.

When I remove the video texture I am able to export out the scene with no issues, ie the camera and models all act as expected.

Am I approaching this correctly, or should I be trying something different to achieve this?

24 February 2016 10:47 #7657

Currently it is not supported via the World tecture. But you can parent a plane to the camera so it will always follow the view.
Also you can consider using some coding to add your video as a background, if I understood you correctly

Hope it helps!
3D Generalist, contests administrator,
Blend4Web team.
art blog:
24 February 2016 12:41 #7671

Thanks for the quick response, I have some follow up questions if that's okay.

Do you know any resources that I can use to learn more about parenting a plane to a camera?

And if I was to write code to add my background, how would I go about doing this?

Thanks again!
24 February 2016 14:55 #7679
As an artist I will tell you about the parenting :)
It became pretty easy recently because we supported viewport alignment. Here I recorded a video how to do that:

You can also consider making your plane little longer in case of very wide screens
3D Generalist, contests administrator,
Blend4Web team.
art blog:
24 February 2016 16:05 #7692
Also take a look at this example, please.
Blend4Web developer
04 March 2016 14:25 #7987
Hi Pavel,

I watched your video but I seem to be missing some options that you had.

After you parent the plane to the camera, you have a setting called viewport alignment checked. I do not have this setting. Am I missing a plugin for it?

Exporting the scene without this seemed to not preserve the plane's size. So I think it might be connected.

Thanks once again!
You've been a huge help!
04 March 2016 14:49 #7988
Hey nee-

Which Blender/B4W version are you using? Try using latest stable Blender/B4W versions

You actually can work without Viewport Alignment, but on some screens it may look different.
About the size - just apply it (ctrl+A -> Scale)

Oh and also use Vertical Camera setting, as it is only one supported for now :) It's under Camera tab. That must do it
3D Generalist, contests administrator,
Blend4Web team.
art blog:
04 March 2016 15:53 #7996
Hi Pavel,

Thanks a million, I was able to get it working with your last suggestions!
04 March 2016 16:45 #8002
You\re welcome! Glad it works
3D Generalist, contests administrator,
Blend4Web team.
art blog:
Please register or log in to leave a reply.