I am troubling this problem for a few years.
I want to modify figure of geometry of hairs or skirts, in accordance with the movements of body.
I could find the method to modify figure by using fromVectors .
//create bitmap texture
var bmd:BitmapData = new texture().bitmapData;
var mat:TextureMaterial = new TextureMaterial( new BitmapTexture( bmd ) );
//add mesh
var mesh:Mesh = new Mesh( new PlaneGeometry( 400, 400 ), mat );
scene.addChild( mesh );
mesh.rotationX = -90;
//refere subGeometry
var sub:ISubGeometry = mesh.geometry.subGeometries[0];
sub.autoDeriveVertexNormals = true;
sub.autoDeriveVertexTangents = true;
//get vertex datas
var vx:Vector.<Number> = sub.vertexData;
var vxp:Vector.<Number> = sub.vertexPositionData;
var uvs:Vector.<Number> = sub.UVData;
var nml:Vector.<Number> = sub.vertexNormalData;
var tan:Vector.<Number> = sub.vertexTangentData;
//modify figure like waving by wind
vxp[ 1 * 3 + 1] = 50;
//update vertex
sub.fromVectors(vxp, uvs, nml, tan ); //uv and specular will be broken
//sub.fromVectors( vxp, null, null, null ); //uv will be broken
the figure is updated as desired.
But If i choose TextureMaterial , UV appearance will be broken.
(Single pattern color like ColorMaterial , no problem.)
By the way, until Away3D 4.0 , the updateVertexData method could modify figure without uv appearance broken. (but shadow was incorrect.)
Is it difficult to modify figure with correct uv appearance ?