POV-Ray : Newsgroups : povray.general : Did I miss anything? (parent/child texture in CSG) : Re: Did I miss anything? (parent/child texture in CSG) Server Time
19 May 2024 23:45:50 EDT (-0400)
  Re: Did I miss anything? (parent/child texture in CSG)  
From: Bald Eagle
Date: 8 Feb 2024 07:25:00
Message: <web.65c4c7e3d90d9b2b1f9dae3025979125@news.povray.org>
Ilya Razmanov <ily### [at] gmailcom> wrote:

> It seems like people are capable to define procedural, that is,
> algorithmic textures and stuff (for example, normals), to be calculated
> by POVRay internally, to be used in scenes.

Welcome to functions!

https://wiki.povray.org/content/Reference:Function

"Declaring User-Defined Color Functions
Right now you may only declare color functions using one of the special function
types. The only supported type is the pigment function. You may use every valid
pigment. This is a very simple example:

#declare foo = function {
  pigment {
    color red 1
    }
  }

#declare Vec = foo(1,2,3)
An example using a pattern:

#declare foo = function {
  pigment {
    crackle
    color_map {
      [0.3, color Red]
      [1.0, color Blue]
      }
    }
  }"


Post a reply to this message

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