Index: experimental/distortionNG/DistortionManipulator.cpp
===================================================================
--- experimental/distortionNG/DistortionManipulator.cpp	(revision 386)
+++ experimental/distortionNG/DistortionManipulator.cpp	(revision 387)
@@ -547,7 +547,9 @@
 	for(unsigned int i=0;i<_distortionSet->getDistortionMesh()->size();i++)
 	{
+		osg::Vec4 tmpSrc = _distortionSet->getDistortionMesh()->at(i);
+
 		// Scale vector with the screen resolution
-		osg::Vec3 tmpVec = osg::Vec3(	_distortionSet->getDistortionMesh()->at(i).x()*_screenPixWidth,
-										_distortionSet->getDistortionMesh()->at(i).y()*_screenPixHeight,
+		osg::Vec3 tmpVec = osg::Vec3(	tmpSrc.x()*_screenPixWidth,
+										tmpSrc.y()*_screenPixHeight,
 										0.0	);
 		vertices->push_back( tmpVec );
@@ -555,20 +557,30 @@
 
 		// Note texCoords
-		osg::Vec2 tmpTexCoords = osg::Vec2(	_distortionSet->getDistortionMesh()->at(i).z()*_screenPixWidth,
-											_distortionSet->getDistortionMesh()->at(i).w()*_screenPixHeight );
+		osg::Vec2 tmpTexCoords = osg::Vec2(	tmpSrc.z()*_screenPixWidth,
+											tmpSrc.w()*_screenPixHeight );
 		texCoords->push_back(tmpTexCoords);
+		//OSG_ALWAYS<<"Transfering texcoord vertex : X:"<<tmpTexCoords.x()<<" Y:"<<tmpTexCoords.y()<<std::endl;
 
 		colors->push_back(osg::Vec4(1.0f,1.0f,1.0f,1.0f));
 	}
 
-	// Apply arrays
+	// --------- Apply Arrays -----------------
 	osg::Geometry* geom = _distortionSet->getDistortionInternals()->getChild(osgViewer::DistortionSet::MESH)->asGeode()->getDrawable(0)->asGeometry();
 
-	geom->removePrimitiveSet(0);
+	// If arraysize differs: Replace primite sets
+	bool regeneratePrimitiveSets = true;
+	osg::Vec3Array* prevArray = dynamic_cast<osg::Vec3Array*>(geom->getVertexArray());
+	if(prevArray) 
+		regeneratePrimitiveSets = prevArray->size()!=vertices->size()?true:false;
+	
+	// Set new Arrays
 	geom->setVertexArray(vertices);
 	geom->setTexCoordArray(0, texCoords);	// todo: 0 ist hardcoded und müsste durch getTexUnitScene() ersetzt werden
 	geom->setColorArray(colors);
-	
-	// Quads grid
+
+	// If required: regenerate primitiveset:
+	OSG_ALWAYS<<"PrimitiveSet regeneration required!"<<std::endl;
+	geom->removePrimitiveSet(0, geom->getNumPrimitiveSets());	
+	//// Create new primitives : Quads grid
 	unsigned int rows = _distortionSet->getDistortionMeshRows();
 	unsigned int columns = _distortionSet->getDistortionMeshColumns();
@@ -583,5 +595,3 @@
 		geom->addPrimitiveSet( de.get() );
 	}
-	
-	//geom->dirtyDisplayList();
-}
+}
Index: experimental/distortionNG/DistortionSetupStrategyProjectSyntropy.cpp
===================================================================
--- experimental/distortionNG/DistortionSetupStrategyProjectSyntropy.cpp	(revision 386)
+++ experimental/distortionNG/DistortionSetupStrategyProjectSyntropy.cpp	(revision 387)
@@ -387,9 +387,10 @@
 				for(int col=0;col<distortionMeshColumns;col++)
 				{
-					float x=col/distortionMeshColumns;	// Vertex X
-					float y=row/distortionMeshRows;		// Vertex Y
-					float z=col/distortionMeshColumns;	// TexCoord X
-					float w=row/distortionMeshRows;		// TexCoord Y
-					if(_distortionType==VERTEXDISTORTION || _distortionType==COMBINEDDISTORTION)
+					float x=(float)col/(float)(distortionMeshColumns-1);	// Vertex X
+					float y=(float)row/(float)(distortionMeshRows-1);		// Vertex Y
+					float z=(float)col/(float)(distortionMeshColumns-1);	// TexCoord X
+					float w=(float)row/(float)(distortionMeshRows-1);		// TexCoord Y
+
+	/*				if(_distortionType==VERTEXDISTORTION || _distortionType==COMBINEDDISTORTION)
 					{
 						x = vertexMeshVec2->at(row*col).x();
@@ -400,9 +401,15 @@
 						z = texCoordMeshVec2->at(row*col).x();
 						w = texCoordMeshVec2->at(row*col).y();
-					}
+					}*/
 
 					distortionMesh->at(row*distortionMeshColumns+col).set(x,y,z,w);
 				}
 			}
