Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
Graphics Software

Mesh Compression for 3D Graphics 297

IanDanforth writes "A new algorithm that uses successive approximations of detailed models to get significant compression has been revealed by researchers at The University of Southern California. Just as MP3s remove high frequencies we can't hear, this algorithm removes the extra triangles in flat or near flat surfaces that we can't see. Experts in the field are giving this work high praise and imply that is will be immediately applicable to 3D modeling in games, movies, CAD and more."
This discussion has been archived. No new comments can be posted.

Mesh Compression for 3D Graphics

Comments Filter:
  • by Raindance ( 680694 ) * <johnsonmxNO@SPAMgmail.com> on Wednesday June 16, 2004 @11:37PM (#9448847) Homepage Journal
    I think this is interesting, but the analogy drawn between MP3s and this 3d-object compression is a bit strained.

    The MP3 compression routine revolves around 'frequency masking' much more than it does "remov[ing] high frequencies we can't hear". Most of the work in MP3 is done through 'frequency masking'. That is, imagine a graph of the frequencies being played at any given time- find the high points, then draw sloping lines down to either side of those points. Humans can't hear anything under those lines- they're 'masked' by the nearby strong frequency.

    Nothing very much like that goes on in this algorithm. There might be some other mesh-compression-analogous process that goes on in MP3 that's like this, but that ain't it.

    Sorry to nitpick, but I figured it's important that
    1. MP3 compression is not just simply throwing out high frequencies (a lot of these are actually retained) and
    2. This isn't anything analogous to that, anyway.

    Looking over my post, I'd have been fine if the submitter had said "Just as MP3s remove frequencies we can't hear, this algorithm removes..." but that's not very descriptive anyway.

    RD
  • Link to publication (Score:5, Informative)

    by j1m+5n0w ( 749199 ) on Wednesday June 16, 2004 @11:44PM (#9448890) Homepage Journal

    The actual paper can be dowloaded from here [usc.edu].

    -jim

  • by Anubis333 ( 103791 ) on Wednesday June 16, 2004 @11:48PM (#9448903) Homepage
    This is a great way to minimize scan data, but it isn't as useful as the article makes it out to be. Most modeled 3d objects are as low resolution as possible. Shrek has as many polygons as he needs to have, to take away some, or swap their location would destroy the model. For instance, I am a Modeler/TD and most animable character models have 5 divisions, or 'loops' around a deformable joint. Any less would not allow for the deformation control we need. As with most background scenery, it is modeled by hand and as low resolution as possible.

    This could come into more handy later if it is built into a renderer.

    A subpixel displacement renderer that can nullify coplanar polys in this way (though there arent that many usually in detailed oranic objects) it could speed things up quite a bit.
  • Abstract (Score:3, Informative)

    by j1m+5n0w ( 749199 ) on Wednesday June 16, 2004 @11:50PM (#9448911) Homepage Journal

    David Cohen-Steiner, Pierre Alliez, and Mathieu Desbrun

    To appear, ACM SIGGRAPH '04.

    Abstract: Achieving efficiency in mesh processing often demands that overly verbose 3D datasets be reduced to more concise, yet faithful representations. Despite numerous applications ranging from geometry compression to reverse engineering, concisely capturing the geometry of a surface remains a tedious task. In this paper, we present both theoretical and practical contributions that result in a novel and versatile framework for geometric approximation of surfaces. We depart from the usual strategy by casting shape approximation as a variational geometric partitioning problem. Using the concept of geometric proxies, we drive the distortion error down through repeated clustering of faces into best-fitting regions. Our approach is entirely discrete and error-driven, and does not require parameterization or local estimations of differential quantities. We also introduce a new metric based on normal deviation, and demonstrate its superior behavior at capturing anisotropy.

  • How new is this (Score:3, Informative)

    by SnprBoB86 ( 576143 ) on Wednesday June 16, 2004 @11:50PM (#9448915) Homepage
    The article is short on technical details but...

    While the algo may be new, the idea certainly isn't. Direct3D has built in support for optimized meshes, the ROAM algo http://gamasutra.com/features/20000403/turner_01.h tm is in wide use. In fact, pretty much all 3d gemoetric level of detail techniques rely on collapsing "flat" areas. The source data for the geometry can also compress geometric data with stuff like NURBS and other parametric surfaces which is probably much better than some sort of lossy compression. With the coming "DirectX Next", OGL 2, and newer video cards, parametric surfaces (read: infinite curve detail) will easily become the norm.
  • by Anonymous Coward on Wednesday June 16, 2004 @11:53PM (#9448944)
    I've played often with triangle meshes for various softwares. One thing that many do is to merge groups of adjacent triangles with the same surface normals. This is lossless, versus something like JPG. There are programs for POVRay that will do this, essentially iterating through the grid of triangles, calculating the normals, then merging.

    The POVRay mesh format is a good place to start if you want to learn about triangle meshes. Check the povray.org site for lots of good info.

    You can also do something similar to a discrete cosine transform on meshes. You don't gain on the rendering side which is what the article seems to be doing, but you could potentially decrease large file sizes by an order of magnitude.

    As for applications, who knows. Triangle meshes are often used for terrain maps; however, terrain is just as easily saved using some sort of height field.

    KLL
  • by MrBigInThePants ( 624986 ) on Wednesday June 16, 2004 @11:55PM (#9448951)
    You both should try reading the article:
    Computer scientists have struggled with the problem of finding an optimal mix of large and small elements for years. In 1998, theoreticians proved that the problem was "NP hard" that no general solution exists that can be solved by a computer in finite length of time. They did find work-arounds: fast methods to simplify meshes, which were unable to guarantee accuracy, and accurate techniques, which were too slow.


    The Desbrun teams novel approach comes from the seemingly unrelated field of machine learning using a technique invented in 1959 called Lloyd Clustering named after its inventor Stuart Lloyd. Desbruns algorithm uses it to automatically segment an object into a group of non-overlapping connected regions an instant draft alternative to the too-numerous triangles of the original scan.
    If you actually read it, it would be pretty obvious why this is new...sheesh!

    Also, game data is built of far fewer triangles and in a much easier form than raw data read from a real-life source. (such as a laser range finder)LOD mesh reduction is usually done by full or partial MANUAL selection.
  • No. (Score:5, Informative)

    by autopr0n ( 534291 ) on Wednesday June 16, 2004 @11:56PM (#9448961) Homepage Journal
    This isn't about compressing the data required to store a mesh, although it will help.

    This is about reducing the complexity of meshes so that they can render faster.
  • by Ibag ( 101144 ) on Wednesday June 16, 2004 @11:57PM (#9448975)
    While I can't say for sure that nobody has used this method before for 3D models, the article seems to suggest that this is slightly different than using differently optimize models. Instead, this seems to be a way to optimize the models so that they look good up close as well.

    The concept of lossy compression of 3D models might not be new, but that doesn't mean that the method for doing it isn't.

    Also, even if the problem were trivial for 2 dimensions, it wouldn't neccesarily be so in 3. The 2 body problem has a simple solution, the 3 body problem has no solution in elementary functions. Random walks are recurrent in 1 and 2 dimensions but transient in 3 or more. I can think of several other mathematical examples where the difference between 2 and 3 dimensions (or 2 and 3 objects) changes things completely.

    Don't judge unless you know you understand the subtleties of this algorithm compared to others :-)
  • This isn't new? (Score:5, Informative)

    by grammar fascist ( 239789 ) on Wednesday June 16, 2004 @11:59PM (#9448983) Homepage
    Un-disclaimer: I'm currently pursuing a PhD in machine learning.

    Yes, it is new. First of all, y'all need to read the article and find out how.

    It is for two reasons, both of which are stated:

    The Desbrun team's novel approach comes from the seemingly unrelated field of machine learning...

    Machine learning: getting a computer to generalize (invent hypotheses) given data instances. Work in machine learning has proven that generalization and compression are equivalent. That someone has applied those ideas to 3D model compression is at least notable.

    We believe this approach to geometry approximation offers both solid foundations and unprecedented results...

    In other words, it's not using some hacked-up heuristics. The bias behind the generalizations it makes are solidly described, and can be tuned. Machine learning consistently beats heuristics in accuracy, so their expectation of "unprecedented results" has a good foundation.
  • Hi (Score:2, Informative)

    by autopr0n ( 534291 ) on Thursday June 17, 2004 @12:01AM (#9449000) Homepage Journal
    I just wanted to let you know that you seem not to have any idea what you're talking about, and you definitely don't have any idea what the article is talking about.
  • Re:slow connections (Score:1, Informative)

    by Anonymous Coward on Thursday June 17, 2004 @12:04AM (#9449018)
    Because not everyone in every country has access to a good broadband infrastructure. I speak as an Australian who can't get broadband because Telstra has severly outdated infrastructure. Even if you can get access to their ADSL services, it tops out at 1500/256 kbs. It's not so bad if you're one of the 3 people in the country with access to the cable network (mostly owned by Telstra, 10% is owned by Optus/Singtel).
  • by pavon ( 30274 ) on Thursday June 17, 2004 @12:08AM (#9449037)
    Read the fine article. You are correct that mesh optimization has been a most popular MA/PhD thesis subjects for over two decades. Which is exactly why someone comming up with a method that is an order of magnitude better than any other previous method is big news.

    Also for all those questioning it's usefullness, you need not look any further than 3D scanning. When it comes to detailed models, very few things are done by scratch, instead the are digitized using one of many scanning techniques. This model is then massaged by hand by an artist. This technique would allow you to get a much better first cut, saving time for the artists.

    Lastly, quake and others generated meshes from smooth NURBS objects. This is quite different, and much easier than generating one mesh object from another. Those tequniques are not usefull for scanned objects where you start with a dense mesh object.
  • by uhlume ( 597871 ) on Thursday June 17, 2004 @12:09AM (#9449044) Homepage
    Quite simply, no. This may well help to lower the bar for rendering 3D graphics on low-powered hardware, which could indeed serve to speed the wider adoption of real-time 3D graphics on the web -- but it won't have anything to do with file size reductions in 3D models, which are negligibly small to begin with. This particular compression technique isn't aimed at smaller file sizes, but rather reductions in the complexity of 3d meshes: fewer triangles mean simpler geometry, resulting in increased rendering efficiency.
  • by Kiryat Malachi ( 177258 ) on Thursday June 17, 2004 @12:11AM (#9449058) Journal
    Actually, the primary brunt of MP3 focuses on perceptual coding; to put it simply, it uses a model of how important a given sound is based on its frequency and position in time. These 'importance' numbers are used to determine how much accuracy should be used to store the specific time/frequency you're looking at. More accuracy, more bits, less accuracy, less bits.

    You're thinking of the video versions, which work the way you described (to my knowledge; they probably also do some perceptual stuff, but I'm not familiar with video perceptual coding).
  • by notAyank ( 597271 ) on Thursday June 17, 2004 @12:23AM (#9449098)
    Yes, IIRC gif86 and gif89a were the 2 gif formats and the numbers represented the year the formats were created
  • by Port-0 ( 301613 ) on Thursday June 17, 2004 @12:24AM (#9449100)
    I think the Flight Gear Fight Simulator [flightgear.org] has been using this technique for 5 years or so to model the terrain of the earth.

    This may not be exactly right, but The terrain starts as a regular grid of datapoints take from DEM data which is interpolated into an irregular grid of points within certain error constraints, which preserves the contour of the scenery but drops the number of triangles needed. This has the effect of dropping out datapoints in the middle that don't contribute anything:

    A quote from a paper [flightgear.org] on the Flight Gear Web Sight:

    An irregular grid can often represent the same level detail as a regular grid with 4-6x fewer polygons. This is very desirable in a flight sim where both detail and rendering speed is very important.
  • by JessLeah ( 625838 ) on Thursday June 17, 2004 @12:31AM (#9449129)
    No offense, but you obviously don't know a hill of beans about what the article is about. It is about "lossy" compression, like MP3 compression for audio, or JPEG compression for images, or MPEG compression for video. Lossy compressed 3D images would look worse-- not better-- than uncompressed 3D images.
  • by WasterDave ( 20047 ) <davep@z e d k e p.com> on Thursday June 17, 2004 @01:05AM (#9449247)
    they probably also do some perceptual stuff, but I'm not familiar with video perceptual coding

    They do. Your eyes have better resolution when dealing with luminosity than colour, and also detect lower frequency changes better than high frequency ones. JPEG uses both these effects, as do all video compressors AFAIK.

    Cheers,
    Dave
  • No. Re:No. Re:No. (Score:5, Informative)

    by YOU LIKEWISE FAIL IT ( 651184 ) on Thursday June 17, 2004 @01:10AM (#9449261) Homepage Journal

    Skimming the article, this just seems to be polygon aggregation on the model ( not HSR, which is certainly not what grandparent was implying anyway ). It's certainly not a method for compressing the stored mesh, it's just discarding arguably redundant detail.

    Desbrun explains that his accomplishment was to simplify such a mesh, by combining as many of the little triangles as possible into larger elements without compromising the actual shape. Nearly flat regions are efficiently represented by one large, flat mesh element while curved regions require more mesh elements.

    ( My emphasis ). I was pretty sure this was nothing new, although I'm sure a general case algorithm, let alone a fast and accurate general case would be novel. But I was writing polygon aggregation code for my undergraduate computer graphics subjects ( much simpler meshes though ), and I would expect anyone with any CSG education to not confuse the subject matter with an actual storage optimisation.

  • by grammar fascist ( 239789 ) on Thursday June 17, 2004 @01:35AM (#9449358) Homepage
    Nice rant. See my earlier post [slashdot.org] on why this is new and cool.

    "It has a strong formal basis. You can make up extreme cases that will trick it, but for ordinary shapes, it works remarkably well."

    Cool, Shrek 3 will be nothing but primitives! Move along, nothing to see here...

    Ordinary != primitives. Ordinary = things you generally find in reality. That would be faces, bodies, hands, everyday objects like trees, toasters and television sets...

    The technique is borrowed from machine learning (which is my current area of study, so I feel I have some understanding of it). You can regard what they're doing as generalizing (the aim of machine learning), which is always prone to error when presented with pathological cases. In other words, if you try really, really hard, you can invent cases which it utterly fails at, but it just doesn't happen in normal practice.

    (For a human analogy, consider those weird optical illusion drawings: they're pathological cases that throw your brain out of whack. But in practice, you really don't need to be able to quickly and correctly analyze those sorts of things.)
  • by Jerry Talton ( 220872 ) on Thursday June 17, 2004 @01:44AM (#9449389) Homepage
    In 1998, theoreticians proved that the problem was "NP hard" that no general solution exists that can be solved by a computer in finite length of time.


    Wow. That's pretty far from what "NP hard" actually means.

  • by Anonymous Writer ( 746272 ) on Thursday June 17, 2004 @02:57AM (#9449669)

    I could have sworn that someone came up with a format for streaming 3D on the web ages ago. No, not VRML, something else. I just tried to do a Google search for it, but came up with too many results [google.com]. It was supposed to allow 3D content on the web to take off as well.

    VRML was supposed to do that, for that matter, and has been around since around 1996. I think 3D has never really taken off on the web because of the way you have to navigate through 3D worlds. I recall navigating through VRML was a real pain with a mouse. If they found some way of automating walkthroughs with just one click when they first introduced it, then maybe it would have been more popular. I haven't followed VRML it since its introduction, so I don't know if it now has automated walkthroughs.

  • by Anonymous Coward on Thursday June 17, 2004 @08:38AM (#9451140)

    The immediate problem that springs to mind for me is that current graphics cards and APIs don't produce good shading effects when the geometry is turned down. Gouraud shading (color-per-vertex interpolated across the face of the triangle) is the best that hardware acceleration will handle right now, and turning down the number of vertices will lead to problems with detailed color operations under normal circumstances (complicated lighting/shadow effects, etc.)


    i see, you are not in the field but rather stuck with textbooks from 1996.

    low poly with dot3 or other pixelshader based lightning models is currently all the rage because the xbox and ps2, while having a fast graphics part, are memory and cpu limited.

  • by Mac Degger ( 576336 ) on Thursday June 17, 2004 @08:54AM (#9451270) Journal
    You've never had to make LODs for a game model, have you? An efficient algorithm that does this well (ie without producing odd looking things) will save time and money.
  • by baxissimo ( 135512 ) on Thursday June 17, 2004 @09:31AM (#9451657)
    As others have pointed out this is a new solution to a classic computer graphics problem. The first technique I know of to automatically reduce the poly count of meshes, while preserving the overall appearance was Garland and Heckbert's QSLIM [uiuc.edu] algorithm. This was first published in SIGGRAPH 97 [uiuc.edu]. Or actually, hmmm, no, it looks like Hoppe's work on mesh optimization [microsoft.com] came a good bit earlier (1993).

    Anyway, it's a pretty old problem in graphics. The USC press release that prompted this slashdot story is simply advertising Cohen-Steiner, Alliez, and Desbrun's paper [usc.edu] which will appear at SIGGRAPH 2004 [siggraph.org] later this summer. That's all it is. They have a new way to do automatic poly reduction. Now it could be that it's vastly superior to anything else that's been done in the area, but even if so, this isn't likely to cause any revolutions. Why? Because the existing poly reduction algorithms already work pretty well. They work well enough that they're already in production use (as others have pointed out there are plugins for most major 3D packages already, and most game engines have had "continuous level of detail" systems for a good long while). So at best this is going to make life easier for some 3D content creators who won't have to do so much hand-tweaking of LODs (levels-of-detail, aka "optimized" meshes). So don't expect to see any huge changes in the games you play or movies or whatever because of this. Mesh optimization/LOD techniques are already being used pretty much everywhere it make sense to do so.

    But here's an idea for all you Karma Whores out there: go to the list of papers [siggraph.org] on the SIGGRAPH 2004 web site (or go to Tim Rowley's easier to browse version of the list [brown.edu]), pick something that looks interesting, and send the story to slashdot [slashdot.org]! There's at least 50 more slashdot stories there just waiting to burst! Happy hunting! There's enough Karma for everyone, so don't be greedy now.
  • by Arkaein ( 264614 ) on Thursday June 17, 2004 @12:01PM (#9453221) Homepage
    Because the linked article was a little light on details, and because 90% of the posts in this discussion either have very little understanding of what techniques exist in 3D mesh optimization, I thought I'd actually skim the paper (linked to in an above comment) and describe a summary of why this new technique is innovative. I studied the basics of Computer Graphics why working for my BS in CS and worked for several years on a project where I wrote code to triangulate and decimate (i.e. reduce triangle count) for range data, so I do have an idea of what I'm talking about here.

    First of all, as many posts have stated there are wuite a few algorithms out there for mesh optimization. Two of the classic techniques were developed by Schroeder and Turk.
    Schroeder's method [columbia.edu] (PDF) is fast and is able to reuse a subset of the original vertices, but the quality is not great. Essentially, the mesh is simplified mainly by collapsing edges (eliminating two triangles for each edge collapsed) in the flattest parts of the mesh.

    Turk's method [gatech.edu] (PDF) is more accurate, but cannot reuse the original vertices. Basically a new set of vertices are scattered across the original surface, forced to spread out from their neighbors. The amount of local spreading or repulsion is determined using local curvature, allowing greater point density where curvature and therefore detail is high. A new mesh is generated through these points using the original as a guide.

    Further work has been done to create progressively decimated meshes, much like progressive JPEG images work. A model sent over the web could be displayed in low resolution very quickly while the bulk of the geometry is still in transit. Methods for this tend to be colser to Schroeder's approach because obviously it is desirable to reuse the existing data at each level of representation.

    This new method is quite a bit different. It clusters triangles into patches that can be represented simply. These patches are optimized iteratively. Finally a new mesh is created, using the pathces as partitions and reusing vertices where the partitions meet.

    Some benefits to this method:
    • High Accuracy: The total surface deviations are small, and the partitions fit very well to the contours of the original surface
    • Speed: the method is apparently reasonably fast, though not as fast as greedy methods
    • Ability to allow user interaction for variable refinement of specific regions, without requiring it in general cases
    • Iterative process means that in time constrained situations a time/quality tradeoff can be made without modifying the algorithm
    • Possible fuure applications in animation and simulation by introducing a time variable into the partitioning process

    To me the potential animation capabilities and optional interactivity sound most interesting. Accurate decimation methods are already available that work well offline, and faster methods are available for online LOD management. Merging decimation with animation could lead to higher quality, lower computational cost 3D anmiation. Allowing high interactivity could help artists improve the aesthetics of scanned artifacts.

Work without a vision is slavery, Vision without work is a pipe dream, But vision with work is the hope of the world.

Working...