POV-Ray : Newsgroups : povray.general : Feature Request - Texture Override, Help Request : Re: Feature Request - Texture Override, Help Request Server Time
1 May 2024 07:13:07 EDT (-0400)
  Re: Feature Request - Texture Override, Help Request  
From: Kyle
Date: 16 Jan 2008 08:19:23
Message: <b90so35gumm76bgjr66r6gl6qihvdm834e@4ax.com>
On Wed, 16 Jan 2008 06:25:54 +0100, Jan Dvorak <jan### [at] centrumcz> wrote:

>union the bricks and apply a stripes texture (object rgb,Clear)

I wish it were that simple.  

I've put together a simple sample scene to better describe the issue.  As you'll see
in this scene, the bricks in each section are textured with individual pigment values.
 Because of this, any
texture applied to the o_Road object has no impact.  I can apply the stripes to the
bricks as they are created, but doing so causes obvious uniformity in the stripes. 
I'd rather have the stripes not
be uniform and instead have some slight curvature to them as they are drawn down the
road.  Furthermore, I'd also like to be able to apply an overall "dirt" texture that
is more pronounced at the
edges of the road and not obviously uniform.  

BTW, for anyone that is wondering, building the road in sections of bricks instead of
individual bricks conserves memory and parse/render time.


//+w700 +h500
//+w700 +h500 +a0.1 +j0.5 +am2
             
#include "functions.inc"

global_settings {
  assumed_gamma 1
  max_trace_level 15
}

light_source { vrotate (<0, 500, -500>, <0, -60, 0>), rgb 1 }

camera {
  location <-9, 5, 0> look_at <-5, 4.5, 15> angle 54
  right x*image_width/image_height
}

#declare l_Seed = seed(123);
#declare l_Gap = 0.125;

// basic brick
#declare o_Brick = box { <-4, -1, -2>, <4, 1, 2> scale 1/12 }

// brick pigment source
#declare p_Brick =
  pigment {
    gradient x
    color_map {
      [0 rgb <0.6055, 0.4423, 0.3066>]
      [1 rgb <0.7, 0.3, 0.2>]
    }
  }

// build a section of brick road
#declare o_Section =
  union {
    #declare Z = 0;
    #while (Z < 100)
      #declare X = 0;
      #while (X < 36)
        object { 
          o_Brick 
          pigment { eval_pigment(p_Brick, x*rand(l_Seed)) }
          translate <(X-18 #if(Z/2=int(Z/2)) +0.5 #end)*(8+l_Gap), 0, Z*(4+l_Gap)>/12 
        }
        #declare X = X + 1;
      #end
      #declare Z = Z + 1;
    #end
  }
  
// put some sections together to build a road
#declare o_Road =
  union {
    #declare Z = 0;
    #while (Z < 10)
      object { o_Section translate z*Z*100*(4+l_Gap)/12}
      #declare Z = Z + 1;
    #end
  }

object { o_Road }


Post a reply to this message

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