POV-Ray : Newsgroups : povray.bugreports : POV-Ray bump-mapping buggy Server Time
29 Apr 2024 00:57:56 EDT (-0400)
  POV-Ray bump-mapping buggy (Message 1 to 2 of 2)  
From: clipka
Subject: POV-Ray bump-mapping buggy
Date: 27 Dec 2008 05:35:00
Message: <web.4956049697690c3b6fe7f930@news.povray.org>
The implementation of bump maps in POV-Ray is broken (well, it was probably
never right in the first place).

A discussion of the symptoms can be found here:
http://news.povray.org/povray.general/thread/%3Cweb.493114d0114da4434dea3830%40news.povray.org%3E/?mtop=291496

I think I just also discovered *why* the bump mapping doesn't work:

The bump_map() function gets three parameters:

- a point in map space
- a structure containing info about the normal "texture"
- a vector identifying the normal at the point

These parameters, however, cannot account for rotations of the bump map around
the (raw) normal axis. This is irrelevant with classic textures, but vital with
bump maps because it makes a difference if the slope is rotated around this
axis.

So there's a conceptual issue here that needs fixing.

There is a similar problem with UV mapping: It is vital for UV-mapped bumps that
the information, which directions correspond to U and V, are passed from the
object to the further processing algorithm.


Post a reply to this message

From: Ray Gardener
Subject: Re: POV-Ray bump-mapping buggy
Date: 19 Jan 2009 23:10:43
Message: <49754ec3$1@news.povray.org>
The problem is that the perturbation of the surface normal by the bump 
normal boils down to a simple VAddScaledEq() call (see normal.cpp), 
which is typical of most renderers.

This is not a true perturbation, though -- the surface normal is not 
being rotated by the bump normal. Because a true rotation takes more 
time, my guess is the approximation using vector addition was done for 
performance reasons (one also doesn't need to worry about the surface 
normal pointing into the object, because adding two up-facing normals 
never produces a downfacing one).

fwiw, I suggest adding true normal perturbation as an option, which 
users can enable at their discretion.

Ray




clipka wrote:
> The implementation of bump maps in POV-Ray is broken (well, it was probably
> never right in the first place).
> 
> A discussion of the symptoms can be found here:
>
http://news.povray.org/povray.general/thread/%3Cweb.493114d0114da4434dea3830%40news.povray.org%3E/?mtop=291496
> 
> I think I just also discovered *why* the bump mapping doesn't work:
> 
> The bump_map() function gets three parameters:
> 
> - a point in map space
> - a structure containing info about the normal "texture"
> - a vector identifying the normal at the point
> 
> These parameters, however, cannot account for rotations of the bump map around
> the (raw) normal axis. This is irrelevant with classic textures, but vital with
> bump maps because it makes a difference if the slope is rotated around this
> axis.
> 
> So there's a conceptual issue here that needs fixing.
> 
> There is a similar problem with UV mapping: It is vital for UV-mapped bumps that
> the information, which directions correspond to U and V, are passed from the
> object to the further processing algorithm.
> 
> 
>


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.