View Full Version : Hooks -vs- 5 pt patches

02 February 2003, 03:29 AM
Well I have been doing some tests lately with 10.0g, mainly because some people were complaining about holes in their models when exporting using my .OBJ exporter (as well as other exporters).

It seems that Hash treats hooks and 5 pt patches *very* differently in terms of how it breaks them up into quadrangles. When exporting to .OBJ (for instance), Hash will break 5 pt patches into 5 quadrangles (basically putting an extra control pt between all the existing control pts, and 1 in the center. It uses these new control points as the sides to the quadrangles. Hash will simply break a hook into 2 quadrangles.

It also seems, in my simple tests, that hooks will render *a lot* better than 5 pt patches (when rendering in AM). With 5 pt patches, you seem to get some sharp edges.

Can anyone who know this stuff tell me if this is true? Are hooks a better way to go than 5 pt patches in general?

Roger Eberhart
02 February 2003, 04:32 AM
Hooks and 5 point patches solve two different problems. Hooks solve the problem of going from high detail to low detail. 5 point patches solve the problem of two different edge loop patterns meeting (an arm joining a torso for instance). If you don't use 5 point patches in these instances then you end up with three point patches or intersections of more than two splines. In either case the output will look far worse than a 5 point patch. The key with five point patches is to try to get them somewhere relatively flat.

As someone who works in the game industry, the way five point patches are subdivided makes my skin crawl. At my job, polycount is always important. The most efficient way to break up a five point polygon is with three triangles. Of course, I doubt this would work very well with Hash patches, since they don't handle triangles well at all. Also, the way the software chose to triangulate could result in either a convex or a concave surface (it would have to guess). That is why programs like 3ds Max have a turn edge command, for when the computer guesses wrong.

02 February 2003, 05:25 AM
Even three-point patches don't solve the problem. Any attempt to work around five-point patches will use broken splines somewhere in the area, sometimes including a three-point patch (say, connecting two points of the potential five-point patch with a single straight spline segment.)

As long as the splines are continuous, three-point patches cause very little difficulty in AM renders (though they don't work for export.)

02 February 2003, 09:20 AM
Does someone know why hash doesn't use 3 triangles for 5 pt patches? Did they in the past (I know they've changed how they treat 5 pt patches when they break it up). What were the problems then?

02 February 2003, 12:47 PM
For what it's worth, the AM exporter exports hooks & 5PP differently depending on if it's a poly export or a patch export. I remember that Patch exports (like AV2 I believe) seem to look better when exported. I don't remember if they used a square and triangle, but it did look better than the same section exported as a poly model.

I'm not sure what the reasoning is for how Hash exports them. I think they don't use three triangles because of an increased crease on export.

I'm working on a way to fix this on export for AMXtex (my DirectX .X exporter). If/when I get something working, I'll share my results.

CGTalk Moderation
01 January 2006, 01:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.