Forum

How to control the playback of video textures on a plane

02 February 2017 15:20
Hi,

I am fairly new to blend4web, and i am working on this scene where i have to play an animation on the background, so instead of loading thousands of objects, i pre-rendered the animation in cycles and applied the rendered video as a texture to a plane.

This reduced the size (from 500MB to 6MB) and the loading time (from 52 sec to 1 sec on an i7-4790 with 32GB ram and a GTX 1070)

And this had a huge boost when it came to hosting it from a web-server…

But, i have no idea how to control this texture (meaning, it keeps playing and doesn't stop when i need it to stop).

Can someone please point me how to control this so i can stop it and resume it when ever i want (preferably, to resume playing when i click on something)

And also, is there a way, to play this texture backwards (like clicking and dragging the cursor backwards in the timeline)

Thank you in advance
02 February 2017 19:31
This is one of the tutorial files that are given with blend for web,

exa.jpg

and this is how it looks…

ex dem.jpg

the first plane is set to play the same video as the second plane but pauses and resumes again… and since the heading in it says NLA video… i guess it is animated

but i cant figure out how they do it… i opened the blender file found nothing but the two planes in it… any help or ideas are gladly welcome
02 February 2017 19:37
And yes i did check the nla editor, node editor and all those stuff…

Blend file : video_nla.blend
03 February 2017 17:37
Hi and welcome to the forums!

you might want to check this tutorial:https://www.blend4web.com/en/community/article/95/
The Founder | Twitter | Facebook | Linkedin
04 February 2017 13:38
Hello Roman,
Do you write your own application or use the export to HTML?

There are API methods to control video.

I noticed, that you use GTX 1070 (I use this device too ) but your system use DirectX9 instead of DirectX11. Could you check it pleaes? Just visit http://webglreport.com/ and take a look at the following line:


Videodriver and OS updates can help to solve the problem
 
Please register or log in to leave a reply.