|
Normal Map demo II (Composition by cwright)
In conjunction with the previous Normal Mapping demo, today's feature is normal mapping complete with tangent vectors (derived from texture coordinate derivatives)! Note: this is not for the faint of heart. It drops my GMA950 to its knees, but performs acceptably on my 8800. Definitely not a wise use of GPU resources, but at least it's possible without additional QC hackery. The tangent vector allows the normal map to work on non-planar surfaces. This could probably be combined with some Kineme3D meshes for some really pretty animations :) |
Well cwright, those performance reports are definitely hardware specific, I had to drop an fps display to get some real idea of frame rate when moving the 'spot light' over the teapot but I get an easy 55 - 60 fps [9400M].
Very cool cwright! I think I found a similar method of computing the TBN matrix somewhere a while back, but never got around to trying it. Glad someone else has though. Sadly, I've been caught up in other things lately, and haven't had any free time to spend on QC-related stuff. Hope I can get back to it someday...
Good to see you're still able to spend time on Kineme though cwright.
a|x
Was it the one on pouet? If so, that one heavily influenced this (particularly, there were some optimizations further down in the discussion regarding extra normalization removal, etc. that I used when cleaning it up -- helped quite a bit on my poor gma... ;)
On this one and the other one (Normal Map demo qtz's), what is it that is making the colors of the source texture not really come through? It seems like the colors may be showing a bit (maybe it's my imagination), but overall I get a kind of grey/two tone look, even with colors that are fairly saturated in color in the texture map.
I'll look at it more, and make sure I'm not doing something wrong, but I've thrown a series of normal maps/textures/models at this setup, and I'm seeing that consistently.
sweet now we are talking. i will have to try this with some blend shape animations as im getting a n/a on the framerate with the teapot
Can you provide some sample material that isn't working as expected? The lighting I'm applying (point-attenuated per-pixel lighting) is quite different from most lighting used in QC. Also, I didn't spend much time at all on the texturing portion -- I was more interested in lighting for these demos.
Thanks so much for sharing these. Very very cool.
Yeah, it's due to the lighting -- to get more color, you'll want to set ambient higher, and light intensity lower (If you do 128/128 for both, it's pretty reasonable. With more tweaking you can probably find something you like). Normally there are several lights in a scene, so you don't get a single over-powering light like this setup washing out everything.
No, it was this:
http://www.terathon.com/code/tangent.html and also http://3d.benjamin-thaut.de/?p=5
The guy I was corresponding with never got it properly working though, for some reason.
a|x
Cool, gotcha. I see the results now, I had a feeling it had to do with the lighting settings. I should have looked closer.
thanks a lot! its amazing. i made a simple test with kineme 3d and 3d explode.
i'm running a macbook pro 2.5 GHz Intel Core 2 Duo with 4 GB RAM and OS X 10.6.3. the frame rate, as someone say, decent. cheers m
A nice bump/normal-mapping example:
a|x