Textures are associated with Materials.  You'll need to apply a
different Material to different subsections of the mesh.

The way to do this is to...
a) build separate SubGeometry pieces for the portions of the terrain
that you want to have a different Texture
b) add those SubGeometry pieces with Mesh.geometry.addSubGeometry()
c) retrieve the list of SubMeshes back from Mesh, and find out which
SubMesh refers to the SubGeometry you added.
d) apply the BitmapMaterial to the SubMesh you discovered.

SubMeshes are the 'lowest' entity in the Away3D that you can associate
a material with.  The API's around this functionality are very
incomplete, I've found (it's alpha software).

Terrain itself is a huge discipline in CG, and I would study some
papers before building too much on your own.

-Dave

On Mar 22, 4:44 pm, MADCATX <[email protected]> wrote:
> I hadn't done any 3d games with terrain yet... But I need to create
> one now.
> I have pretty big terrain mesh. When I apply BitmapMaterial
> (2048x2048) and zoom in - the image looks 
> stretched:http://files.myopera.com/MADCATX/albums/6547792/Capture.JPG
> UVW for terrain created using flatten mapping (view from 
> top):http://files.myopera.com/MADCATX/albums/6547792/Capture2.JPG
> Obviously method with using one big texture for whole terrain is
> wrong.
> So is there any way to select texture for individual faces of the
> mesh? It will be good if I'll be able to also blend different textures
> like it's done in SC2 Map editor.

Reply via email to