|
 |
On 12/01/2017 03:00 AM, Thomas de Groot wrote:
> On 30-11-2017 16:02, Stephen wrote:
>> On 30/11/2017 12:19, Thomas de Groot wrote:
>>
...
>>>>
>>>> BTW Do you (or anyone) know how to add a colour tint to a poser
>>>> model? Say, give a green or blue tint to a skin tone.
>>>>
>>>
>>> You gave the answer :-)
>>>
>>>
>> I was thinking in terms of doing it in PovRay but it is much easier to
>> do it at source.
>>
>
> To do the former, you can use the good old functions provided by Poseray:
>
> #macro pigment_multiply(p1,p2)
> //multiplies two pigments
> #local PR1 = function {pigment{p1}}
> #local PR2 = function {pigment{p2}}
> #local PR_FRed=function (x,y,z) {PR1(x,y,z).red*PR2(x,y,z).red}
> #local PR_FGrn=function (x,y,z) {PR1(x,y,z).green*PR2(x,y,z).green}
> #local PR_FBlu=function (x,y,z) {PR1(x,y,z).blue*PR2(x,y,z).blue}
> average pigment_map{
> #end
>
...
FYI. The pigment_multiply macro above can be coded in POV-Ray 3.8
somewhat more succinctly as:
//------------------- 3.8 ------------------------
//multiplies two pigments
#macro pigment_multiply(p1,p2)
#local PR1 = function {pigment{p1}}
#local PR2 = function {pigment{p2}}
user_defined {
function { PR1(x,y,z).red*PR2(x,y,z).red },
function { PR1(x,y,z).green*PR2(x,y,z).green },
function { PR1(x,y,z).blue*PR2(x,y,z).blue },,
}
#end
Bill P.
Post a reply to this message
|
 |