POV-Ray : Newsgroups : povray.general : textures.inc Server Time
4 Nov 2024 21:23:22 EST (-0500)
  textures.inc (Message 1 to 7 of 7)  
From: Sabrina Kilian
Subject: textures.inc
Date: 17 Jan 2010 02:26:03
Message: <4b52bb8b@news.povray.org>
Looking at the PinkAlabaster stone texture in said file, am I mistaken
or is the second texture layer not even attached? It seems to be the
case in both the 3.6 and 3.7 packages. I figure the fact that the file
is from the 3.5 era may have something to do with it. See below for
modified version as a material.






#declare PinkAlabaster =
material {
  // Underlying surface is very subtly mottled with bozo
  texture {
      pigment {
          bozo
          turbulence 0.25
          color_map {
              [0 rgb <0.9, 0.75, 0.75>]
              [1 rgb <0.6, 0.6,  0.6 >]
          }
      scale 0.4
      }
      finish{ ambient 0.25 }
  }

  // Second layer texture has some transmit values, yet a fair amount of
color
  // Viening is kept quite thin in color map and by the largish scale.
  texture {
      pigment {
          granite
          color_map {
              [0.0 rgbt <0.52, 0.39, 0.39, 1.0>]
              [0.9 rgbt <0.52, 0.39, 0.39, 0.5>]
              [0.9 rgbt <0.42, 0.14, 0.55, 0.0>]
          }
      scale 2
      }
      finish {
          specular 1
          roughness 0.0001
          phong 0.25
          phong_size 75
          brilliance 4
      }
  }
}


Post a reply to this message

From: Thomas de Groot
Subject: Re: textures.inc
Date: 17 Jan 2010 03:41:29
Message: <4b52cd39$1@news.povray.org>
It is a layered texture, isn't it? So, no need to join them into a material.

Thomas


Post a reply to this message

From: Sabrina Kilian
Subject: Re: textures.inc
Date: 17 Jan 2010 07:09:11
Message: <4b52fde7$1@news.povray.org>
Thomas de Groot wrote:
> It is a layered texture, isn't it? So, no need to join them into a material.
> 
> Thomas
> 
> 

I don't delve into complex textures often, so I am probably wrong about
most of this, but there were no wrapping brackets. It looked like:

#declare PinkAlabaster = texture {
  stuff
}
texture {
  stuff
}

Is the syntax for layered textures that odd? I expected another set of
open and close bracket to enclose both textures. If not, that is just
what I get for looking at things this early in the morning.


Post a reply to this message

From: Thomas de Groot
Subject: Re: textures.inc
Date: 17 Jan 2010 10:21:53
Message: <4b532b11$1@news.povray.org>
"Sabrina Kilian" <ski### [at] vtedu> schreef in bericht 
news:4b52fde7$1@news.povray.org...
>
> I don't delve into complex textures often, so I am probably wrong about
> most of this, but there were no wrapping brackets. It looked like:
>
> #declare PinkAlabaster = texture {
>  stuff
> }
> texture {
>  stuff
> }
>
> Is the syntax for layered textures that odd? I expected another set of
> open and close bracket to enclose both textures. If not, that is just
> what I get for looking at things this early in the morning.

That is indeed the syntax. A texture is layered thus by successive textures, 
the first being the lowest, until a new declaration is met. Of course, 
transmit and/or filter are needed in the latter textures to make the layers 
visible, but you know that of course :-)

I agree that it may seem odd as one expects some kind of wrapping as in most 
if not all code, but there it is.

Thomas


Post a reply to this message

From: Sabrina Kilian
Subject: Re: textures.inc
Date: 17 Jan 2010 10:30:04
Message: <4b532cfc$1@news.povray.org>
Thomas de Groot wrote:
> That is indeed the syntax. A texture is layered thus by successive textures, 
> the first being the lowest, until a new declaration is met. Of course, 
> transmit and/or filter are needed in the latter textures to make the layers 
> visible, but you know that of course :-)
> 
> I agree that it may seem odd as one expects some kind of wrapping as in most 
> if not all code, but there it is.
> 
> Thomas 
> 
> 

Okay, that explains it. I looked at the code, thinking about how a
#declare would work with, say, objects. I was making a copy of the
texture to swap some colors, and thought I had found something
interesting. That will teach me to try new things first thing in the
morning.


Post a reply to this message

From: Thomas de Groot
Subject: Re: textures.inc
Date: 18 Jan 2010 03:10:29
Message: <4b541775@news.povray.org>
"Sabrina Kilian" <ski### [at] vtedu> schreef in bericht 
news:4b532cfc$1@news.povray.org...
.... That will teach me to try new things first thing in the
> morning.

With a good cup of coffee of course :)

Thomas


Post a reply to this message

From: PM 2Ring
Subject: Re: textures.inc
Date: 18 Jan 2010 05:45:00
Message: <web.4b543ae47585bcdf4c648ed0@news.povray.org>
"Thomas de Groot" <tDOTdegroot@interDOTnlANOTHERDOTnet> wrote:
> "Sabrina Kilian" <ski### [at] vtedu> schreef in bericht
> news:4b52fde7$1@news.povray.org...

> That is indeed the syntax. A texture is layered thus by successive textures,
> the first being the lowest, until a new declaration is met. Of course,
> transmit and/or filter are needed in the latter textures to make the layers
> visible, but you know that of course :-)
>
> I agree that it may seem odd as one expects some kind of wrapping as in most
> if not all code, but there it is.
>
> Thomas

This syntax is an archaism that POV-Ray inherited from DKBTrace. I guess it's a
bit unsettling at first, but I don't see any major reason to change it, and even
if new syntax were added to wrap layered textures into a single unit, we'd want
the old syntax to be retained for a while, for use in existing scene files &
macros. And because layered textures don't have any form of wrapping, I suspect
that it would be a bit tricky to write a script to convert the current syntax
automatically without the script being generally aware of POV SDL syntax.


Post a reply to this message

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