|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"TheMightyZog" <Chr### [at] HotPOPcom> wrote:
> 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>
> }
Have a look at "3.5.9 Interior Texture" for what you are asking for
specifically.
-tgq
Post a reply to this message
|
|
| |
| |
|
|
From: Christian Froeschlin
Subject: Re: Newbie - inside/outside colours
Date: 5 Jun 2007 10:21:39
Message: <46657173@news.povray.org>
|
|
|
| |
| |
|
|
TheMightyZog wrote:
> 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?
Model the geometry both for the inside and the outside (your
pipe is bound to have some physical thickness), and make the
actual object the "difference" of outside - inside. To avoid
numeric problems (coincident surfaces), the "inside" pipe
should a bit longer than the "outside" pipe.
Depending on your geometry, you can often get away with using
a scaled down copy of the outer shape for the inner shape.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Christian Froeschlin <chr### [at] chrfrde> wrote:
> TheMightyZog wrote:
>
> > 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?
>
> Model the geometry both for the inside and the outside (your
> pipe is bound to have some physical thickness), and make the
> actual object the "difference" of outside - inside. To avoid
> numeric problems (coincident surfaces), the "inside" pipe
> should a bit longer than the "outside" pipe.
>
> Depending on your geometry, you can often get away with using
> a scaled down copy of the outer shape for the inner shape.
You forgot to say that the outside should have one texture and the object
that you are differencing it with, should have another texture.
Stephen
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Stephen" <mcavoys_AT_aolDOT.com> wrote:
> Christian Froeschlin <chr### [at] chrfrde> wrote:
> > TheMightyZog wrote:
> >
> > > 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?
> >
> > Model the geometry both for the inside and the outside (your
> > pipe is bound to have some physical thickness), and make the
> > actual object the "difference" of outside - inside. To avoid
> > numeric problems (coincident surfaces), the "inside" pipe
> > should a bit longer than the "outside" pipe.
> >
> > Depending on your geometry, you can often get away with using
> > a scaled down copy of the outer shape for the inner shape.
>
> You forgot to say that the outside should have one texture and the object
> that you are differencing it with, should have another texture.
>
>
> Stephen
Thank you all very much - all obvious, I was just searching Google with the
wrong words and forgot about texture - was just thinking of pigment!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|