POV-Ray : Newsgroups : povray.binaries.images : Triplanar Mapping : Re: Triplanar Mapping Server Time19 Apr 2024 18:06:34 EDT (-0400)
 Re: Triplanar Mapping
 From: Bald Eagle Date: 16 Jan 2024 08:25:00 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.65a6831a93092b991f9dae3025979125%40news.povray.org",
"dateCreated": "2024-01-16T13:25:00+00:00",
"datePublished": "2024-01-16T13:25:00+00:00",
"author": {
"@type": "Person",
"name": "Bald Eagle"
}
}
"Samuel B." <stb### [at] hotmailcom> wrote:

> Hmm, I don't know what's causing those parallel lines, but it might be the lack
> of a sharpness value. I updated the macro, and its new sharpness input /should/
> help mitigate such errors plus any warping caused planar mapping.

So, they way I understood it was that each plane contributed to the texturing of
the surface by how closely its normal matched that of the surface.  Surfaces
with a 45 deg angle would be an even blend of 2 planes, etc.

I think you have the idea properly implemented in code, but you should eliminate
the unnecessary triangular_wave statement?  Shouldn't it be a straight sawtooth
wave?

It's early and I might be reading it wrong, but should the slope {x} pattern
blend between an xz plane and one rotated into the yz plane by rotation around
z? (first pigment map), etc?  Seems you have that first image map rotated around
y, when it ought to be rotated around x to make it lay flat.
Then rotate around z, then y to cover all 3 planes.

"The slope value at a given point is dependent on the angle between the
<Direction> vector and the normal of the surface at that point."

- BW
```