Is MeshHelper.invertFaces() working for you?

Software: Away3D 4.x

johnbot81, Newbie
Posted: 23 July 2013 04:55 PM   Total Posts: 2

Hi everyone,

i’d be really happy if you could tell me if MeshHelper.invertFaces() is working for you.
And by working i mean:
Show the inside of a primitive (a cylinder in my case) by hiding the front of the cylinder, respectively hiding the faces that are closest to the camera (which has an orthogonal lens in this particular case, fyi) and should be now facing away.

The Material (i tried a simple ColorMaterial and TextureMaterial) is one sided, but i tried bothSides, too.

There are no lights in the scene.

Should i update to 4.1.4 gold? I’m currently at 4.1.1 Beta.

I’d really appreciate a hint.

Thank you very much.

jb81

   

John Brookes, Moderator
Posted: 23 July 2013 06:11 PM   Total Posts: 732   [ # 1 ]

Previously you would probably have to convert the geometry before using meshHelper
eg
mesh.geometry.convertToSeparateBuffers();
MeshHelper.invertFaces(mesh);


Now
MesHHelper works in 4.1.4

   

johnbot81, Newbie
Posted: 24 July 2013 09:13 AM   Total Posts: 2   [ # 2 ]

Yay, convertToSeparateBuffers() did the trick!

Where would one find such valuable information? I could never have come up with this by myself.

Thanks again, dear JohnBrookes!
I’m really grateful.

   

John Brookes, Moderator
Posted: 24 July 2013 09:54 AM   Total Posts: 732   [ # 3 ]

Just to explain…
Away, now (for about 8 months) has two types of subgeometry. CompactSubGeometry and SubGeometry.
The difference is compact has all the uv, verices, normals etc in one vector.
And the old SubGeometry has them in separate vectors.

All the primitives are now by default CompactSubgeometry.
CompactSubGeometry is the better one to use for most situations, thats why its the default.

SubGeometry you would use if your upating one of the vectors (eg vertices) frequently.
Basically its all about uploading the geometry to the GPU and speed.

MeshHelper used to only work with subgeometry and not compact.
So the hack was to convert the geometry.

This has been fixed, so update smile

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X