gregtatum / quads

https://www.npmjs.com/package/quads
MIT License
35 stars 0 forks source link

Add subdivision option for quads -> triangles #2

Open rreusser opened 7 years ago

rreusser commented 7 years ago

When I convert quads -> triangles, I sometimes split quads into four triangles instead of two since that removes the choice of which direction to split (which tends to cause particularly ugly artifacts due to the anisotropy). Do you think that would be a reasonable option? Could just use the average of the four corners.

rreusser commented 7 years ago

Sample implementation here which also accepts a set of attributes it will triangulate alongside. It basically appends the midpoints of the quads to the positions and reworks it into tris. This seems like a separate function since it creates separate geometry (should potentially also reorder for memory locality).

gregtatum commented 7 years ago

Works for me, I should probably rename my usage of quads with mesh like you have here. It's much clearer.