Archived

This topic is now archived and is closed to further replies.

Generating Patches from Polygons

This topic is 5618 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi, i´ve been concerning with creating patches from polygons for radiosity purposes. for rectangular polys, this is no problem, but how to make patches from triangles, etc? thanks Gammastrahler

Share this post


Link to post
Share on other sites
Rectangular patches are the easiest to create, because all you need to do is create two planes that are perpendicular to the polygon and perpendicular to each other, and then then generate rectangles in a loop, using the two planes to splut the polygon. If you want, you can break the regtangles into triangles.

Share this post


Link to post
Share on other sites
quote:

for rectangular polys, this is no problem, but how to make patches from triangles, etc?


If you settled using rectangular patches for your radiosity engine, then it''s better to stay with them throughout the whole scene (and not mix rectangular with triangular patches, or similar). It will give you a more consistent and visually appealing result.

To create patches from a triangle is just as easy as from any other planar polygon: imagine a grid put over your triangle, just as if you would texture map it. Each grid cell (or texel, for the texture map analogy) would be a patch. Some grid cells will be outside of the triangle, they don''t need to be considered in the radiosity process. Other patches will be partially covered, since the triangle outlines will cut through them. In that case, you need to compute the area covered by the triangle, and adjust the patch area in your formfactor calculations accordingly.

/ Yann

Share this post


Link to post
Share on other sites