POV-Ray : Newsgroups : povray.general : INQUIRY: Wooden Planks Texture : Re: INQUIRY: Wooden Planks Texture Server Time
4 May 2024 03:30:11 EDT (-0400)
  Re: INQUIRY: Wooden Planks Texture  
From: clipka
Date: 4 Apr 2018 14:59:06
Message: <5ac5207a$1@news.povray.org>
Am 04.04.2018 um 14:04 schrieb Sven Littkowski:
> I wonder, if the BRICKS pattern can't be used for this, but instead
> specifying pigments (colors), now specifying textures instead.
> 
> This would be worth a suggestion to Clipka, as that feature would make
> it easy to finally have easily creatable planks in the scenes.

As Alain points out, this feature already exists. Virtually all patterns
that can be used for pigments can just as well be used for entire
textures (and vice versa).

> Doing some experimenting on my own, I am wondering if there is a way to
> "remote-control" textures in a similar way as MACRO does with objects.
> If there is a way to change parameters of a texture, it could allow to
> change the lumber-type of an upcoming planks texture without having to
> re-declare all the entire thing again as a new texture.

Macros do not "do something with objects" - they just provide a means to
insert (almost) arbitrary scene definition statements in a way that can
be parameterized. Such statements just may happen to be object
definitions, that's all. In the very same way, they may happen to
contain texture definitions instead.

e.g.

    #macro MySphere(C,R)
      sphere { C, R }
    #end

    #macro MyTexture(D,S)
      texture { finish { diffuse D specular S } }
    #end

    object {
      MySphere(<0,1,0>, 1.0)
      MyTexture(0.7, 1.0)
    }

is perfectly valid scene code (unless I injected some stupid blunder).


Post a reply to this message

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