Videotexture on imported Prefab As3 Model

Software: Away3D 4.x

jewtis, Newbie
Posted: 04 September 2015 09:55 AM   Total Posts: 3

Hi,

I try to use video texture on a imported plane.
Created Model in Blender, exported .obj -> 2 Meshes.
Import to Prefab -> export AS3 Class

Create Material
var vt:VideoTexture=new VideoTexture(“vid/MOV_0015.flv”,1024,512);
var tm:TextureMaterial=new TextureMaterial(vt);

Then
myImportedModelClass.meshes[0].submeshes[0]material = tm

Video is rendered but it seems to be way out of size…

If i create an new Plane and use the same method to apply the video texture the video is rendered perfectly…

Whats wrong?
Some help out there?

   

Avatar
Fabrice Closier, Administrator
Posted: 04 September 2015 11:10 AM   Total Posts: 1265   [ # 1 ]

I haven’t tried videoTexture yet. but since the uv’s are 0-1 on a plane, something is using the default settings. So first thing I would look at since you do not declare a player, is to use the getter to get the simplePlayer that is generated if none is passed.
like after your texture is instantiated, do:
vt.player.width = 1024;
vt.player.height = 512;

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X