|
 |
I recently made a post in the pbi forum which mentioned that the
bump_map{} code has a seam bug. See:
http://news.povray.org/povray.binaries.images/thread/%3C67a154c1%241%40news.povray.org%3E/
Bald Eagle posted a link to: https://iquilezles.org/articles/tunnel/
which is a cousin to one of two issues found with the current POV-Ray
code. (Thanks Bill)
Details...
There are many factors which contribute to the vibrancy of the issues
found in any given render result. Very generally it's worse with the
bump_map due how it takes multiple samples from the image to implement
the normal perturbation. Yes, the issues exist with image_map{},
image_pattern{} and image_indexed_textures{} (formally material_map{})
too - but mostly in muted / harder to see ways.
With respect to bump_map{}, the first root issue is due the multiple
samples sometimes spanning the seam in a given mapping type. The second
root issue - sitting smack on top of the first - is that games are being
played internal to all interpolations which introduce / mangle the
values in the pixels at the images edges.
Attached is a v3.8 beta 2 compatible scene which shows the issues and
two images. A triangle_wave gradient of x*pi is used to create the input
image for the bump_map{} where the mapping is spherical. The camera is
zoomed in on a smaller part of the sphere's surface containing the seam.
Both images show No-interpolation and Bi-Linear interpolation in the top
row and Bi-Cubic and Normalized-distance in the bottom row.
The image bump_map_state.png shows the current state with both issues
present and overlapping.
The image bump_map_intrpIssues.png shows the interpolation issues in
isolation - with code where the first issue is fixed.
Bill P.
Post a reply to this message
Attachments:
Download 'bump_map_intrpissues.png' (23 KB)
Download 'bump_map_state.png' (18 KB)
Preview of image 'bump_map_intrpissues.png'

Preview of image 'bump_map_state.png'

|
 |
|
 |
On 2/13/25 22:06, William F Pokorny wrote:
> With respect to bump_map{}, the first root issue is due the multiple
> samples sometimes spanning the seam in a given mapping type. The second
> root issue - sitting smack on top of the first - is that games are being
> played internal to all interpolations which introduce / mangle the
> values in the pixels at the images edges.
So, what I decided to fix and not... (R19 v0.6.13.0 of yuqk fork)
The current collection of fixes has been implemented against the
bump_map{} feature alone. The issues are most apparent / vibrant with
this feature.
Within the bump_map{} code the planar (0) and angular (7) map types have
been left as is code wise. (spherical, cylindrical, toroidal were updated)
The planar map because the user can use scaling / placements to avoid
problem seams if they show up & the artefacts tend to be much less
noticeable with planar mapping.
With the angular mapping usage any issues are both unlikely to show up
and unlikely to matter if they do.
Ultimately there are no perfect solutions here. At the image edges we
end up with a pile of trade-offs and no, general, ideal solutions.
Attached are two images.
--
The first is the zoomed in on the sphere surface form shown in the prior
post. It basically shows things are better.
Results are solid for no interpolation so long as the image pixel
resolution is >> effective pixel use in the rendered image.
Results are good for the bi-linear interpolation, but due the fix we've
traded a small flat region at the image's pixel value over generated,
additional edge values.
Results for the bi-cubic interpolation are accurate, but this means we
now often see the ringing below 0.0 and above 1.0 which happens with
this interpolation type.
Results for the normalized-distance are much better, but more visible
than bi-linear.
---
The second image showing comparisons. Top row no interpolation needing
only the fix for the first issue. The rows two through four show the
interpolations 2,3 and 4 with the first issue fix in place. The center
column shows the interpolation type specific fixes for each. The right
column showing differences.
Bill P.
Post a reply to this message
Attachments:
Download 'bump_map_updates.png' (104 KB)
Download 'bump_map_withfixes.png' (14 KB)
Preview of image 'bump_map_updates.png'

Preview of image 'bump_map_withfixes.png'

|
 |