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.


Topics - iguatemi

Pages: [1]
1
Support / Vertices order when adding triangles.
« on: 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
Support / Object3D.build appear to create more unique vertices. Why?
« on: January 03, 2017, 05:51:49 pm »
Hi, does anyone know why does Object3D.build appear to create more unique vertices? This is getting me into trouble when skinning.

Code: [Select]
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
Code: [Select]
Before build
Mesh Vertices: 4644
Mesh Unique Vertices: 786
Mesh Triangles: 1548
After build
Mesh Vertices: 4644
Mesh Unique Vertices: 794
Mesh Triangles: 1548

Pages: [1]