POV-Ray : Newsgroups : povray.newusers : Newbie - inside/outside colours : Newbie - inside/outside colours Server Time
28 Jul 2024 22:21:27 EDT (-0400)
  Newbie - inside/outside colours  
From: TheMightyZog
Date: 5 Jun 2007 10:00:01
Message: <web.46656b8a194d8e0ff6e04e90@news.povray.org>
Hi,

This is a fantastic program and I'm really enjoying getting to grips with
ray tracing.

I've searched and can't find out how to colour the inside surface
differently from the outside surface of an object.

The following is a U shaped pipe and I would like the inside to be White and
the outside Yellow.  How can I do it?

Thanks
Zog
------------
#include  "colors.inc"
background { color White }

light_source { < -100, 100, -100 > color White}
light_source { <    0,   0, -100 > color Red}
light_source { <  100,   0,    0 > color Blue}

cylinder{
     < -2, 0, 0 >, < 1, 0, 0 >,1
     clipped_by { // open length ways
          box { <-1, 0 ,-1>, <1.1 ,1, 1> inverse }
     }
     clipped_by { // cut off the end
          box { <0.99, -1.1, -1>, <1.1 ,1, 1> inverse }
     }
     pigment { color Yellow
     }
     rotate <-45, 0, 0>
}
sphere{ // this is the colour the inside should be
        <0, -0.1, 0>, 0.2
     pigment { color  White
     }
}

camera {
     location  <3, 3, -3>
     look_at   <0, 0, 0>
}


Post a reply to this message

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