POV-Ray : Newsgroups : povray.binaries.images : Question about layered textures (19KB) : Question about layered textures (19KB) Server Time
20 Nov 2024 06:31:23 EST (-0500)
  Question about layered textures (19KB)  
From: Tor Olav Kristensen
Date: 26 Sep 2001 17:15:54
Message: <3BB24583.FE858816@hotmail.com>
I'm trying to understand layered textures better,
but I don't understand why the colors of the left
spheres in the attached image don't match the 
colors of right spheres.

See my code below.

Can anyone please explain ?

And what do I have to do in order to make the 
colors of the right spheres equal to the colors 
of the left spheres (using subtractive color 
mixing for the right ones and additive for the
left ones) ?

E.g.: Any changes to the finish {} part of the textures ?


Tor Olav


// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 =

#version 3.5;

#default {
  texture {
    finish {
      ambient 0
      diffuse 1
    }
  }
}

// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 =

// Red
sphere {
  2*<-1,  2,  0>, 2
  texture { pigment { color rgbt <1, 0, 0, 0.0> } }
}

// Green
sphere {
  2*<-1,  0,  0>, 2
  texture { pigment { color rgbt <0, 1, 0, 0.0> } }
}

// Blue
sphere {
  2*<-1, -2,  0>, 2
  texture { pigment { color rgbt <0, 0, 1, 0.0> } }
}



// White - Blue  - Green = Red
sphere {
  2*< 1,  2,  0>, 2
  texture { pigment { color rgbt <1, 0, 1, 0.0> } }
  texture { pigment { color rgbt <1, 1, 0, 0.5> } }
}

// White - Red   - Blue  = Green
sphere {
  2*< 1,  0,  0>, 2
  texture { pigment { color rgbt <1, 1, 0, 0.0> } }
  texture { pigment { color rgbt <0, 1, 1, 0.5> } }
}

// White - Green - Red   = Blue
sphere {
  2*< 1, -2,  0>, 2
  texture { pigment { color rgbt <0, 1, 1, 0.0> } }
  texture { pigment { color rgbt <1, 0, 1, 0.5> } }
}

// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 =

// Red   + Green = Yellow
sphere {
  2*<-3,  2,  0>, 2
  texture { pigment { color rgbt <1, 1, 0, 0.0> } }
}

// Green + Blue  = Cyan
sphere {
  2*<-3,  0,  0>, 2
  texture { pigment { color rgbt <0, 1, 1, 0.0> } }
}

// Blue  + Red   = Magenta
sphere {
  2*<-3, -2,  0>, 2
  texture { pigment { color rgbt <1, 0, 1, 0.0> } }
}



// White - Blue  = Yellow
sphere {
  2*< 3,  2,  0>, 2
  texture { pigment { color rgbt <1, 1, 1, 0.0> } }
  texture { pigment { color rgbt <1, 1, 0, 0.5> } }
}

// White - Red   = Cyan
sphere {
  2*< 3,  0,  0>, 2
  texture { pigment { color rgbt <1, 1, 1, 0.0> } }
  texture { pigment { color rgbt <0, 1, 1, 0.5> } }
}

// White - Green = Magenta
sphere {
  2*< 3, -2,  0>, 2
  texture { pigment { color rgbt <1, 1, 1, 0.0> } }
  texture { pigment { color rgbt <1, 0, 1, 0.5> } }
}

// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 =

background { color rgb <1, 1, 1>/2 }

light_source { 1000*<0, 5, -5> color rgb <1, 1, 1>*1.2 shadowless }

camera {
  location <0, 0, -14>
  look_at <0, 0, 0>
  orthographic
}

// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 =


Post a reply to this message


Attachments:
Download 'layered.jpg' (19 KB)

Preview of image 'layered.jpg'
layered.jpg


 

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