Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - iguatemi

#1
Support / Vertices order when adding triangles.
January 06, 2017, 06:46:35 PM
What is the order in which the vertices are sorted to the object3d when using addTriangles?

For example, if I addTriangle(vertex1, vertex2, vertex3), will the vertices be stored in the mesh in the order vertex1, vertex2, vertex3? Is there some logic to it or is it case-by-case?
#2
Hi, does anyone know why does Object3D.build appear to create more unique vertices? This is getting me into trouble when skinning.


Mesh aMesh = anObject.getMesh();
System.out.println("Before build");
System.out.println("Mesh Vertices: " + aMesh.getVertexCount());
System.out.println("Mesh Unique Vertices: " + aMesh.getUniqueVertexCount());
System.out.println("Mesh Triangles: " + aMesh.getTriangleCount());

System.out.println("After build");
anObject.build();
System.out.println("Mesh Vertices: " + aMesh.getVertexCount());
System.out.println("Mesh Unique Vertices: " + aMesh.getUniqueVertexCount());
System.out.println("Mesh Triangles: " + aMesh.getTriangleCount());


Output

Before build
Mesh Vertices: 4644
Mesh Unique Vertices: 786
Mesh Triangles: 1548
After build
Mesh Vertices: 4644
Mesh Unique Vertices: 794
Mesh Triangles: 1548