POV-Ray : Newsgroups : povray.binaries.images : random-colored BRICKS : Re: random-colored BRICKS Server Time
15 May 2024 16:14:26 EDT (-0400)
  Re: random-colored BRICKS  
From: Alain
Date: 21 Apr 2018 15:06:37
Message: <5adb8bbd@news.povray.org>

> "Kenneth" <kdw### [at] gmailcom> wrote:
> 
>> Throughout my (many!) experiments with this, I noticed a kind of repeating
>> diagonal pattern of the bricks, when using just <.5,0,.5> for the warp
>> 'offsets.'...
> 
> The answer just occured to me!
> 
> 1) The cells pattern is naturaly composed of cubes.
> 2) Those cubes have a thickness in all dimensions-- naturally!
> 3) The warp 'repeats' of <.5,0,.5> are apparently smaller than the cube
> dimensions. So when the next row of bricks is created-- starting at y=0 --
> there's a very good chance that the *same*-colored cube will be chosen for some
> of the bricks in th next (offset) brick row. That is, until the <.5,0,.5>
> offsets get to another differently-colored cube, spatially speaking.
> 
> To test this, I scaled the cells pattern to be much smaller in z, immediately
> before the warp{repeat...} statement...
> 
> scale <1,1,.01>
> warp{repeat y offset <.5,0,.5>
> 
> As expected, this eliminates the 'diagonal' pattern! On the FRONT face, that is.
> The only problem now is that the SIDE walls of the brick building are scaled
> totally wrong. (Likewise, trying to use scale <.01,0,.01> will mess up ALL the
> brick faces.) So there's no easy way to eliminate the 'diagonal' pattern by
> squasing the cubes-- except to keep them at their regular cubic shape and then
> to make the OFFSETS much larger, as I did. Perhaps there's another more-involved
> method which will work, but I can't think of one...
> 
> 
> 
> 
> 

The blocks in the cells pattern are 1 unit large in all directions. Try 
using integer offset. This will ensure that each bricks layers get their 
colours from different cells layers, as well as different columns and rows.

warp{repeat<1,2,3>}


Post a reply to this message

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