POV-Ray : Newsgroups : povray.advanced-users : HF_ macro question. : Re: HF_ macro question. Server Time
29 Jul 2024 06:19:59 EDT (-0400)
  Re: HF_ macro question.  
From: normdoering
Date: 8 Nov 2002 07:20:04
Message: <web.3dcbab07df16341f5c65a5ba0@news.povray.org>
normdoering wrote:
>Marc-Hendrik Bremer wrote:
>>"normdoering" <nor### [at] yahoocom> schrieb im Newsbeitrag
>>news:web.3dcb3c88902ebc51ccdab82b0[at]news.povray.org...
>>> //==============================
>>>
>>> #declare MyFunction = function{pattern {bumps scale 0.2}}
>>>  // MyFunction above works...
>>>
>>
>>As a pattern, this function returns a float value.
>>
>>> #declare MyTest = function
>>>  { pigment
>>>    { image_map
>>>      {png "testHF.png"
>>>       map_type 0 interpolate 2
>>>      }
>>>     }
>>>   } // <- this replacement produces an error.
>>>     // shapes.inc pops up and marks the bit of code named above
>>>
>>
>>As a pigment, this function returns a vector. Pov can handle
>>vector-functions only in special cases, therefor you have to convert the
>>output to a float value.
>>
>>Try:
>>
>>#declare MyTest=function{MyTest(x,y,z).hf}
>>
>>(it's difficult to find but the dot-operators are explained in the docs
>>somewhere)
>>
>>Hth,
>>
>>Marc-Hendrik
>>
>
>Thanks! I never would have figured that one out without help. Don't know
>enough about the internal workings of pov yet.
>
>normdoering
>

I spoke too soon. Adding your line of code got rid of the error, but the
image doesn't appear on the "height field." All I get is a flat rectangle.

normdoering


Post a reply to this message

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