POV-Ray : Newsgroups : povray.binaries.images : workbench_train_02.png : Re: workbench_train_02.png Server Time
20 May 2024 06:42:08 EDT (-0400)
  Re: workbench_train_02.png  
From: William F Pokorny
Date: 14 Dec 2023 02:36:27
Message: <657ab07b$1@news.povray.org>
On 12/13/23 19:16, William F Pokorny wrote:
> Specifying the texture{} or interior_texture{} with or without a initial 
> texture ID will, I believe, always behave in a consistent and simple to 
> understand way, but yes, the short methods are handy.

Simple to understand... Something worth mentioning with respect to 
default textures though perhaps obvious. The default texture changes - 
and can change any number of times while SDL is parsed.

//...
// Here there is a POV-Ray default (which itself changed v3.7 to v3.8)
default { pigment { Green } }  // Pigment aspect of texture to Green
#declare Sph00 = sphere { 0, 0.7 }

object { Sph00 texture { normal { N } } translate -x } // Green
default { pigment { Red } }
object { Sph00 texture { normal { N } } } // Red
#include "defaultPigToBlue.inc" // defaults not scoped; Always global
object { Sph00 texture { normal { N } } translate +x } // Blue

The exposure with default{} statements and include files is we might not 
know they've been used therein and the previous default state is not 
restored when we leave the include. (Yes, default statements in macros 
can cause similar confusion)

Bill P.


Post a reply to this message

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