Refresh your Memory: Advanced Graphics Algorithms 140
subtle writes "DevMaster.net has posted an interesting article about advanced graphics algorithms. The article discusses six widely used algorithms in graphics rendering of indoor and outdoor environments, namely: quad-based static terrain, Roettger's approach to continuous levels-of-detail in terrain, real-time optimally adapting meshes, portals, BSPs and PVSs. In each case the algorithm is discussed and some aspects of implementation are considered, as well as analyize each algorithm for its application in modern graphics systems."
It has revolutionized landscaping (Score:5, Funny)
I look forward to re-doing my back yard with a nice quadratic mesh algorithm with pseudo-fractal post-processing.
Re:It has revolutionized landscaping (Score:1)
Re:It has revolutionized landscaping (Score:2)
Re:It has revolutionized landscaping (Score:2, Interesting)
Home and Garden Network (Score:5, Funny)
Will they use quadratic?
Who knows!?!
Pure excitement...
Re:Home and Garden Network (Score:1)
Re:It has revolutionized landscaping (Score:2, Funny)
Downloaded from Nintendo (Score:3, Funny)
Yeah, but since it was a version I downloaded from Nintendo.com, I have to periodically spray for pokemon.
Re:Downloaded from Nintendo (Score:4, Funny)
Re:It has revolutionized landscaping (Score:5, Funny)
Re:It has revolutionized landscaping (Score:2, Funny)
One version would have this luscious female voice say "Reticulating Splines" whenever the game generated a new topology.
Anyone know if the Windows version works well under WINE?
Re:It has revolutionized landscaping (Score:5, Insightful)
We get to read lame joke after lame joke.
Re:It has revolutionized landscaping (Score:1)
Re:It has revolutionized landscaping (Score:2)
You are an idiot. I am co-author of one of the most popular ray-tracing packages available today. I eat this stuff for breakfast, and FYI, I am VERY knowlegable about the subject. I chose to comment in a humorous vein, to make the topic, oh, maybe a little less _boring_ for everyone.
Scooby: Get a sense of humour and/or a life.
Mods: +5 Insightful?? The crack must be flowing heavy today!
Lame joke (Score:3, Insightful)
Re:It has revolutionized landscaping (Score:1)
In Case of /. (Score:4, Informative)
___
Advanced Graphics Algorithms
By: Henri Hakl
1. Introduction
Graphics representation of reality - or at least virtual reality - in games, simulations, movies, commercial and military applications have become increasingly convincing and immersed a growing audience in disbelieve - and at times even utter belief. This process has, in part at least, been facilitated by exponentially growing processing speeds and in more recent years the advent of hardware acceleration of graphics rendering.
However, even in spite of being able to process several giga-flops every second, a brute force approach to rendering is not able to produce nearly as realistic real-time environments and worlds as we find portrayed in games and interactive simulations. The reason is that numerous algorithms are used that approximate or compromise reality in order to achieve interactive rendering rates. These algorithms include methods to simplify scenes, to efficiently cull invisible parts or to simply ignore realistic computations in favour of faster approaches that, though inaccurate, portray reality.
Following the introduction we present a section on several graphics rendering concepts that feature in this article. In the remainder of this article we will discuss six popular algorithms for indoor and outdoor rendering of environments, namely:
quad-based static rendering of environments
a continuous level-of-detail (CLOD) rendering of height fields as described by Roettger et al [1]
real-time optimally adapting meshes (ROAM) for terrain rendering
portal-based rendering of indoor environments
binary space partitions (BSP) of indoor environments
potential visibility sets (PVS)
We will discuss each approach, offering a high-level description of each as well as implementation considerations where appropriate. Finally each algorithm will be discussed in terms of its application in modern graphics system before we conclude the article.
2. Concepts in Graphics Rendering
This section offers a broad overview into several key concepts in graphics rendering. These include the graphics pipeline, vertex representations, scene reduction techniques and graphics models - for a more extensive description we refer the interested reader to Alan Watt's 3D Computer Graphics [2].
2.1 The Graphics Pipeline
Graphics rendering is concerned with reducing a scene, a collection of three-dimensional data, to a smaller, visible subset and rendering this subset. To render a scene subset we note that a scene consists of polygons that are usually reduced to sets of triangles for hardware rendering purposes. The rendering process goes through a graphics pipeline during which the vertices of a triangle are transformed according to the current point-of-view and then projected from world space onto screen space according to the viewing frustum. The point-of-view determines the position and direction from which the world is rendered, while the viewing frustum determines the scope of the field-of-view (FOV).
After transformation and projection the triangle is lighted (meaning lighting calculations are performed on it) and clipped (meaning only visible parts are drawn) and then finally drawn to the graphics buffer. A number of approaches can be adopted during the drawing of the triangle, such as wire-frame only, solid, textured and bump-mapped.
Wire-framing only renders the lines connecting polygon vertices, solid renders color information only, texturing uses bitmap or procedural data that is projected onto the polygon, bump-mapping textures the polygon and utilizes some form of shadowing technique that creates a sense of depth to the image.
2.2 Vertex Representation
The triangle vertices used during the graphics pipeline can be represented in a number of ways, the simplest being a triangle-list. A triangle-list simply stores the vertices in sets of three, corresponding
Honor among nerds (Score:1, Insightful)
For the socially retarded among you, the amusing part of that is that anyone actually cares enough to bother!
Huh? (Score:2, Informative)
John.
What happened to the days of... (Score:5, Funny)
Re:What happened to the days of... (Score:2, Funny)
Re:What happened to the days of... (Score:1)
note, {6] Mark Feldman. Portal Engines. The Win95 Game Programmer's Encyclopedia. 1997. http://www.geocities.com/siliconvalley/2151/porta
Writing a programming guide for win 95 in 1997, redundant ?
Re:What happened to the days of... (Score:4, Funny)
Matt Fahrenbacher
Re:What happened to the days of... (Score:2, Informative)
To write < you have to type <
and to write < you have to type &lt;
Re:What happened to the days of... (Score:2)
Re:What happened to the days of... (Score:5, Funny)
Those days of yore (Score:2)
The problem is that everyone is striving for such a perfect level of abstraction with graphics that I can't figure out what you are supposed to do in the darned system. Forget the hierarchy of raster, image, graphics context (as in the baroque edifice called Java 2-D). I guess we are to assume suc
OK, I'll bite (Score:3, Interesting)
I make part of my living from commercial sale of scientific visualization software. It performs in software what used to require a $20,000 special-purpose instrument using embedded DSP processors (ouch, more buzzwords). The software is locked into Windows because it uses 1) CreateDIBSection() to allow direct manipulation of pixels in the manner of the post to which I was responding, 2) ScrollWindowEx() so the display
Re:What happened to the days of... (Score:2)
You might as well write this as data[y]. Unless you actually meant data[x][y]
Refresh...? (Score:5, Insightful)
Matt Fahrenbacher
Re:Refresh...? (Score:1, Funny)
They forgot TNA (Score:5, Funny)
An egregious ommision.
Re:They forgot TNA (Score:1, Funny)
I never found lara croft even remotely attractive, even in the latest games with the highest tech engines.
Now the girls of DOA, that's a different animal altogether.
Re:They forgot TNA (Score:1, Offtopic)
Re:They forgot TNA (Score:2)
Re:They forgot TNA (Score:1)
Re:They forgot TNA (Score:1)
Greek has 8 cases? Nope, Ancient Greek has 5 (same as in Latin except for the ablative, the functions of which are largely absorbed by the genitive). Greek verbs, on the other hand--now, there's some real inflections (three voices, four moods, seven tenses, three numbers). Perhaps you were thinking of Sanskrit?
What, no Octrees? (Score:5, Interesting)
Re:What, no Octrees? (Score:4, Insightful)
The type of problems solved by Octrees are also solved by BSP algorithms. So to put both in the article would have been a little redundant.
Re:What, no Octrees? (Score:2, Insightful)
Among other things, it is a format that is immediately usable. That isn't to say that internet-magazine articles are generally difficult to read, but some are easier than others due to advertising, having the article split into several pages, etc.
Also, this article is a more permanent statement: it can be referred to in the future, all at once, easily. There really is no reference value to most internet-magazine articles
Re:What, no Octrees? (Score:2)
More like,"What, no N-Patches?" (Score:1)
Is H. Fuchs' first name... (Score:3, Funny)
Re:Is H. Fuchs' first name... (Score:3, Funny)
Mars (Score:1)
What about the 2D algorithms??? (Score:2, Interesting)
Not to mention others like arbitrary region management, collision detection with large numbers of objects, and manipulating color data in different color spaces.
Re:What about the 2D algorithms??? (Score:2)
Re:What about the 2D algorithms??? (Score:2)
Re:What about the 2D algorithms??? (Score:2)
IAAGD (Score:5, Insightful)
Anyone there fit the bill? Did you like this article? Was it helpful and informative?
Re:IAAGD (Score:5, Insightful)
I suppose people vaguely interested who know the basics but haven't tried some of these out are the target audience.
For any given subject, that's about 95% of the Slashdot crowd.
=)
Re:IAAGD (Score:1)
Re:IAAGD (Score:5, Interesting)
The article touches on many subjects I haven't heard about and I learned what a BSP (binary space partitioning) tree is, at least. Graphics are probably the next thing I'll try to get into, and I still have an OpenGL manual lying around that's only been opened once.
Perhaps as a game programmer, you'd probably see that it's not as in-depth as you'd want, and it's probably not simple enough to be understood by everyone, but the article caters to, I guess, intermediate level people with a developing interest in computer graphics? Hits the sweet spot with me.
Re:IAAGD (Score:2)
Sounds like my normal bedtime reading!
i am teh funny! (Score:1)
har har har!
reference materials (Score:1)
this seems to be his purpose: reference materials. he brushes upon everything needed to be useful and leaves the details of implementati
Re:IAAGD (Score:1)
W00t! W00t!
Re:IAAGD (Score:2)
Re:IAAGD (Score:2)
I messed around with BSPs and Portals a few years ago just for fun. I was thinking that having a look at outdoors techniques might be interesting, and then this article comes along. I admit it probably hasn't done a lot more than saving me the equivalent reading time in googling, but it has been more pleasant.
Outdoor environment rendering.... (Score:5, Interesting)
Tribes [tribalwar.com] and Tribes 2 [tribes2.com] were some of the first games to take on outdoor environments and do them well. Now, we have Unreal Tournament 2004 [ut2k4.com] and Far Cry [farcry.com] leading the pack with gloriously realistic outdoor playspaces.
It's only a matter of time before next generation gaming engines like these turn to non-linear gameplay such as what's in GTA 3 [rockstargames.com] and we wind up with a world simulation that has a level of realism approaching reality.
Re:Outdoor environment rendering.... (Score:3, Funny)
Hmm, that Far Cry [farcry.com] game is a little different from what I'd normally expect from today's games.
Although it has some nice outdoor scenes, from the pictures..
Re:Outdoor environment rendering.... (Score:1)
real link for farcry (Score:2)
Re:Outdoor environment rendering.... (Score:2)
They've also just brought in SpeedTree, so the terrible forests have been replaced with very much more realistic ones.
For a size comparision, see: http://www5.playnet.com/downloads/worldsize.pdf
network protocol... (Score:2)
Mispredicts, jerkiness up the wazoo, even when there's little going on.
quake3's network protocol is much better.
What about voxels? (Score:5, Interesting)
Now that even cheap 3D cards have 128MB RAM on them, average systems have 256MB RAM, where are voxels used now?
google for voxels [google.com]
Re:What about voxels? (Score:1)
Average would be 64 or even 32. Average would be the "minimum system requirements" listing on the box.
No, just because a 256 meg 9800 XT came out does not mean I leapt into my car to replace my month-old 9800 pro with it's mere "128" megs ram.
Cheap cards have 128 megs too, but it's useless to them - they aren't fast enough to make any real gaming use of it.
I have a gfx 5200 with 128 megs ram, it cant play anything with any sort of detail and I'm left scr
Re:What about voxels? (Score:2)
Re:What about voxels? (Score:2)
It's all about fooling the average consumer by having '128' vs '64' on the box'.
They added too much ram because people tend to think that size is what matters. Since there aren't benchmarks on the bo
Re:What about voxels? (Score:1)
Re:What about voxels? (Score:1)
Re:What about voxels? (Score:2)
Voxels aren't used because cards don't support 'em (Score:4, Informative)
Comanche Maximum Overkill does not use voxels. I don't know why they chose that word to refer to the heightfields they do use.
Not supported by hardware (Score:3, Insightful)
No
I don't believe they can at this point (Score:2)
Not sure how feasable it is, either. Vertex shaders work so well because, with polygons, it's all just matrix math. So you build a killer vector unit, bang, you can do it at high speed on your graphics chip. I'm pretty sure the same kind of math doesn't apply to NURBS, you need something more complex.
Someday maybe. Or maybe the cards wi
Re:What about voxels? (Score:2, Informative)
Re:What about voxels? (Score:2)
Which shows you why no one takes them seriously.
comp.graphics.algorithms FAQ (Score:5, Informative)
This is one of the best collections of graphics algorithms on the net I'm aware of:
comp.graphics.algorithms FAQ [faqs.org]
Another favorite of mine is Ray Tracing News [acm.org], but there haven't been any new issues in a few years.
What other people's favorite collections of algorithms?
-jim
Re:comp.graphics.algorithms FAQ (Score:3, Informative)
"Principles of Interactive Computer Graphics", 541 pages, Newman & Sproull, 1979.
Re:comp.graphics.algorithms FAQ (Score:4, Informative)
Thanks for the kind words about the Ray Tracing News. I actually have a new issue ready to go, it's just a matter of converting it to HTML. Tonight, I hope...
- Eric
Re:comp.graphics.algorithms FAQ (Score:2)
Good, I'm looking forward to reading it.
-jim
Not advanced! (Score:5, Informative)
Re:Not advanced! (Score:1)
Portals and BSPs (...) are of much less use than they used to be
Hmm, Doom 3 makes extensive use of both - that's fairly current tech eh?
Re:Not advanced! (Score:3, Interesting)
Doom 3 does not use BSP trees for rendering. Neither did Quake 3. It uses BSP trees for other things, like collision detection.
"Portals" used to mean something other than it does now. You used to clip polygons against a portal, because this was faster in software. Now you just say "please draw the rooms adjacent to the current room." The "clipping" happens automatically on the GPU. "Room based rendering" would be a better te
Re:Not advanced! (Score:2)
That's because the graphics card is doing some kind of spatial partitioning itself. BSP (or stuff like BSP) is still very useful, it's just going on in hardware now.
I agree that there is nothing "advanced" to be seen here.
Whenever this topic comes up, I make sure to point out the following: the amazing graphical techniques we
Re:Not advanced! (Score:1, Informative)
The technique is called Deferred rendering [firingsquad.com]
Re:Not advanced! (Score:2)
Re:Not advanced! (Score:4, Interesting)
The GPU just transforms vertices and draws triangles, plus it runs per-vertex and per-pixel shaders. It does nothing involving scene representation or high-level culling. It just draws everything you throw at it.
BSP trees--for rendering--were useful back when there was a massive expensive involved in rasterizing each triangle on the CPU. You never wanted to draw a triangle, then have another one completely obscure it. But with modern graphics cards this is irrelevant. You just pass a bunch of pre-packaged vertices to the graphics card and it does the rest. You never want to break things down into individual triangles.
So, no, the GPU doesn't use one of these "well known algorithms."
Re:Not advanced! (Score:1)
And when it comes to complex meshes, it certainly makes sense to decide whether you can actually see the object before calculating several hundred vertices.
Re:Not advanced! (Score:2)
Now, with that out of the way... I'd like to ask a few questions:
Whatever happened to the Kyro II? I heard it was real good with ZBuffer stuff... complex landscapes and cityscapes. I also heard that the technology lives on in some form or another - tile based rendering?
You can draw complex landscapes with today's GPU's without passing in triangles/fans/strips/lists?
What would be a top reference r
Re:Not advanced! (Score:1)
Re:Not advanced! (Score:4, Insightful)
Today, the issue is significantly different. Consider an old 'gigapixel' card. 1 billion pixels per second at 60 frames per second == 16.6 million pixels per frame. Even at 1600x1280 there's only about 2 million pixels onscreen at once. What does this tell you? You can now afford to sink some time into overdraw because it just doesn't matter.
Also, consider the fact that 1600x1280 == 2.04 million pixels onscreen. Even if you draw a single polygon per pixel @ 60 hz, you're still only looking at 120 million polys/second. That's going to be a pretty reasonable number for next-gen hardware (Xbox2). What does this say? Well, unless you really need 1 poly per pixel, you can afford to draw some extra polygons.
Now, let's say you've got a scene with 10,000 discrete objects. This is a pretty reasonable number these days. Even on a 3ghz processor, doing distance-to-plane checks for plain jane frustum culling is pretty darn expensive when done 10,000x per frame. Multiply that number by some constant C to do N world space occlusion checks. All of a sudden you're sinking multiple milliseconds into just doing scene graph traversal. Don't forget, you only get 16ms per frame @ 60hz. PVS on triangle strips or individual triangles? Teehee - you'll spend forever trying to process all that crap. Throw a simply quadtree or octree onto a scene, and cull at the object level (where object == say, 1000 to 10,000 polys). Let the video card deal with the little bit of extra overdraw and wasted polys. Point is, -you- have saved, say, 4+ milliseconds of raw CPU time. 4ms is a lot. Send that extra time to Havok or Karma. Send it to a fancy effects system. Don't waste it doing needless old-school culling. Don't forget, if you're doing things right, the 'rendering' is really just DMA slinging verts and textures in the background to the GPU. Paralellism with the GPU. These mega hoopdeedoo X800+ cards can deal with a little excess load.
The point is, these algorithms are most decidedly not advanced. They're from 2-3 years ago! Quite literally, that's ancient history in the games world. Ridiculous, but true. The real brilliance of these new generation GPU's is not wacky implementation of bizarre obscure culling algorithms. The brilliance is that they are so powerful, they allow you to spend your programming time implementing beautiful shaders and effects. In 1-2 years, graphics programming will have truly morphed from glorified bookkeeping (managing and organizing data has been the hallmark of the 'hardcore' graphics programmer for several years now) into actual effects and shader programming.
I cannot wait until dicking with exporters and preprocessors, and goofy custom renderers are a thing of the past. With some clever planning, graphics peeps will be able to really sink more and more time into making things beautiful, instead of being forced to be excessively clever to make things happen. There will always be room for 'real' advanced stuff (like modern GPU + CPU shadow techniques, spherical-harmonic lighting, and other esoterics), but the power of these new cards lies in freeing up graphics programmers to actually write graphics code instead of being accountants. That's the real practical results of this next generation of hardware :)
no graphics in the article! (Score:4, Interesting)
I don't mean to troll ... but: (Score:2, Insightful)
blink (Score:1)
400 poke(32768 + pos +1, 219)
410 poke(32768 + pos, 32)
or something like that.
(now I'm all grown up and all I do is database and web app stuff)
Amiga (Score:1)
Refresh? (Score:5, Informative)
I'm the author of the article. So I guess I can explain a few things.
Originally the article was written 3 years ago as a technical report for a small course I needed to do. DevMaster found this work and asked me whether they could make it available.
The course took place over 8 weeks, covering each algorithm in a week - and 2 weeks for the report at the end. The actual course work is still accessable at
http://www.cs.sun.ac.za/~henri/advgfx.html
And includes pictures and sources to keep everybody happy.
To those that are uncertain who the intended target audience is - well, originally my supervisor...
Although I agree - pretty pics would've been nice.
The choice of algorithms reflects not the state-of-the-art, nor the best approaches to solving graphics issues. The algorithms were, however, easily accessable to me at the time - and hence featured in my one-algorithm-a-week plan.
Somebody mentioned that BSPs are outdated, this isn't true - though they have been around for ages, they are still the work-horse for most indoor engines around. Sure, BSPs are rarely used for the actual rendering process (as mentioned in the article), but in terms of processability of spatial organization they are hard to beat.
I stand to be corrected but I'm rather sure Doom3 makes use of some form of BSPs as well. That should be good enough for anybody.
That title (Score:2)
The title "advanced graphics algorithms" is highly misleading. These algorithms are only really any use for real-time 3D graphics, which is a fairly small subset of computer graphics in general.
Admittedly, it happens to be an area that's worth a fair amount of money these days (i.e. games), but if you're considering it as a career, the deadlines are tight, the hours are lousy and the pay isn't great. Consider another area of advanced computer graphics instead.
blah (Score:2)
ROAM 2.0 (Score:2)
Article describes basics of ROAM algorithm, I am familiar with it, and I finished coding it long ago. I am aware of fact that ROAM is very CPU intensive, and everyone say that "ROAM should not be used today".
Has anyone tried ROAM 2.0? [cognigraph.com]?
I was searching for any other documents related to new ROAM version, but failed, I am still not sure how "AGP Chunking" really works (picture of triangulated patch would help much) and how to fast operate on diamonds (instead triangles). Could yo