VideoMaterial?

Software: Away3D 4.x

Lucid, Member
Posted: 24 February 2012 07:17 PM   Total Posts: 93

How would I apply a video material to a sphere in 4.0.0 beta? Do I utilize the new TextureMaterial class? If so, how? The VideoMaterial of the previous versions lacked significant features, such as monitoring the states (buffering, playing, ready, etc) and video parameters (playhead time, total time, frame rate, etc)

Thoughts?

   

Avatar
mrpinc, Sr. Member
Posted: 24 February 2012 07:42 PM   Total Posts: 119   [ # 1 ]

Use VideoTexture instead now.

It still does not have all the features you mention but you can feed your own video player to the texture so long as it follows the IVideoPlayer interface.

   

Lucid, Member
Posted: 24 February 2012 08:23 PM   Total Posts: 93   [ # 2 ]

This causes an error:
var mesh:Mesh = new Mesh(new SphereGeometry(2000,48,48))
var vt:VideoTexture = new VideoTexture(‘beach.mov’,2000,1000,true,true)
mesh.material = vt;
————-

Could you provide a solution to implement the VideoTexturea as a mesh material?

   

Avatar
mrpinc, Sr. Member
Posted: 24 February 2012 08:50 PM   Total Posts: 119   [ # 3 ]

First:
mesh.material = new TextureMaterial(vt);

Second:
Your material needs to be a power of 2:
2000 x 1000 will not work -
Try 1024 x 1024

Other than that it should be fine.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X