All in all, they're pretty solid, and seem to be the most common used references for the .bsp format out there (which I am aware of).

Anyway, I'm having some trouble wrapping my head around the following statement (from the second link, in the Faces section):

For type 2 faces (patches),

vertexandn_vertexesdescribe a 2D rectangular grid of control vertices with dimensions given bysize. Within this rectangular grid, regions of 3×3 vertices represent biquadratic Bezier patches. Adjacent patches share a line of three vertices. There are a total of (size[0] - 1) / 2 by (size[1] - 1) / 2 patches. Patches in the grid start at (i, j) given by:i = 2n, n in [ 0 .. (size[0] - 1) / 2 ), andj = 2m, m in [ 0 .. (size[1] - 1) / 2 ).

From what I gather, the author states that, since adjacent patches share a line of three vertices (with each patch having 9 control points each), we can use the (i, j) indices to find a total of 9 shared control points from the total number of vertices, which are then used for the triangulation.

However, I'm not sure what the "2n/m, n/m" bits actually mean in the bold portion. Can someone clarify this?

The current rendering implementation does the following for the patches:

else if ( face->type == FACE_TYPE_PATCH ) { const int subdivLevel = glm::min( 10, glm::abs( 10 - ( int )glm::distance( pass.view.origin, boundsCenter ) ) ); const int controlStep = face->numVertexes > 9 ? face->numVertexes / 9 : 1; int i = 0; for ( int j = 0; j < face->numVertexes; j += controlStep ) { patchRenderer.controlPoints[ i ] = &map->vertexes[ face->vertexOffset + j ]; i++; } patchRenderer.Tesselate( subdivLevel ); patchRenderer.Render(); }Note the controlStep: if we have more than 9 verts, we have to compensate and find 9 control points out of those vertices to send to the patchRenderer. As a result, we divide the number of vertices by 9, iterate through the loop, and use that quotient for the increment portion.

If we only have 9 verts, then all the vertices can be used, so we just increment by 1.

But I'm pretty certain that's the wrong way to go about it, since the control points are likely to be arbitrary and won't just be shared as multiples of 3 in the event that there is more than one region.

**tl;dr**

What is the proper way to attain the control points of the vertices, such that the amount of vertices is greater than 9,and given that the patchRenderer requires 9 control points exactly in order to tesselate the regions properly?

I appreciate any help.