04/23/05
If you’ve been visiting this site for very long, you know
that my
Python samples page is still fairly young and doesn’t
get updated nearly as much as my graphics related pages.
Hopefully, this will change in the future because
Python (named after
Monty Python's Flying Circus) is like the Swiss Army knife
of languages: easy to use and full featured. On top of that,
it can easily be extended and/or embedded into C++
applications, so it’s ideal as a bolt-on scripting language
for game engines and level editors.
In other words... it's fully endorsed by the Ministry of
Silly Walks!
In fact, I like it so much, I've decided to add a
new
forum dedicated to it, which I hope will prove useful
for anyone wanting to learn Python. If not - we can just use
this new forum to discuss other Pythonic matters such as the weight
ratios and flight dynamics of coconut laden swallows - both
European and African.
Consider the following
research
into this important issue!


04/11/05
My newest
OpenGL sample is based on the "Cg Volume Lines" demo,
which ships in the current
nVIDIA SDK. The sample demonstrates how to render a
series of simple line segments in a way which makes them
appear to have volume or thickness. The technique is ideal
for rendering effects such as laser fire, tracer rounds, and
neon signs.


04/04/05
Added yet another variation on alpha-blending. This
alpha-blending sample uses the alpha component of a
Material's Diffuse color to perform the alpha-blending. This
technique is widely used to make entire objects fade out of
existence over some amount of time.


03/29/05
New and improved Dot3 bump mapping samples have been
added:
Direct3D - Dot3
Per-Pixel Bump Mapping
OpenGL - Dot3
Per-Pixel Bump Mapping

Ok... it took a while to hammer-out the math, but I decided
to redesign the DirectX Dot3 bump mapping sample that I
released on 03/09/05. The first version was ok, but
something about it kept bugging me. It was too simple. Yes, I
know, this site is all about "simple samples", which are
straightforward and to the point, but the Dot3 bump mapping
sample was missing the one thing that I thought was really
important… how to manually build tangent matrices for each
vertex. I think this is the part of Dot3 bump mapping that
really confuses programmers who are new to the concept of
doing per-pixel N·L
lighting calculations with a normal map.
Unfortunately, few people write samples that do a good job of
demonstrating this important step and some demos like the
famous
“RadeonSimpleDot3” sample from ATI’s website don’t even
show how to do it at all; they just hard-code a single tangent
matrix for their quad to use without even explaining how it
works. That’s hardly useful for someone trying to implement a
realistic Dot3 bump mapping system into their game engine.
With that said, I spent the last week going "partially insane"
as I combed the internet for decent articles, white-papers,
and presentations which would hopefully explain the black art
of tangent matrix construction. Now, I consider myself a
pretty good graphics programmer, but I’m no math genius so
after reading through a few dozen resources on the matter and
scribbling math gibberish all over my office white-board, I
started to lose it. I would stare at my broken code till 2 AM
in the morning trying to find out why my per-pixel lighting
was flipped over, upside down, or inverted! And when I finally
did go to bed, I would dream about light vectors being rotated
into tangent space… or should I say light vectors being
incorrectly rotated into tangent space!

Of course, I eventually did find a good resource concerning
these mysterious matrices and their construction, and I was
able to fix my problems and regain my sanity... well I
regained most of it. Thank you, Jakob Gath and Søren
Dreijer for the excellent article titled,
"Derivation of the Tangent Space Matrix". It was a big
help!

03/26/05
An OpenGL port of the new
Texture
Alpha Blending sample has been added.
Also, I’ve created a new GIF button for those of you that
like to use them on your links pages. I’m not much of an
artist but I think this one looks a little better than the
first one I did.

Seriously, if any one out there is an artist or knows of an
artist that can make me a sweet little GIF button
– that would be greatly appreciated. I just don’t know how
web artists make such cool little buttons. Some of them are
even animated... it
baffles me!
I'm sure it's probably easy to do, but creating cool GIF
buttons is not my field of expertise, so I tend to place
skills like this into a special category I call, "Things
that are magic!" This is the same category where I place
Quantum Gravity, and why at least one sock must be lost every
time you do your laundry! I mean... where the hell do those
socks go to!? Personally, I blame Quantum Gravity!
"Damn't,
Jim... I'm a doctor - not an artist!"


03/24/05
In response to a recent
forum thread, I’ve created a
new DirectX 9.0 sample which demonstrates how to perform
alpha blending using the alpha channel of a standard .tga
texture. It's pretty much a beginner-level sample, but those
are sometimes the most popular.


03/16/05
Yes, my friend, its time to become hip and ditch those
crummy 8-bit per component textures for new High Dynamic Range
floating-point textures.
My latest Direct3D
sample will show you how to load the popular .hdr file
format and create a Direcdt3D texture object suitable for
rendering with it. You’ll be joining the cool kids in no time!


03/09/05
Rejoice... four new samples have been added!
DirectX - Dot3 per-pixel bump-mapping with a normal map
OpenGL - Grab OpenGL
extensions with GLEW
C++ - Creating Interface
classes for C++
STL - Create a custom
sort function for your class types
Also, the forums are off to
a great start, so stop by and check them out!
More Site News... |