My code works as it displays a 1000X1000 terrain with heighmap.
IT is way to slow to use as when i move camera . It is very slow.
How can I speed this up or I am not supposed to use 1000X1000 size
height map and terrain?
[Embed(source="grass2.jpg")] private var Terrain:Class;
[Embed(source="redmap.jpg")] private var HeightMap:Class;
private var extrude:SkinExtrude;
...
var terrainMaterial:BitmapMaterial =
new BitmapMaterial(Cast.bitmap(Terrain));
var elevation:Elevation = new Elevation();
var vertices:Array= elevation.generate(
Cast.bitmap(HeightMap),"r",16,16,1,1,0.25);
extrude = new SkinExtrude(vertices,
{
coverall:true,material:terrainMaterial,recenter:true,bothsides:true
}
);
extrude.rotationX = 90;
extrude.x=extrude.y=extrude.z=0;
view.scene.addChild(extrude);