POV-Ray : Newsgroups : povray.advanced-users : Normal pigment not evaluated as a function? : Re: Normal pigment not evaluated as a function? Server Time
19 Apr 2024 14:22:39 EDT (-0400)
  Re: Normal pigment not evaluated as a function?  
From: William F Pokorny
Date: 12 Apr 2020 12:18:48
Message: <5e933f68$1@news.povray.org>
On 4/11/20 11:06 PM, Bald Eagle wrote:
> 
> I'd like to create different functions to control the red, green, and blue
> channels of an /average/ pigment pattern.
> I figured I could take the three different /slope/ patterns, color map them to
> r, g, and b, /average/ them, and then use that pigment to create a pigment
> function.
> 
> The /average/ pigment works fine on its own, but neither the /slope/ pattern nor
> the /average/ pigment pattern gives a function that makes anything show up when
> put back into a pigment statement.  Setting [0 ....] to something other than 0
> works, which indicates that the function[s] always evaluate to 0.   :|
> 
> Yes, that paragraph above is VERY hard to understand, and seems - circular or at
> least unproductive.  But that's what I need since POV-Ray doesn't have functions
> that operate with vectors as input or output.  Hopefully the code makes more
> sense than the description.
> 
> The docs on the slope pattern are pretty hard to understand.
> http://wiki.povray.org/content/Reference:Slope_Pattern
> 
> Maybe someone can see and point out where / what the problem is.
> 
...
> 

The slope pattern isn't one I've much used and I've not spent time with 
the code, but I have it in my head it only works with normals.

It comes to the fact the pattern - like aoi - needs the surface 
intersection and associated normal to work. You don't have this - or 
have a bogus normal input - when used with functions (or densities). The 
evaluations are happening apart from any surface in 3D space.

Where today the documentation says:

It can be used for pigments, normals and textures, but not for media 
densities.

It should say:

It can be used for pigments, normals and textures, but not for media 
densities or functions.

Bill P.


Post a reply to this message

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