Generating Patches from Polygons
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
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.
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement