Forum: Poser - OFFICIAL


Subject: Huge geometry files :: a complaint about Ray Dream Studio

Anthony Appleyard opened this issue on Aug 09, 2001 ยท 18 posts


wiz posted Thu, 09 August 2001 at 12:16 PM

I agree that what you've shown isn't anything that I would call "sensible". But I don't think it's "sensible" to do it the way you describe (a whole bunch of really thin "pie wedges") either. Texturing algorithms behave very badly when you have a bunch of really sharp triangles coming together at one point, and that causes a number of unpleasant artifacts. The example you've pictured would make the end from 64 "pie wedges", each with about a 6 degree point. There will be a "spider web" distortion in the center of the textured end. And "pie wedges" are hard on the lighting algorithms, too. The sharper the point, the more errors can arise in calculating a vertex normal at that point. So, if attempting to calculate a face normal, you have to know not to use the "sharp" vertex of the triangle, or there will be errors in the normal, and the lighting algorithm won't illuminate all the "pie wedges" evenly. Cutting up polygons into simpler shapes (triangles and quads) in an optimal manner is refered to as "tessilation", and is one of the hardest problems in computer graphics. It's something that sounds like it should have been solved long ago, but isn't. If you want a more "optimal" tessilation for that end cap, something that will render well, but doesn't take up too many polygons, try this: Start your end cap with a 64 side polygon, like the outer edge. Inside this polygon, draw a 45 side polygon, and connect each vertex of this polygon to either one or two vertices of the outer polygon. Now, you have an annular strip with 45 quads and 19 triangles. But none of the triangles are very sharp. Inside the 45 side polygon, draw a 32 side polygon, and connect them with an annular strip of 32 quads and 13 trianges. Keep this up, a 23 sided polygon, then a 16 sided, an 11 sided, an 8 sided, and a 6 sided polygon. The edges of that can meet at a center point which will only have 6 edges meeting at it. This would yield a 173 face end which would render better than your 64 face version, and better than the original 512 face version, which also suffers from having a bunch of sharp angled facets near the center. My tessilation also works well with mesh deformation algorithms. So I guess my algorithm (which is order of n*log(n)) is the "happy medium" between the original algorithm (order n^2) and yours (order n). Going back to your example above, there is an obvious reason why the yellow part isn't welded to the white part. Look carefully. There are more vertices in the inner border of the white region than there are in the outer border of the yellow. Welding them would mean that some of the yellow quads would become degenerate pentagons, with one side straight. This is, mathematically, very bad. The degenerate vertex has an undefined normal (you end up dividing by zero, if you try to calculate it). But, as I've shown, there are much better tessilations availiable. I would expect a "sensibly written" modeller to allow edges to carry infomation, so an edge could be labeled as smooth, or a crease, an edge, or a dart. A real "object" should be one "surface", so it can have an "inside" and an "outside" and properties like "volume" and "surface area". This whole bit about corrupting the geometry by "unwelding" edges to control how they render is archaic. Labeled edges are so useful. Aside from making it easy to "make sure the join renders sharp", labeled edges allow you to preserve sharp joins when using refinement techniques like subdivision surfaces, or compression techniques like progressive meshes. And they've been well documented for years. What you've shown us doesn't look like a RayDream tessliation. I think RD's normal cylinder end is a triangle fan from one of the edge vertices (not fron the center, like you qould do). The fan from the edge really causes some ugly texturing artifacts. As far as RayDream, it does a lot of things in strange ways, in order to make its deformers work. But it's very inconsistant in the way it makes these decisions. Ciao! Joe