POV-Ray : Newsgroups : povray.general : Cannot layer a patterned texture over another Server Time
1 Nov 2024 11:14:47 EDT (-0400)
  Cannot layer a patterned texture over another (Message 1 to 4 of 4)  
From: Rafal 'Raf256' Maj
Subject: Cannot layer a patterned texture over another
Date: 28 Oct 2004 15:46:20
Message: <Xns9590DDE145B7Eraf256com@203.29.75.35>
Is there a way to have texture with texture_map as a layer over another 
texture? 

Like:


sphere { 
  1 10  
  texture { pigment { rgb .8 } finish { reflection .4 } }
  texture {
    slope y
    texture_map { [0 texStain1] [1 texStain1] }
  }
}

gives:

File Context (5 lines):
    texture_map { [0 texStain1] [1 texStain1] }
  }
}

Parse Error: Cannot layer a patterned texture over another.




-- 
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics


Post a reply to this message

From: Rafal 'Raf256' Maj
Subject: Re: Cannot layer a patterned texture over another
Date: 28 Oct 2004 20:38:04
Message: <Xns95911B310EE12raf256com@203.29.75.35>
spa### [at] raf256com news:Xns9590DDE145B7Eraf256com@203.29.75.35

> Parse Error: Cannot layer a patterned texture over another.
> 

After a bit of reading manual, actually there is a sollution,

2.3.4.12  Limitations Of Special Textures

For example, say we have a layered texture called Speckled_Metal, which 
produces a silver metallic surface, and then puts tiny specks of rust all 
over it. Then we decide, for a really rusty look, we want to create patches 
of concentrated rust, randomly over the surface. The obvious approach is to 
create a special texture pattern, with transparency to use as the top 
layer. But of course, as we have seen, we would not be able to use that 
texture pattern as a layer. We would just generate an error message. The 
solution is to turn the problem inside out, and make our layered texture 
part of the texture pattern instead, like this 

  // This part declares a pigment for use
  // in the rust patch texture pattern
  #declare Rusty = pigment {
    granite
    color_map {
      [ 0 rgb <0.2, 0, 0> ]
      [ 1 Brown ]
    }
    frequency 20
  }
  // And this part applies it
  // Notice that our original layered texture
  // "Speckled_Metal" is now part of the map
  #declare Rust_Patches = texture {
    bozo
    texture_map {
      [ 0.0  pigment {Rusty} ]
      [ 0.75 Speckled_Metal ]
      [ 1.0  Speckled_Metal ]
    }
  }

And the ultimate effect is the same as if we had layered the rust patches 
on to the speckled metal anyway. 



...sorry for easy question then. And bless manual :)

-- 
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics


Post a reply to this message

From: Tom Melly
Subject: Re: Cannot layer a patterned texture over another
Date: 29 Oct 2004 15:23:23
Message: <418298ab@news.povray.org>
"Rafal 'Raf256' Maj" <spa### [at] raf256com> wrote in message
news:Xns95911B310EE12raf256com@203.29.75.35...
> spa### [at] raf256com news:Xns9590DDE145B7Eraf256com@203.29.75.35
>
> After a bit of reading manual, actually there is a sollution,

Yep - I nearly posted an example (I forgot that this was covered in the
manual). The trouble was that the your example didn't make it entirely clear
what you were *really* trying to do...


Post a reply to this message

From: Rafal 'Raf256' Maj
Subject: Re: Cannot layer a patterned texture over another
Date: 11 Nov 2004 23:24:16
Message: <Xns959F37586C125raf256com@203.29.75.35>
pov### [at] tomandlucouk news:418298ab@news.povray.org

> Yep - I nearly posted an example (I forgot that this was covered in
> the manual). 

Btw, more complicated example:

#declare GRASS = 
  texture { 
    bozo 
    texture_map {
      [0.0 textGrass1 ]
      [0.7 textMud1 ]
    } 
  }

where textGrass1 and Mud1 already are layered textures.


Now we wont to make it more advanced:

#declare EARTH = 
texture {
  granite y
  [0 GRASS]
  [1 MOUNTAINS]
}

How can I achive this result? Because if I understand correctly, then now I 
would need to add this granite y to every one component of GRASS and of 
MOUNTAINS, with gives several textures that need to be modyfied. 
Imho this is quite not-comfortable... perhaps it would be a good idea to 
allow "normal" definitions?


-- 
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics


Post a reply to this message

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