[SOLVED] Exact clone of a TextureMaterial

Software: Away3D 4.x

JaykopX, Newbie
Posted: 26 September 2015 01:45 PM   Total Posts: 13

Hi, i want to clone a TextureMaterial, modify it and keep the original and the clone for later use.

What i did so far is following:

var BT:BitmapTexture defaultMaterial.texture as BitmapTexture;
var 
BD:BitmapData BT.bitmapData;
var clone:
BitmapData BD.clone();
var 
newBT:BitmapTexture = new BitmapTexture(clone);
transparentMaterial = new TextureMaterial(newBTfalsetrue);
transparentMaterial.lightPicker defaultMaterial.lightPicker

But the cloned TextureMaterial does not look like the original (see attachment). Can anyone help me with that problem please? I think i am missing some important information from the texture? uv-coordinates maybe or something like that.

 

   

JaykopX, Newbie
Posted: 27 September 2015 03:04 PM   Total Posts: 13   [ # 1 ]

I solved the problem. It was just one wrong parameter. I enable mipmaping for the clone, but the original did not have mipmaping enabled.

The working Soulution looks like this:

clone = new TextureMaterial(original.texturetruetruefalse);
clone.
lightPicker original.lightPicker

clone and original are TextureMaterials.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X