Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Don't forget to read Tuesday's email newsletter for your chance to win a free copy of Construct 2!


#ActualAhmedCoeia

Posted 30 September 2013 - 01:20 PM

I have one cylinder and I would like to texture it using 36 different bitmaps. 

The problem that If i texture the cylinder with just one texture, I see that is stretched, like the picture here : 

  

   // 90, 90, are top radius, down radius, 50 is the height, 60 segements w, 60 segments height.

  reel = new CylinderGeometry(90,90,50,60,60,false,false,true);
 
  var textureBase2:Texture2DBase = new BitmapTexture(new reelTexture().bitmapData);
   
matrial_Reel = new TextureMaterial(textureBase2);
   
matrial_Reel.bothSides true;
   
   
reelMesh = new Mesh(reelmatrial_Reel);
   
reel null;
   
   
reelMesh.mouseEnabled true;

 

 

I would like also to put different textures one down the other, but to group them into one large texture, the problem is with the co-ordinates. 

I use the following code but still I get two pictures overlap each other

 

public static const SIZE int 1024;
public var 
img1 Bitmap;
public var 
img2 Bitmap;

var 
bmp:BitmapData=new BitmapData(SIZE,SIZE,false,0);

//Draw img1 at 0,0
bmp.draw(img1); 

//Draw img2 at 512,0
bmp.draw(img2, new Matrix(1,0,0,1SIZE/20)); 


#2AhmedCoeia

Posted 30 September 2013 - 01:19 PM

I have 5 cylinders and I would like to texture them using 36 bitmaps. 

The problem that If i texture the cylinder with just one texture, I see that is stretched, like the picture here : 

  

   // 90, 90, are top radius, down radius, 50 is the height, 60 segements w, 60 segments height.

  reel = new CylinderGeometry(90,90,50,60,60,false,false,true);
 
  var textureBase2:Texture2DBase = new BitmapTexture(new reelTexture().bitmapData);
   
matrial_Reel = new TextureMaterial(textureBase2);
   
matrial_Reel.bothSides true;
   
   
reelMesh = new Mesh(reelmatrial_Reel);
   
reel null;
   
   
reelMesh.mouseEnabled true;

 

 

I would like also to put different textures one down the other, but to group them into one large texture, the problem is with the co-ordinates. 

I use the following code but still I get two pictures overlap each other

 

public static const SIZE int 1024;
public var 
img1 Bitmap;
public var 
img2 Bitmap;

var 
bmp:BitmapData=new BitmapData(SIZE,SIZE,false,0);

//Draw img1 at 0,0
bmp.draw(img1); 

//Draw img2 at 512,0
bmp.draw(img2, new Matrix(1,0,0,1SIZE/20)); 


#1AhmedCoeia

Posted 30 September 2013 - 01:18 PM

I have 5 cylinders and I would like to texture them using 36 bitmaps. 

The problem that If i texture the cylinder with just one texture, I see that is stretched, like the picture here : 

  

   // 90, 90, are top radius, down radius, 50 is the height, 60 segements w, 60 segments height.

  reel = new CylinderGeometry(90,90,50,60,60,false,false,true);
 
  var textureBase2:Texture2DBase = new BitmapTexture(new reelTexture().bitmapData);
   
matrial_Reel = new TextureMaterial(textureBase2);
   
matrial_Reel.bothSides true;
   
   
reelMesh = new Mesh(reelmatrial_Reel);
   
reel null;
   
   
reelMesh.mouseEnabled true;

 

 

I would like also to put different textures one down the other, but to group them into one large texture, the problem is with the co-ordinates. 

I use the following code but still I get two pictures overlap each other

 

public static const SIZE int 1024;
public var 
img1 Bitmap;
public var 
img2 Bitmap;

var 
bmp:BitmapData=new BitmapData(SIZE,SIZE,false,0);

//Draw img1 at 0,0
bmp.draw(img1); 

//Draw img2 at 512,0
bmp.draw(img2, new Matrix(1,0,0,1SIZE/20)); 


PARTNERS