POV-Ray : Newsgroups : povray.binaries.images : Beta 40 texture_map : Re: Beta 40 texture_map Server Time
30 Jul 2024 22:26:13 EDT (-0400)
  Re: Beta 40 texture_map  
From: Dave Blandston
Date: 10 Dec 2010 12:35:01
Message: <web.4d0264534661e3c7966554e20@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Please help us with some details. What pattern are you using, and what
> textures do you map?
>
> As a quick guess I'd say you're using an image_pattern and experiencing
> gamma issues.

These are the textures in my image that changed from Beta 39 to 40. The textures
that don't use "texture_map" remained the same. The final textures that are
applied to the objects are called "CaseColor" and "BulletColor."
---------------------------------------------------

#macro MakeCaseColor ()

   #local CaseBrilliance = 9;
   #local CaseDiffuse = .4;

   #local CaseColor2 = texture { //Top
      #local Brightness = .85;
      #local NColors = 4;
      #local ColorX = array [NColors] {
         <117. 94, 63> / 255 * Brightness //Light brown
         <49, 39, 36> / 255 * Brightness  //Dark red
         <78, 65, 49> / 255 * Brightness  //Medium brown
         <98, 73, 43> / 255 * Brightness  //Light brown
      } //array
      pigment {
         bozo
         turbulence .8
         omega 1
         color_map {
            #local I = 0;
            #while (I < NColors)
               [I / (NColors - 1) color ColorX [I]]
               #local I = I + 1;
            #end //#while
         } //color_map
         scale .1
      } //pigment
      finish {
         brilliance 2
         diffuse .3
         metallic
         specular .55
         roughness .15
         reflection .02
         emission .35
      } //finish
   } //texture

   #local Brightness = 1;

   #local CaseColor1A = texture { //Bottom
      pigment {color rgb <171, 115, 64> / 255 * Brightness} //Light brown
      finish {
         brilliance CaseBrilliance
         diffuse CaseDiffuse
         metallic
         specular .8
         roughness .01
         reflection .28
         emission 0
      } //finish
   } //texture

   #local CaseColor1B = texture { //Bottom
      pigment {color rgb <127, 74, 24> / 255 * Brightness} //Medium brown
      finish {
         brilliance CaseBrilliance
         diffuse CaseDiffuse
         metallic
         specular .55
         roughness .015
         reflection .08
         emission 0
      } //finish
   } //texture

   #local CaseColor1C = texture { //Bottom
      pigment {color rgb <99, 59, 23> / 255 * Brightness} //Dark brown
      finish {
         brilliance CaseBrilliance
         diffuse CaseDiffuse
         metallic
         specular .45
         roughness .02
         reflection .05
         emission 0
      } //finish
   } //texture

   #local CaseColor1 = texture { //Bottom
      bozo
      turbulence .8
      omega 1
      texture_map {
         [0 CaseColor1B]
         [.3 CaseColor1A]
         [.7 CaseColor1A]
         [1 CaseColor1C]
      } //texture_map
      scale .075
   } //texture

   #local VerticalVariance = rand (Randomizer_Misc) * .8 - .4;

   #declare CaseColor = texture {
      gradient y
      texture_map {
         [0 CaseColor1] //Bottom
         [.6 + VerticalVariance CaseColor1]
         [1 CaseColor2] //Top
      } //texture_map
      scale 53
      translate -.1 * y
   } //texture

#end //#macro MakeCaseColor



//End of texture, start of the next one...


#local BulletBrilliance = 9;
#local BulletDiffuse = .4;

#local Brightness = .55;

#local Copper_New = color rgb <247, 162, 108> / 255;

#local BulletColor1 = texture {
   pigment {color Copper_New * Brightness}
   finish {
      brilliance BulletBrilliance
      diffuse BulletDiffuse
      metallic
      specular .8
      roughness .008
      reflection .4
      emission 0
   } //finish
} //texture

#local BulletColor2 = texture {
   #local NColors = 3;
   #local ColorX = array [NColors] {
      <146, 98, 90> / 255 * Brightness   //Medium red
      <189, 102, 90> / 255 * Brightness  //Light orange
      <148, 124, 114> / 255 * Brightness //Grayish red
   } //array
   pigment {
      bozo
      color_map {
         [0 color ColorX [0]]
         [.4 color (ColorX [0] + ColorX [1]) / 2]
         [.5 color ColorX [1]]
         [1 color ColorX [2]]
      } //color_map
      scale 2
   } //pigment
   finish {
      brilliance BulletBrilliance
      diffuse BulletDiffuse
      metallic
      specular .4
      roughness .01
      reflection .2
      emission 0
   } //finish
} //texture

#local BulletColor = texture {
   bozo
   turbulence .2
   omega 1.2
   texture_map {
      [0 BulletColor1]
      [.65 BulletColor1]
      [1 BulletColor2]
   } //texture_map
   scale <1, 2.5, 1>
} //texture


Post a reply to this message

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