How Bump Mapping Works 56
The Chef writes: "Tweak3D has a pretty good article explaining how bump mapping works with 3D accelerated video cards. They cover all the basics of bump mapping and the advantages and disadvantages of several methods. Now if someone asks me how per-pixel shading or environment mapped bump mapping works, I'll have an answer (but I'm not sure if that's a good thing)." With the introduction of the new graphics cards, this is some interesting reading.
Re:An open question (Score:2)
Alternate Approaches (e.g. displacement mapping) (Score:1)
various rendering models. Bump mapping,
combined with texture mapping, can indeed be
quite impressive (and also pretty efficient).
However, displacement mapping adds a further
refinement. This is when a physical (positional)
displacement is specified for the surface and
then rendered. It would often be used in
conjunction with texture- and bump-mapping.
If you look at a bump-mapped surface, you might
perceive apparent depth in the surface features.
But, without displacement mapping, those features
will have absolutely no effect on the silhouette,
since they don't affect the geometry.
I believe I saw this in some of the stills from
the BBC "Walking with Dinosaurs" video; a
dinosaur with a very wrinkled and bumpy skin had
a perfectly smooth silhouette. It still looked
stunning.
This can also be seen if the bump mapped surface
appears to have protrusions and the surface is lit
by a beam from near the tangent plane of the
surface. With displacement mapping, that bump
would be "real", and would therefore be able to
cast a shadow on the surrounding surface. With
just bump mapping, the "bump" doesn't protrude,
so it wouldn't cast that shadow.
Both of these examples are similar in character,
and both will not tend to jump out at you unless
you go looking for them.
Over time, more and more of these refinements
(generally developed for software by the early
1980s) are rolled into graphics cards as standard
features. I wonder how long it will be before
real-time radiosity rendering costs $150 for
your desktop.
Holy Grail of 3D Graphics? (Score:1)
You mean stuff like SurRender Umbra [hybrid.fi]? Yes, research is being done. :) While this is something of a shameless plug, Umbra is not vaporware, and in fact the component was completed by the end of last week and is ready to ship. It took several man-years to build, so it's not exactly something you write out of a hobby. There's also a fairly in-depth technical overview [hybrid.fi] on the site. From that document, I quote:
The library uses a number of techniques and data structure organizations that makes the visibility determination process output sensitive. Output sensitivity means that the time used to solve a problem, i.e. visibility evaluation, is dependent on the size of its output (number of visible objects) rather than its input (number of objects in the scene). "
Another company, Fluid Studios [fluidstudios.com] is also taking a shot at the same problem, although they go for eliminating individual triangles instead of models/components.
While this kind of dynamic methods are certainly more expensive to perform at run-time than pre-calculated visible sets, they are not mutually exclusive with those. You can still use portals and cell based visibility as well as static PVS if desired, but what's important that we're finally reaching a point where you don't need to.
It's all about freedom, in the end.
Jouni
--
Jouni Mannonen : 3D Evangelist @ SurRender3D.com [surrender3d.com]
Better Graphics - Better Game (Kinda) (Score:1)
compare "I pressed this button, these pixels move up the screen and caused those pixels to move in various directions. My score increase by 1"
to
"I pulled the trigger and put a rocket launcher right in his back. Gibs _everywhere_. One more frag for me!"
If the game looks more like real life (or at least more like the Matrix), it's easier to get involved.
Of course, it helps if the gameplay rocks too, but graphics can add an awful lot.
Re:Fractals galore (Score:1)
It isn't the curved surfaces.. (Score:1)
:)
Re:Bitboys - a product? When? (Score:1)
Bitboys may be notorious for not shipping production boards, but they've been very productive for the past years.
I'm sure a product will ship when it's done. :)
Jouni
--
Jouni Mannonen : 3D Evangelist @ SurRender3D.com [surrender3d.com]
An open question (Score:4)
On one hand I really am impressed with the impressive graphics that are apparent in the majority of today's games, and perhaps this will allow game designers to think less about the technology (even "bad" code can hit 60fps with a smoking graphics card) and work on the game...
On the other hand, I think that technology shouldn't be the focus of a good game (aka who cares if the orange is triple pass bump mapped at 140 fps if the game isn't fun to play) while games like diablo (640x480 resolution) still get dusted off and played.... any thoughts?
Re:Books are better (Score:1)
IMO time, but this was my major area in college.
The first Foley and Van Dam didn't deserve it's reputation. It was very basic and pretty empty. if you have studied Linear Algebra, you already knew most of what it had to offer. (And if you haven't you shouldn't be trying to write real 3D code.)
The new edition is much better but still hardly the best book around. I've always preferred the Rogers book Procedural Elements for Computer Graphics. His organization is a bit awkward but there are lost of good discussions of the pluses and minuses of various rendering techniques and how to implement them.
For specific algorithms, the Graphics Gems series is the BEST high-performance graphics reference around.
I recently saw another excellent hard cover text but I'm having trouble pulling the name to mind.
The moral is, go to the bookstore and read a good chunck of the boosk before you buy it. Don't just by VD because of its reputation.
Re:An open question (Score:1)
No. And that's because no consumer level card supports HW wire frame rendering. In 95% of all cases polygon rendering is faster than wire frame (some versions of GeForce support HW line rendering though).
_________________________
True Phong shading more important. (Score:1)
Incorrect Name! NOT bump-mapping... (Score:1)
That being said, it's a nice fast hack to get something LIKE bump-mapping. Downside : extreme color washout (over-burning or over-dodging for the photo-shop crowd,eh?) Funky lighting considerations need to be taken into account. Oh sure, doing it properly would take a few extra clock-cycles, god forbid anyone would make CUSTOM hardware to do this... oh, wait... the equations almost exactly match what the texturing units do, with a few extra steps... oh wait... there are loads of texturing units all in parallel in hardware now, oh maybe we could get them to run in parallel to do real bump-mapping... gah!
Re:When OpenGL? (Score:1)
What patent ? I haven't heard about that. Bump mapping as a technique is old (way older than Bitboys). Foley et al. from 1991 (IIRC) has it, haven't checked the older book. When OpenGL is a question of getting a standardized bump-mapping extension. DirectX just adds new functions and changes the version number, whereas OpenGL evolves with cleanly bundled extensions that are separate from it.
Re:Origins of EMBM... (Score:1)
Then, after the Pyramid3D died, Alliance announced some sort of plan to develop their own graphics chipset, but nothing ever materialized.
Re:An open question (Score:1)
It was standard practice to get the level of detail down as far as possible. There were about a dozen commands you would use in your config file to blur the textures, take out the 'realistic' movment (head bobbing, tilt when turning), and anything else that was even remotely extranious to the game (environmental sounds, etc.). I'm sure it still happens today with the first person shooters (Unreal, Q3, HL, etc).
Graphic quality, to the 'professional' gamer, meant nothing - it doesn't add to the game and usually distracts you.
Of course, the thing is, only about 5-10% of people out there are hard core gamers. You'ld show up at tournaments get put on some monster of a machine with every high-tech card in it that ran 100fps in 640x480 and people would start to cry when you executed your config file that turned the game into a mess off blurry green/brown squares.
Of course in that sense computer games are like movies. 90% of the people want the razzle dazzle. That's how you sell the product. You could probably make a good comparison between Lucas and Carmack who try to push the technology because they're interested in it and aren't quite so focused on just the story. The hype surrounding them based on the 'effects' they're using is massive.. but the actual end product isn't what the 'hard core' people are interested in. (Hard core movie people being your artsy 'movie critic'... not your hard core Star Wars fan
With Quake 2&3 I was always kind of shocked at the amount of work that they put into the models. It's utterly impossible (IMO) to notice the work put into them at all in a game. There was barely any noticable 'in game' difference between the models in Q1 to Q2 - and no gameplay difference at all. Fiend? Big tank guy? You want to know the one model that I was most ever impressed by? The DOOM II Arch Vile. Now that created a gaming experience
Having said all that, I still like to have good effects in other types of games. First person role-playng games.. I'd love to see a re-make of Ultima IV-VI using a 3D engine. Maybe one day, in my little fantasy world, Carmack and Garriot will form their own company.
Jason
Re:Holy Grail of 3D Graphics? (Score:2)
Don't lie Jouni - I've seen your picture in the credits for INSIDE :) And that used SurRender the mighty 3d engine too yes.
While this kind of dynamic methods are certainly more expensive to perform at run-time than pre-calculated visible sets, they are not mutually exclusive with those. You can still use portals and cell based visibility as well as static PVS if desired, but what's important that we're finally reaching a point where you don't need to
Cool - I look forward to seeing some new games with the new component.
Software (Score:1)
My own opinion about bump-mapping and different APIs is that different hardware companies should stop creating different APIs for their different bump-mapping algorithms and instead converge on high-level interfaces + hinting.
Re:An open question (Score:1)
As a game developer is able to kick more and more polygons out at higher and higher rates, they can return to a fun little thing called...
NEVERENDING, UNGODLY HORDES OF SHAMBLING EVIL!
or, many more objects on the screen at a time. Remember back in the days of games like DOOM and Abuse when you'd walk into a room and...er...'stage a tactical withdrawl' with about 50 baddies on your ass. Until recently, 3D games could only muster a few enemies at a time without grinding the system down. As cards improve, though, expect to see more tactical withdrawl situations in 3D games...
bump mapping in Computer Graphics (Score:1)
Here is an interesting computer graphics technique using bump mapping for wrinkling developed in a japanese research center:
Facial Animation using Bump Mapping [atr.co.jp]
The results are quite impressive with facial animation and garment wrinkling...
Zeb.
Re:Is it worthwhile? (Score:1)
I recall long-ago, Brian Hook saying that Quake3 does 6 bump-map passes, so I wonder if they use this technique. There's a followup article on the OpenGL site using a 12(!) pass lighting method.
Re:True Phong shading more important. (Score:1)
I was told differently and couldn't find any support one way or the other both on Nvidias site and in that article.
Do you have a good reference for the actual claculatiosn beign erpformed by the card? One has to wonder if this is the case why they didn't SAY Phong shader anywhere in their literature...
Re:Incorrect Name! NOT bump-mapping... (Score:1)
Re:Incorrect Name! NOT bump-mapping... (Score:1)
Displacement mapping is a lot harder. You don't just "move the pixels". If you moved the pixel, you would leave a hole where the pixel was! What do you put there?
Displacement mapping is usually done with adaptable subdivision, where the polygon is divided up into triangles, the corners displaced vertically, and they are divided, repeatedly, until the triangle is "small enough" that bump mapping can be used on it (deciding this is the tricky part). This could be done in hardware, and likely it will someday soon, but doing bump mapping in hardware should not be scoffed at.
Hair, Fractals (Score:3)
Is it worthwhile? (Score:1)
Can't Help But Think About... (Score:1)
http://www.penny-arcade.com/dance.shtml [penny-arcade.com] .
The rest of the site is funny as well, if you're into that sort of thing.
Fractals galore (Score:1)
Bump mapping the nVIDIA way (Score:4)
I was in a hurry and my machine fell over as I was about to post this interesting link from the nVIDIA site [nvidia.com]. Lots to learn about therein. Sorry if I posted twice, give me a break.
Re:Hair, Fractals (Score:1)
No, hair is not sharp bumps. Bumpmapping is just a lighting trick. You're talking about displacement mapping which adds true geometrical complexity. In that setting hair could be sharp bumps, but unless you want your object to look like a cactus, you'd want som sort of nonlinear transformation there aswell. Usually hair is implemented thrugh either lots and lots of geometry, or a volume shader.
Fractal algorithms have been used in computer graphics modelling for ages, not in consumer level hardware yet though, and probably not very soon either.
A penny for your thoughts.
Re:An open question (Score:1)
However, all this increased grunt also leaves a lot more processor power left for the game itself; which we are still learning to use fully in terms of advanced AI, better physics and other such things.
All these things considered, it's true that a good game is a good game regardless of the beautiful graphics - how many people play Minesweeper, after all? I mean, my favourite game of all time is a old Sega Master System game. On the other hand, how cool was it in Zelda 64 when you got the lens of truth and used it for the first time, or in Aliens vs Predator when you first used the Predator's special vision - it all adds to the game as a whole.
Finally, and rant over, with regards to 'even "bad" code can hit 60fps with a smoking graphics card' - I'm not so convinced - in anything but the most graphics-hungry FPS the game logic itself takes up a good percentage of the processor's power, and it's very easy to let that slip too in a "badly" coded game too - giving you a slow frame rate even on a GeForce 2'd up machine.
Re:Hair, Fractals (Score:1)
The bumps in hair are far too high-frequency for bumpmapping to work for it; at least not unless the camera is almost in the hair! Also bumpmapping tends to make things look a little more shiny than hair...well unless you take the 'because I'm worth it' effect in to play ;) Are we moving toward fractal geometry? big brushes for big objects, smaller brushes to add definition to the large brushes, bumps on the smallest brushes.
Can't say much because of contractual obligations, but these kind of technologies will almost certainly be employed on the newer games consoles as polygon drawing ability far outstrips the RAM needed to store all the polys. Fractal and other procedurally generated geometry may well be the way out of this
Re:Hair, Fractals (Score:2)
Nope. Once way to make hair, start with a wooden log light by a spot in the middle (this will be the sheen), stretch it out and alpha it a few hundred times onto a surface with slight longitudinal displacements and slight bending - now it should like a sheaf of wheat. Take the resulting texture and map it two or three levels deep onto a hair-shaped object, using an alpha map to give it shape and taper. On the head place an opaque map, darkened, of the same texture so you don't get any bald spots. Presto! It looks like hair.
This runs pretty efficiently in real time too, because you're just mapping a few 10's of textures to get the effect. The main disadvantage of this approach is that the highlights (sheen) don't move. A hack to make them move is to light the hair texture with a spotlight before alpha mapping it onto the hair polys.
You could add a bump map to the hair texture and you would get the moving sheen.
--
Re:Is it worthwhile? (Score:1)
Bear in mind most modern graphics chips can multisample more than one multi-textured pixel per clock cycle, whereas the most basic optimised software renderer can manage much less, before you've even considered bump-mapping. And remember your processor cost about the same as your entire graphics card too :) (At least mine did when I bought it!)
The paradox of hardware acceleration.. (Score:3)
I know many graphics coders who are depressed because all of their hard-won knowledge coding polygon fillers, environment map effects and realistic shading engines in software seem completely superceded by advances in hardware. They shouldn't be. There's still tons left to research and better algorithms to be found - even more so now that more powerful graphics cards are becoming cheaper.
There's zillions of good Web references on the subject - here [www-imagis.imag.fr] is a place to start.
Re:Better Graphics - Better Game (Kinda) (Score:1)
If the game looks more like real life (or at least more like the Matrix), it's easier to get involved.
Up to a point. As far as 3-D FPSs go, basic representation is enough, and the emphasis should always be on the gameplay, one of the reasons why Quake 1 is still far more involving than either of its successors. The blocky little moonwalking men in Quake (or even Doom's sprites) are just targets to hit. If you spend any amount of time admiring beautifully textured skins or the curved arches or the fog, lens flare et al you're dead.
As the post above yours pointed out, most hardcore gamers turn the detail right down anyway. Graphically and gameplay-wise, the most important thing is framerate...
Books are better (Score:3)
"Computer Graphics : Principles and Practice"
Foley, van Dam, feiner, Hughes
Mine is second edition 1993
everything from lines to fractal hairs
inc. anti aliasing & filtering etc.
A must read for anyone more than slightly interested
Origins of EMBM... (Score:2)
Some years back, in the days of Pyramid 3D (yes, boards existed!) the pixel pipeline of the graphics chip was already programmable in microcode and EMBM was working perfectly in hardware. Slowly, maybe, by today's standards, but visually as attractive as ever. While it's a shame the boards never made it into the public, they still managed to make a significant contribution to PC graphics technology.
Bitboys licensed the EMBM solution to Microsoft to make it a part of the Direct3D standard. Once it was a part of the standard, other vendors such as Matrox were also free to make their implementations of the method.
It's a hack, but it's a good looking hack. Long live good looking hacks! :)
Jouni
--
Jouni Mannonen : 3D Evangelist @ SurRender3D.com [surrender3d.com]
Sortof OT (Score:1)
Math - it's not just for Bible Scholars anymore!
The Divine Creatrix in a Mortal Shell that stays Crunchy in Milk
Re:True Phong shading more important. (Score:1)
Re:Books are better (Score:1)
This requires per pixel shading and hence hasn't been used in games so far (the article suggests that Geforce 2 would support it).
Environment Mapped Bump Mapping is similar but offers more flexibility at some loss of shading accuracy (the distance from the light source cannot be represented).
However, the article does look like a bit of a rehash of material provided by Matrox and NVidia, but I guess there is no harm in that.
Re:True Phong shading more important. (Score:1)
Still digesting it all. After you dot the bump map normal with the interpolated normal, what do you do with the final value, look it up ina pre-claculated shade table by treating the reult like a color index?
Re:When OpenGL? (Score:1)
====================
SE: What is the difference between the 3DGlaze's environment bump mapping and Matrox's environment mapped bump mapping?
SL: Matrox has a good implementation of environmental bump mapping. They are closely following the Microsoft guidelines, which Bitboys licensed to Microsoft. Without going into detail on our own implementation we will have equal quality, but at a fairly significant performance increase.
====================
The phrase "licensed to Microsoft" indicates some kind of patent, at least to me.
BTW, the interview is very interesting for anyone interested in future 3D graphics (albeit vaporware
Re:When OpenGL? (Score:1)
here's the URL:
http://www.sharkyextreme.com/hardware/articles/
Re:The paradox of hardware acceleration.. (Score:2)
Yoohoo! (Score:1)
I hope they make a patch for DAIKATANA!
Fh
Bitboys - a product? When? (Score:2)
Some years back, in the days of Pyramid 3D (yes, boards existed!) the pixel pipeline of the graphics chip was already programmable in microcode and EMBM was working perfectly in hardware. Slowly, maybe, by today's standards, but visually as attractive as ever. While it's a shame the boards never made it into the public, they still managed to make a significant contribution to PC graphics technology.
So they actually made some prototypes? I remember looking at the early screenshots of the Tritech Pyramid 3D cards and wondering what the frame rate was with bump mapping, reflections and fogging on.
On the flip side, I do wonder whether they will ever get a production board out of the door. The are notorious for not producing.
Cheers,
Toby Haynes
Bump Mapping: About bleeping time. (Score:1)
Three years ago Dimensionality was working on a game engine that was to use bump mapping (don't know which method Sean was using; it was in software). While the engine effort collapsed in January of 1998, we still have hundreds of bump-mapped textures gathering dust right now, waiting for a chance to be used in something.
http://www.dimensionality.com/stuff/GTex0214.JPG is a sampler I made shortly after the collapse. It's located in our gallery section.
Now watch me get moderated down for being on topic...
Re:An open question (Score:1)
Re:Books are better (Score:1)
Re:/.ed already... (Score:1)
a link to the nvidia site got rated 4 because it was 'informative'. I say """""please""""". ofcourse it is informative, but people interrested in EMBM are likely to know about this technique long BEFORE they enter their slashdot accounts. Nvidia is the number one gfx hardware firm in the world. If you don`t visit Nvidia.
I don`t mean to claim I can say which article can or cannot be slashdotted, but the fakephong version of this technique popped up around 1995 for the first time in a DOS demo called Juice, which you can download here [hornet.org]. So don`t tell me this tech is big news, because it isn`t. The only difference is the tech is now in hardware. Some BitBoys themselves made demo`s in 1989-1993, they knew where to get the juice.
now, let the monkeys rate this rant offtopic, kill my karma, yeah. suckers.
College education needs change (Score:1)
Re:College education needs change (Score:1)
BTW: 3D Studio Max costs $2,700.00 computer not included. Every Barnes & Noble has an entire section of books dedicated to teaching you 3D Studio Max. There are a hundred times as many help books floating around as there are copies of Max in circulation.
BM can be fun in software, too (Score:2)
I'm actually impressed that it took this long for the concept to go from software to hardware.
--
When OpenGL? (Score:2)
The big issue is when OpenGL, and thus Q3A et al., will have it. Today it seems to be an M$ ballpark only; with the help of Bitboys' patent.
Heres the proper link (Score:3)
Re:Hair, Fractals (Score:1)
I missed the closing italic tag - the last paragraph is mine and not quoted - apologies!!