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 Fri, 10 August 2001 at 8:54 AM

AA said ".OBJ format as defined for Wavefront does carry that information:...But Poser ignores these vt and s lines" (elipses mine). I think you mean that Power ignores the "vn" vertex normal lines. It certainly uses the "vt" texture lines. Vertex normals are of no use to a mesh deformation program like Poser. Every time you pose a figure, you alter the orientation of the faces (changing their face normals) and their size (and a "good" vertex normal is computed from a weighted average of face normals) so every time you pose, you need to recompute the vertex normals. The .obj format doesn't have a real concept of "edges". The "smoothing group" lines work at the "face" level, you still have to do a lot of computations to find out if an edge is a crease, or a dart or a corner. (I use Hoppe's terminology). IMO, smoothings groups were a major "hack" and should never have been part of the .obj format. "I treat the face's normal as bring at right angles to the plane of the face, and I do not directly consider the directions of the edges." Well, the definition of a normal is that it is perpendicular to the plane of a face. The "normal" way of calculating a normal is the cross product of two vectors that lie in the plane. For a triangle, any two edges are vectors defining the plane, and should yield exactly the same normal, given sufficient mathematical precision. The problem is that the cross product involves multiplying components of the vectors, then adding them, something you don't want to do in floating point. If the products of the multiplications vary greatly in magnitude, then the addition produces substantial errors in a reduced precision (real time or fast math) environment. So you want to pick the "right" two of three possible edges for calculating your normals. It's fairly common to do a simple comparison of edge lengths before calculating a normal. And you really should consider the direction of the edges, lest your normal point inside the object, instead of outside. "I wish that Poser had a user-settable maximum smoothing angle like Bryce has" The "user settable smoothing angle" is as archaic as making "sharp" edges by "unwelding" geometry. For a human model, you will find places where a fairly sharp corner (maybe 30 degrees) is still something that should be smoothed (posettes fingers are full of thise spots) yet a shallower angle (lip edges, for example, or areola) is a "crease" that must be preserved. And there are places where edges disappear into flat surfaces (darts) that you simply can't find with a smoothing angle. But, if you really want it, Nate Robbins has some nice source code for software that applies variable smoothing angles. And it's a nice starting point for openGL, which you really need to get into. Fair warning, his algorithm is O(n^2), and you can reduce to O(n*log(n)) simply by sorting all the verticies by their x, then y, then z coordinates, and using the sorted list as a rough guide for the distance detection function. http://www.xmission.com/~nate/smooth.html "That likely depends on how likely it is that that particular cylinder-end or drum-end will ever be rendered with a pattern using the vt values (which in Bryce is called "parametric mapping"), rather than all the same color." Always plan on texture mapping and making sure your geometry will support a texture map well. Even if you don't use such a map yourself, your renderer will, when rendering the image. Renderers create tons of maps, shadow maps, lighting maps, radiosity maps. If the figure has a texture map, they use it. If not, thet apply a basic mapping algorithm like cube or spherical mapping. Most indespensible book I have right now: Real-Time Rendering, by Tomas Mler and Eric Haines, ISBN 1568811012. This book probably does a better job of explaining just about everything you need to get a major 3D app together than just about anything else I've seen. The book has its own web site: http://www.realtimerendering.com/ Another goodie: Digital Character Animation 2 : Essential Techniques, George Maestri, ISBN 1562059300. This book is wonderful. Explains things like mesh deformations, character creation, and the basica of animation, in a totally software independent way. It's as applicable to Poser as it is to Max and Character Studio. The "2" refers to it being the second edition, not the second volume of a set. And I've got to send you to Hugues Hoppe's homepage. Sorry, Hugues is at Microsoft these days, but they host all his cool stuff, including his doctorial thesis. Many book length .pdf files you can download. Some of the most clear and lucid explanations of subdivision surfaces, mesh simplifications, and surface reconstruction that I've ever seen. http://research.microsoft.com/~hoppe/ And I'm still working my way through your MakeObj source. Your coding style and mine are so different that reading your code is slow going for me. (Your code isn't necessarily better or worse than mine, just really different). But we've got to get you using openGL, and maybe wxWindows. If you've never written a GUI based 3D application, and had the same code compile on Windows, Linux, an SGI, and a Mac, you just don't know what you're missing. Have fun. Joe