Spline patches

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
jsgf
Posts: 254
Joined: Tue Jul 12, 2005 11:02 am
Contact:

Spline patches

Post by jsgf »

As a follow up to the experimentation I did with bezier surfaces last week, I've been playing with spline patches.

Spline patches share some similarities with bezier patches: you feed the hardware a u x v control mesh, and it draws a smooth surface. Unlike bezier patches, the surface is smooth over the whole patch, rather than being divided into 4x4 sub-patches.

Each edge of the spline patch has a flag associated with it, which says whether its an "inner" or "outer" edge. Inner edges are intended to be drawn abutting another spline patch, and maintain a smooth surface (C1 continuity); you need to draw the abutting spline patch with 3 rows of control points overlapping (inner edges are drawn out to the second-last row of control points). Outer edges go all the way to the edge of the control mesh.

Interestingly, outer edges are drawn with the same number of vertices as inner edges; they're just stretched out.

The subdivision of the patch into triangles is controlled with the same register as for bezier patches: #54, but it is interpreted slightly differently. For bezier patches, each parameter is how many pieces the 4x4 patch is divided into; for spline patches, it controls the subdivision on a 1x1 control-point basis.

I'm updating commands.txt and http://www.goop.org/psp/gl/ with the details.
Post Reply