jmspmesh

所属分类:GDI/图象编程
开发工具:Visual C++
文件大小:7158KB
下载次数:323
上传日期:2009-04-09 13:21:34
上 传 者eternalkk
说明:  网格简化代码,已在vs2008下调试通过,并带有debug版和release版的可执行文件
(mesh simplification code)

文件列表:
jmspmesh\apple.ply (50262, 1998-09-08)
jmspmesh\big_porsche.ply (323275, 1998-09-08)
jmspmesh\cat.ply (16668, 1998-09-08)
jmspmesh\cow.ply (177472, 1998-09-08)
jmspmesh\glmodelwin.cpp (10715, 2009-03-03)
jmspmesh\glmodelwin.h (3408, 2009-03-03)
jmspmesh\hind.ply (183106, 1998-09-08)
jmspmesh\huge_bunny.ply (3219850, 1998-10-03)
jmspmesh\main.cpp (15303, 2009-03-06)
jmspmesh\mesh.cpp (9704, 2009-03-11)
jmspmesh\mesh.h (2471, 2009-03-03)
jmspmesh\oglpmesh.dsp (5090, 2002-04-12)
jmspmesh\oglpmesh.dsw (539, 2008-12-27)
jmspmesh\oglpmesh.ncb (7375872, 2009-03-06)
jmspmesh\oglpmesh.opt (54784, 2009-01-06)
jmspmesh\oglpmesh.plg (36172, 2009-01-06)
jmspmesh\oglpmesh.sln (881, 2009-03-04)
jmspmesh\oglpmesh.suo (24064, 2009-03-06)
jmspmesh\oglpmesh.vcproj (9653, 2009-03-03)
jmspmesh\oglpmesh.vcproj.BYDHQ.zdd567568.user (1413, 2009-03-06)
jmspmesh\pmesh.cpp (32297, 2009-03-03)
jmspmesh\pmesh.h (7601, 2009-03-03)
jmspmesh\polydemo.aps (24964, 2009-03-03)
jmspmesh\polydemo.rc (8711, 2002-04-15)
jmspmesh\propslim.cpp (11647, 2009-04-09)
jmspmesh\resource.h (1880, 2002-03-10)
jmspmesh\triangle.cpp (2460, 2009-03-03)
jmspmesh\triangle.h (3822, 2009-03-03)
jmspmesh\vec3.cpp (737, 2009-03-03)
jmspmesh\vec3.h (3603, 2009-03-03)
jmspmesh\vertex.cpp (4819, 2009-03-03)
jmspmesh\vertex.h (8350, 2009-03-03)
jmspmesh\Release\BuildLog.htm (20802, 2009-03-03)
jmspmesh\Release\glmodelwin.obj (24698, 2009-03-03)
jmspmesh\Release\glmodelwin.sbr (0, 2009-03-03)
jmspmesh\Release\main.obj (78327, 2009-03-03)
jmspmesh\Release\main.sbr (0, 2009-03-03)
jmspmesh\Release\mesh.obj (257601, 2009-03-03)
jmspmesh\Release\mesh.sbr (0, 2009-03-03)
... ...

Jeff Somers allagash***@yahoo.com http://users.rcn.com/liusomers April, 2002 Mesh Simplification Viewer This program implements four different mesh simplification algorithms. After loading a mesh, the user can easily remove triangles from the mesh and the results are displayed in real time. The mesh can also be rotated and moved closer to or farther away from the viewer. The goal of mesh simplification is to display a 3D polygonal mesh with fewer triangles while retaining the same shape. In the example above, the original cow model (upper left) is made up of over 5800 triangles. We can easily remove thousands of triangles from this mesh and still display a very similar cow model. While the 500 triangle cow is a cruder representation, this may not make a difference if the cow is far away from the viewer. Why is mesh simplification useful? In a game, you may want to display a herd of killer cows, but you find that showing hundreds of cows, each with thousands of triangles, may take too long to display. Displaying so many triangles at once can result in a game which looks more like a slide show than a fast-paced action game. Therefore, what you want is an automated way to take high-quality models, and remove triangles from them without rendering the models unrecognizable. When the mesh has been simplified, you will be able display your herd of cows and not slow the computer to a crawl. Mesh Simplification Viewer Usage Open a mesh using the Open command on the File Menu. Use PageUp/PageDown to add/remove several triangles at a time from the mesh. Click the left mouse button & drag to rotate the mesh. Click the right mouse button and drag to move the mesh towards you or away from you. Compilation *** NOTE *** The Standard Template Library is needed to compile this program. I used STLport's version (www.stlport.org). Algorithms In this program, triangles are removed via edge collapses. An edge collapse always collapses one vertex to another vertex on the same edge. No new vertices are created. This program implements Garland & Heckbert's simplification algorithm. (http://graphics.cs.uiuc.edu/~garland/research/quadrics.html) (Surface Simplification Using Quadric Error Metrics, SIGGRAPH 97) Two versions of the Quadrics algorithm are implemented: a version weighted by the area of the triangles in the mesh and a version where the triangle areas are not taken into account. This program also implements Stan Melax's Polygon Reduction algorithm. (http://www.melax.com/polychop/index.html) (A Simple, Fast, and Effective Polygon Reduction Algorithm, November *** Game Developer Magazine) The final mesh simplification algorithm implemented is shortest edge first. The shortest edges within the mesh are the first ones to be removed. This is not a particularly good algorithm. It's just here for comparison's sake. Some of the OpenGL code is based on Jeff Molofee's OpenGL tutorials. (http://nehe.gamedev.net/) For more information Mesh Simplification algorithms, as implemented here, are also known as Level of Detail (LOD) or View Independent Progressive Mesh (VIPM) algorithms. (It's "view independent" because the point-of-view is irrelevant to how the mesh is simplified. Some mesh simplification algorithms take the viewer's location into account, and simplify the features farther away from the viewer before simplifying the features closer to the viewer). Academic Researchers Michael Garland, University of Illinois at Urbana-Champaign (http://graphics.cs.uiuc.edu/~garland/research/quadrics.html) Hughes Hoppe, a Microsoft researcher (http://research.microsoft.com/~hoppe/#newqem) Game Programmers Charles Bloom has articles on VIPM. He's a lead programmer at Oddworld Inhabitants (developer of Munch's Oddysee for the X-Box). (http://www.cbloom.com/3d/index.html) Jan Svarovsky has worked for both Muckyfoot and Lost Toys, which are British game companies founded by ex-Bullfrog folk. His article on Extreme Detail Graphics describes how progressive meshes and other level of detail techniques can be used in a game engine. (http://www.svarovsky.com/ExtremeD/extreme.doc) Tom Forsyth works for Muckyfoot. He has slides on his site from his talk on Subdivision surfaces, bumpmaps, displacement maps, and VIPM. (http://www.muckyfoot.com/downloads/tom.html) Both Svarovsky and Forsyth have written articles on mesh simplification in Game Programming Gems (http://www.charlesriver.com/titles/gamegems.html) and Game Programming Gems II (http://www.charlesriver.com/titles/gamegems2.html).

近期下载者

相关文件


收藏者