POV-Ray : Newsgroups : povray.programming : Bump_map bug - need test compilation : Bump_map bug - need test compilation Server Time
29 Jul 2024 04:33:00 EDT (-0400)
  Bump_map bug - need test compilation  
From: jko
Date: 3 Oct 1998 14:35:00
Message: <36165FFE.430B99D@home.com>
To all,

My name is Kevin Odhner (some of you may have seen my Pocketwatch in the
POV-ray Hall of Fame at www.povray.org).

I am looking for a volunteer to recompile POV_ray 3.1 MSDOS source code
for me in order to test a bug fix in the bump_map section of the code.
Chris Young has confirmed the bugs exist and Chris Cason has agreed to
release a patch with my changes when he releases the PovWin source.
Chris recommended I check here for a volunteer to test the changes
first, and I too would feel much better if I could test these changes
before giving them to the POV Team. 
Anyone willing?

The bug I've found is caused by several errors in the bump_map code of
POV_ray which have been hiding there undiscovered since the DKB Trace
days. This bug is what caused Robert Mickelson's tiles to be inverted in
"sundae.pov" ("Never on a Sundae", which features Haagendas icecream, a
scoop and a sundae on a tiled counter.) This famous 'mistake' was not a
mistake afterall, but a POV_ray programming error. Robert doesn't even
know that I've vindicated him yet.<g>

I think the reason this error has gone so long undiscovered is that with
multiple light sources, the brain tends to justify the appearance by
assuming that the lights are positioned where they would have to be to
produce the highlights and shadows it sees.

The results of using a bump_map are usually much worse than a mere
inversion, which can be easily reversed by simply using an inverted
image. In many cases, parts of the map are inverted and others not,
which makes it impossible to fix. There is also a twist which places
highlights and shadows at the wrong angles. The distortions vary
depending on the rotation of the object in space, which should have no
effect at all.

I have attached a zipped file "badbump.zip" which has a sample scene,
bump_map, rendered image and a text file with a full verbal explanation
as well as the offending piece of code and the required corrections.
Reviewing this material will convince you how messed up the bump_map
feature is.

While the errors are significant, the changes required to the code are
simple and few.

If anyone is in a position to compile the source with these changes, I
would much appreciate it, since I am not set up to do so. I am confident
that my corrections will solve most if not all of the distortions, and
I'm certain that this part of the code is not at risk for causing
problems elsewhere.  However, I'd still rather test them before
submitting them to the POV Team, just in case the solution requires some
minor tweaking.

I do hope someone responds quickly to this, since I don't want to miss
the opportunity Chris has offerred me to get a patch released by the POV
Team.

Thanks,

Kevin

Please be so kind as to respond by email at jko### [at] homecom


Post a reply to this message


Attachments:
Download 'badbump.zip' (34 KB)

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