POV-Ray : Newsgroups : povray.newusers : Add transparency to a pattern : Re: Add transparency to a pattern Server Time
7 Jul 2024 08:26:01 EDT (-0400)
  Re: Add transparency to a pattern  
From: Kenneth
Date: 9 Apr 2010 13:05:01
Message: <web.4bbf5cb738be503265f302820@news.povray.org>
If I understand your question correctly, overlaying one pigment or texture onto
another--in only some spots--is a simple trick; no need for actual 'noise.' The
idea is to pigment the sphere with crackle first, then add brick
on top of it--held back in some areas using the transparency of a third pattern,
as a 'mask.'

Here's an example, done two different ways. I used the bozo pattern as a
substitute for your 'noise' idea--any other pattern could also be used. BTW,
you'll see that the scale of the bozo 'mask' also scales the pigments within its
pigment_map--so the various scales are interdependent.

// #1
sphere {0,1
  texture {
    pigment {crackle scale .1}
    finish{ambient .2 diffuse .8}
          }

  texture{
   pigment{
    bozo
    scale .1
    pigment_map{
     [0.0 rgbt 1] // the transparent parts of the mask
     [0.5 rgbt 1]
     [0.5 brick scale .5]
     [1.0 brick scale .5]
     }
    }
   finish{ambient .2 diffuse .8}
   }
   }

OR...

// #2
sphere{0,1
texture{
   pigment{
    bozo
    scale .1
    pigment_map{
     [0.0 crackle scale .8]
     [0.6 crackle scale .8]
     [0.6 brick scale .5]
     [1.0 brick scale .5]
     }
    }
   finish{ambient .2 diffuse .8}
   }
     }


Post a reply to this message

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