Converting quads to triangles

I'm starting to work on a plug-in project that will add AMD's open source version of ProRender as a render engine and was wondering what the most efficient way to convert quads was since the current implementation I'm working with only has native support for triangles. Any suggestions?

Comments

  • TotteTotte Posts: 13,965

    Hi! 

    I found this trick which I used in script test, which probably can work on DzFacets too (I haven't tested).

    The idea is, read the Facets, if they are quads

    turn them into tris using

    tri 1: oFacet.vertId1, oFacet.vertId2, oFacet.vertId3
    tri 2: oFacet.vertId1, oFacet.vertId3, oFacet.vertId4

     I tried it processing an exported OBJ but will "soon" try it directly on a DzFacet.

     

Sign In or Register to comment.