|
![](/i/fill.gif) |
Mike Raiford schrieb:
> A few models I've seen lately have a normal map attached to them, rather
> than the standard bump map. POV-Ray uses bumpmaps.
>
> Essentially, a normal map has the x,y,z coordinates in the r,g,b values,
> rather than grayscale. How hard would it be to implement a normal map
> such as this, rather than a bump map?
Question is, do those normal maps carry /absolute/ or /relative/ values?
That is, are these coordinates in true X;Y;Z space (subject only to
transformations applied to the whole object), or are they rather to be
interpreted in U;V;N space?
If they carry absolute values, then the whole thing should be as easy as
eating pancakes (and should actually give better results than POV-Ray's
current bump mapping implementation).
If they carry relative values, then they should still be about as easy
to implement as it would be to fix the major flaw of POV-Ray's bump
mapping implementation.
I wouldn't be all too surprised if both variants were in use out there.
> To further put salt on the wound, the one program out there that seems
> to be able to translate normal maps into bump maps costs $100 for a
> non-educational license, pretty high for a piece of software that has
> such a narrow purpose...
That's probably because while it is darn easy to convert a bump map into
a normal map, the reverse needs some more math (and may actually be
impossible in some cases; there are things you can do with a normal map
that you can't do with a bump map, e.g. an endless slope around a cylinder).
> I need to sit down and write a small app that will do it. Maybe support
> for normal maps can go into POV 4's suggestion box? Unless it's trivial
> to add to 3.7, I'm guessing not, due to the way normals work (though,
> some normal patterns do have special normal perturbing functions...)
Theoretically it shouldn't be much of a problem: Normal maps are just
another description of how to mangle the geometric surface normal. To
the contrary, it should actually be even easier: With bump maps, you
have to first evluate at least three pixels to get the local slope in U-
and V-direction; with normal maps, you get the same information in a
single pixel.
The problem here is that POV-Ray doesn't even treat bump maps properly.
But it shouldn't make a worse job on normal maps either.
(The biggest obstacle might actually turn out to be that the term
"normal map" is already occupied in POV-Ray for a totally different
thing ;-))
Post a reply to this message
|
![](/i/fill.gif) |