PathExtrude Texture Overlap Artefacts

Software: Away3D 4.x

iansen, Newbie
Posted: 15 July 2013 11:00 AM   Total Posts: 17

Hello,

I’m trying to build a flat racing track (in one plane) using PathExtrude. Here’s what I’m doing:

var data:Array = [952134308.00551727857004290.50203120837622521.01103455714012,47.00406241675244521.0110345571401247.00406241675244570237600.54017271459112,76.5891127781736600.5401727145911276.58911277817366242107647.45982728540892,137.41088722182639647.45982728540892137.410887221826396782177716.88704209801522,145.5707467974946716.88704209801522145.5707467974946787.5288.5858.11295790198482,31.429253202505407858.1129579019848231.42925320250540789720935.27431353954082,32.17261138106329935.2743135395408232.17261138106329966258996.72568646045922,83.82738861893671996.7256864604592283.82738861893671103521161083.34632206770332,128.75276999423671083.34632206770332128.7527699942367128921831494.65367793229672,237.24723000576331494.65367793229672237.2472300057633154322501569.4999470001592,292.39991520025441569.4999470001592292.39991520025441580.523101591.5000529998412,327.60008479974561591.5000529998412327.6000847997456161823701611.46959590039362,419.57170384701181611.46959590039362419.571703847011816072453.51602.53040409960642,487.42829615298821602.53040409960642487.4282961529882159625371546.0586661002092,539.42139800726261546.0586661002092539.4213980072626143125451315.9413338997912,550.57860199273741315.9413338997912550.5786019927374126625531216.86163007944672,543.75767336917491216.86163007944672543.75767336917491106.52523996.13836992055342,502.24232663082506996.13836992055342502.242326630825069472493908.60168158659632,460.9754915256633908.60168158659632460.9754915256633823.52390738.39831841340372,319.0245084743367738.39831841340372319.02450847433677002287650.64472611262082,295.0035579276831650.64472611262082295.00355792768316262299601.35527388737922,302.9964420723169601.35527388737922302.99644207231695522311540.00763352630322,359.5405309649632540.00763352630322359.54053096496325312396521.99236647369682,432.4594690350368521.99236647369682432.45946903503685102481460.64534799368272,489.00739191842905460.64534799368272489.00739191842905340.52508.5220.354652006317282,527.9926080815709220.354652006317282527.99260808157091712536133.588281027003462,502.82827584394306133.588281027003462502.82827584394306962469.558.411718972996542,436.1717241560569458.411718972996542436.1717241560569421240321.7388355801257162,353.0054590781599621.7388355801257162353.0054590781599622.6514299895814622291.2532373716544523.564024399037212,229.5010156651489723.564024399037212229.5010156651489724220023.52,170.523.52170.523.252155.75232,141];   ];
  
 var 
pathData:Vector.<Vector3D> = new Vector.<Vector3D>();
for(var 
i:uint 0;i<data.length;i+=3)
  
pathData.push(new Vector3Ddata[ i]15  8,  data[i+2] 15));

 var 
_path:QuadraticPath = new QuadraticPath(pathData);      
 var 
profile:Vector.<Vector3D> = new Vector.<Vector3D>();
 
profile.push(new Vector3D(-620,0,0));
 
profile.push(new Vector3D(620,0,0));

var 
_pathExtrude:PathExtrude = new PathExtrudeAsfaltMaterial _pathprofile,32  ,falsetruetruefalse,true,falsefalse);
_pathExtrude.distribute=true;
_pathExtrude.distributeU true;
scene.addChild(_pathExtrude); 

It works fine for curves (angles) > 90 but for smaller ones the textures of the segments overlap and I get something like in the attached image.
What am I doing wrong?  I’ve tried playing around with PathExtrude’s params but can’t figure it out.
I would appreciate any advice Away3D related or math/quadratic path/ Bézier curve related.

Thanks.

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X