Hi.
I have a strange problem with jpg textures, some will load and some will not, resulting in a completely black image.
Please observe this code:
// Embedded bitmap assets
[Embed(source=“assets/carp03M.JPG”)]
private var assetFloor:Class;
private var floorTexture:BitmapTexture;
private var floorMaterial:TextureMaterial;
// bitmap materials
floorTexture = new BitmapTexture(new assetFloor().bitmapData);
floorMaterial = new TextureMaterial(floorTexture);
floorMaterial.lightPicker = lightPicker;
floorMaterial.smooth = true;
floorMaterial.gloss = 100;
floorMaterial.repeat = true;
//main geometry
var cubeFloor:CubeGeometry = new CubeGeometry(roomLength,2.5,roomWidth, 2, 2, 2);
var floor:Mesh = new Mesh(cubeFloor, floorMaterial);
//deploy
scene.addChild(floor);
This works flawlessly, resulting in the attached output.
Now when i exchange the jpg for the attached concrete.jpg image, the output in the browser is completely black.
I can’t see any difference in the jpg’s, the concrete.jpg works fine in 3ds max or photoshop or else.
Any idea?