+
+			for (osg::Vec4Array::iterator it = distortionMesh->begin(); it != distortionMesh->end(); ++it)
+			{
+				OSG_ALWAYS<<"final vector: "<<(*it).x()<<" "<<(*it).y()<<" "<<(*it).z()<<" "<<(*it).w()<<std::endl;
+			}
+
 
 			distortionSet->setDistortionMesh(distortionMesh);
Index: experimental/distortionNG/main.cpp
===================================================================
--- experimental/distortionNG/main.cpp	(revision 386)
+++ experimental/distortionNG/main.cpp	(revision 387)
@@ -58,6 +58,6 @@
 // ---- test plugin read / write
 	//osgDB::writeObjectFile( *_distortionSet, "distortionset.dist" );
-	_distortionSet = NULL;
-	_distortionSet = dynamic_cast<osgViewer::DistortionSet*>( osgDB::readObjectFile( "distortionset.dist" ) );
+	//_distortionSet = NULL;
+	//_distortionSet = dynamic_cast<osgViewer::DistortionSet*>( osgDB::readObjectFile( "distortionset.dist" ) );
 // ------------ Test ende -----------
 
Index: experimental/distortionNG/resources/ProjectSyntropy/TexCoords/warpmap_2.csv
===================================================================
--- experimental/distortionNG/resources/ProjectSyntropy/TexCoords/warpmap_2.csv	(revision 387)
+++ experimental/distortionNG/resources/ProjectSyntropy/TexCoords/warpmap_2.csv	(revision 387)
@@ -0,0 +1,17 @@
+x;y;u;v;column;row
+-0.015;-0.1235;0;0;0;0
+0.3379;-0.0404;0.3448;0;1;0
+0.6616;-0.0442;0.6552;0;2;0
+1.0175;-0.136;1;0;3;0
+-0.0515;0.2985;0;0.3684;0;1
+0.3259;0.3981;0.3448;0.3684;1;1
+0.6795;0.3956;0.6552;0.3684;2;1
+1.0591;0.2885;1;0.3684;3;1
+-0.0787;0.5858;0;0.6316;0;2
+0.3174;0.698;0.3448;0.6316;1;2
+0.6916;0.6968;0.6552;0.6316;2;2
+1.0906;0.5784;1;0.6316;3;2
+-0.1138;0.9563;0;1;0;3
+0.3074;1.0774;0.3448;1;1;3
+0.7056;1.0778;0.6552;1;2;3
+1.1289;0.9518;1;1;3;3
Index: experimental/distortionNG/resources/ProjectSyntropy/Vertices/warpmap_2.csv
===================================================================
--- experimental/distortionNG/resources/ProjectSyntropy/Vertices/warpmap_2.csv	(revision 387)
+++ experimental/distortionNG/resources/ProjectSyntropy/Vertices/warpmap_2.csv	(revision 387)
@@ -0,0 +1,17 @@
+x;y;u;v;column;row
+-0.015;-0.1235;0;0;0;0
+0.3379;-0.0404;0.3448;0;1;0
+0.6616;-0.0442;0.6552;0;2;0
+1.0175;-0.136;1;0;3;0
+-0.0515;0.2985;0;0.3684;0;1
+0.3259;0.3981;0.3448;0.3684;1;1
+0.6795;0.3956;0.6552;0.3684;2;1
+1.0591;0.2885;1;0.3684;3;1
+-0.0787;0.5858;0;0.6316;0;2
+0.3174;0.698;0.3448;0.6316;1;2
+0.6916;0.6968;0.6552;0.6316;2;2
+1.0906;0.5784;1;0.6316;3;2
+-0.1138;0.9563;0;1;0;3
+0.3074;1.0774;0.3448;1;1;3
+0.7056;1.0778;0.6552;1;2;3
+1.1289;0.9518;1;1;3;3
