Hello,
I have a following problem.
I am trying to achieve an elevation mesh with splat texture map but instead of a diffuce map as a base texture I want to have a tiled bitmap texture so that where splat texture is not drawn a tiled base bitmap texture is shown.
Everything works perfectly, but I haven’t figured out how to scale the base texture without scaling splat textures since all textures are applied to the same elevation mesh, .geometry.scaleUV will scale all of them.
var terrainMethod:TerrainDiffuseMethod = new TerrainDiffuseMethod([new BitmapTexture(new Beach().bitmapData), new BitmapTexture(new Grass().bitmapData), new BitmapTexture(new Rock().bitmapData)], new BitmapTexture(new Blend().bitmapData), [1, 10, 10, 10]);
// Splat textures are repeated 10 times but this won't affect groundTexture
// Texture I wan't to repeat
var groundTexture:BitmapTexture = new BitmapTexture(new GroundDiffuse().bitmapData);
var terrainMaterial:TextureMaterial = new TextureMaterial(groundTexture);
terrainMaterial.repeat = true; // Not repeating because scaleUV can't be used
terrainMaterial.diffuseMethod = terrainMethod;
this._plane = new Elevation(terrainMaterial, new HeightMap().bitmapData, 250, 40, 250, 30, 30, 40);
As you can see from the attached screenshot, the splat texture tiles perfectly, but the base texture (red/white squares) is not tiled.