BitmapMaterial repeat params no effect. 

Software: Away3D 4.x

liuyi, Member
Posted: 06 September 2011 10:40 AM   Total Posts: 65

The Materials should not be scale to fit this plane.
But it looks like only 1 tile here.

var materia BitmapMaterial = new BitmapMaterial((new _sceneTexture() as Bitmap).bitmapData,true,true);
materia.specular 0.2;
materia.specularColor 0xffffff;


var 
plane:Plane = new Plane(materia10001000100100);
plane.rotate(new Vector3D(100), 90);
_view.scene.addChild(plane); 

 

   

Avatar
Apprentice, Jr. Member
Posted: 06 September 2011 12:05 PM   Total Posts: 45   [ # 1 ]

I think you think that building a Plane with segmentsW > 1 and segmentsH > 1 will automatically create a plane with repeating texture coordinates, but it won’t. It just creates a plane existing of (segmentsW+1)*(segmentsH+1) vertices where the texture coordinates are spread between 0 and 1. For a repeating effect you should have texture coordinates that are spread between 0 and 2 (for repeating it twice) or higher (for more repeats). Afaik you have to assign these yourself (I haven’t done this before so I can’t directly tell you how). Hope this helps some though.

—Apprentice

   

Richard Olsson, Administrator
Posted: 06 September 2011 12:32 PM   Total Posts: 1192   [ # 2 ]

Set the scaleU and scaleV of your sub-geometries (myPlane.geometry.subGeometries) to something larger than 1. Then make sure that whatever material you are using has animateUVs set to true. That will allow you to tile bitmaps over a surface.

   

liuyi, Member
Posted: 07 September 2011 03:10 AM   Total Posts: 65   [ # 3 ]
Richard Olsson - 06 September 2011 12:32 PM

Set the scaleU and scaleV of your sub-geometries (myPlane.geometry.subGeometries) to something larger than 1. Then make sure that whatever material you are using has animateUVs set to true. That will allow you to tile bitmaps over a surface.


Thanks very much, it works. I added plane.geometry.scaleUV(10);

var plane:Plane = new Plane(materia10001000100100);
plane.geometry.scaleUV(10);
plane.rotate(new Vector3D(100), 90);
_view.scene.addChild(plane); 
   

liuyi, Member
Posted: 07 September 2011 03:11 AM   Total Posts: 65   [ # 4 ]
Apprentice - 06 September 2011 12:05 PM

I think you think that building a Plane with segmentsW > 1 and segmentsH > 1 will automatically create a plane with repeating texture coordinates, but it won’t. It just creates a plane existing of (segmentsW+1)*(segmentsH+1) vertices where the texture coordinates are spread between 0 and 1. For a repeating effect you should have texture coordinates that are spread between 0 and 2 (for repeating it twice) or higher (for more repeats). Afaik you have to assign these yourself (I haven’t done this before so I can’t directly tell you how). Hope this helps some though.

—Apprentice

Thanks!

You make me more know away3d.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X