Help with FaceHelper

Software: Away3D 4.x

Avatar
theMightyAtom, Sr. Member
Posted: 17 August 2011 08:48 AM   Total Posts: 669

Mucking about with some mesh smoothing algorithms, I need to tessellate a mesh.
I’m trying with FaceHelper, but I always get an Error after the operation.

private function tessellateMesh(evt:Event):void {
   
// pause rendering
                         
pauseRenderer();
   
console.text "Triangles before tesselation: " String(_mesh.geometry.subGeometries[0].numTriangles);
   
// tessellate
   
FaceHelper.triFaces(_mesh);
   
console.text += "nTriangles after tesselation: " _mesh.geometry.subGeometries[0].numTriangles;
  


The tessellate button calls the above function.
http://www.videometry.net/broomstick/faces/ModelBrowser.html
You can see in the text field that the tessellation completes successfully, but if you press “play” to re-start the rendering loop, you get the following error.

RangeError: Error #3669: Bad input size.
at flash.display3D::VertexBuffer3D/uploadFromVector()
at away3d.core.base::SubGeometry/getVertexNormalBuffer()
at away3d.core.base::SubMesh/getVertexNormalBuffer()
at away3d.materials.passes::DefaultScreenPass/render()
at away3d.materials::MaterialBase/renderPass()
at away3d.core.render::DefaultRenderer/drawRenderables()
at away3d.core.render::DefaultRenderer/draw()
at away3d.core.render::RendererBase/executeRender()
at away3d.core.render::RendererBase/render()
at away3d.containers::View3D/render()
at ModelBrowser/handleEnterFrame()

I’m assuming it’s some buffer that doesn’t get reset, or similar.
Is there another command you have to use on a mesh after it’s been through a Face splitting operation? I have tried a few things but without success.

Should I log this as a bug?

Cheers!

   

Avatar
theMightyAtom, Sr. Member
Posted: 18 August 2011 07:27 AM   Total Posts: 669   [ # 1 ]

Any word from the devs on this issue?
Is there a working example of FaceHelper?

Cheers!

 

   

John Brookes, Moderator
Posted: 18 August 2011 03:29 PM   Total Posts: 732   [ # 2 ]

I dont get the error you get but I think triFace is a bit broke.
You get missing faces with this

var p:Mesh = new Plane(new ColorMaterial(0xff0000));
FaceHelper.triFace(Mesh(p), 00);
scene.addChild(p);
trace("Index Data "+p.geometry.subGeometries[0].indexData);
//Index Data 0,2,4,0,3,1,2,0,4,2,2,4
trace("Index Data "+p.geometry.subGeometries[0].indexData);
//vertexData -50,-50,0,50,-50,0,-50,50,0,50,50,0,-16.666666666666668,16.666666666666668,0 


Index data should be something like
0,2,4,  0,3,1,  0,4,3,  2,3,4

then it looks ok

 

   

Concept Z, Sr. Member
Posted: 18 August 2011 05:13 PM   Total Posts: 124   [ # 3 ]

I Got the same error under the 32bit debug player beta2 on my Win7 :

RangeErrorError #3669: Bad imput size.
 
at flash.display3D::VertexBuffer3D/uploadFromVector()
 
at away3d.core.base::SubGeometry/getVertexNormalBuffer()
 
at away3d.core.base::SubMesh/getVertexNormalBuffer()
 
at away3d.materials.passes::DefaultScreenPass/render()
 
at away3d.materials::MaterialBase/renderPass()
 
at away3d.core.render::DefaultRenderer/drawRenderables()
 
at away3d.core.render::DefaultRenderer/draw()
 
at away3d.core.render::RendererBase/executeRender()
 
at away3d.core.render::RendererBase/render()
 
at away3d.containers::View3D/render()
 
at ModelBrowser/handleEnterFrame() 

When i use Merge class to merge some meshes , i got the same error, i guess it’s the flash player bug ,it has very limited buffer size…the current built is limited to 128 buffer size, but not 256…i’m not very sure ...

 

 Signature 
signature_image

Anyone can cook but only the fearless can be great

   

John Brookes, Moderator
Posted: 18 August 2011 05:31 PM   Total Posts: 732   [ # 4 ]

Merge and beta 2 works fine for me.
Latest git version.

 

   

Concept Z, Sr. Member
Posted: 18 August 2011 05:40 PM   Total Posts: 124   [ # 5 ]

How many meshes are you trying to merge ? what’s the average poly num for each mesh ? What i tried is to merge 217 meshes extruded from point array…each mesh has only 12 ploys.it failed with bad imput size error .

 

 Signature 
signature_image

Anyone can cook but only the fearless can be great

   

John Brookes, Moderator
Posted: 18 August 2011 06:01 PM   Total Posts: 732   [ # 6 ]

Use a few merges in what im doing.
But the heaviest one would be 95 meshes various vert number, total 20634 vertices, single material.
So one subgeometry.

If your doing 217 materials (217 subgeometries) then maybe..

 

   

John Brookes, Moderator
Posted: 19 August 2011 08:32 AM   Total Posts: 732   [ # 7 ]

Same error
http://away3d.com/forum/viewthread/535/

Having the light seems to cause the error.
File a bug on Git
https://github.com/away3d/away3d-core-fp11/issues?sort=comments&direction=desc&state=open

 

   

Avatar
theMightyAtom, Sr. Member
Posted: 19 August 2011 09:33 AM   Total Posts: 669   [ # 8 ]

Will do John.

I tried without lights. I didn’t get the error, but is revealed another glitch.

 

   

John Brookes, Moderator
Posted: 19 August 2011 09:59 AM   Total Posts: 732   [ # 9 ]

Yeah thats what I was saying above.
Tri faces also has a bug.
You found two (applause) ))

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X