|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
hello,
i've got my camera sitting a little ways off in the -z area, and
looking towards z positive infinity. i've put a plane out there
for a sky, plain black right now. i would expect the normal to
be coming out of the surface i'm viewing, which, in my mind,
would make the normal -z. but i notice that i only get the sky
color as black with a normal of z. its grey with a -z normal.
here's the sky code:
plane
{ z, 1000
pigment
{ color Black
}
}
the camera:
camera
{ location <1, 1.5, -6>
look_at <0, 1.3, 0>
angle 45
}
could you straighten out my thinking here, please? why isn't
the normal -z? heck, it could be argued that -z and z are
the same, since they are both perpendicular to the surface.
but if thats the case, then why do i get different results with
my render?
thank you, miker
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
MR wrote:
> hello,
>
> i've got my camera sitting a little ways off in the -z area, and
> looking towards z positive infinity. i've put a plane out there
> for a sky, plain black right now. i would expect the normal to
> be coming out of the surface i'm viewing, which, in my mind,
> would make the normal -z. but i notice that i only get the sky
> color as black with a normal of z. its grey with a -z normal.
> here's the sky code:
>
> plane
> { z, 1000
> pigment
> { color Black
> }
> }
>
> the camera:
>
> camera
> { location <1, 1.5, -6>
> look_at <0, 1.3, 0>
> angle 45
> }
>
> could you straighten out my thinking here, please? why isn't
> the normal -z?
Your thinking is straight. Almost
For the purposes of CSG (and other stuff), planes have an "inside" and
an "outside". a plane would be represented like this:
|
|
(inside) |-----> normal (outside)
|
|
The location of the plane is measured by sliding the plane along the
normal by so many units IN THE DIRECTION of the normal. therefore:
plane{ z, 1000 }
|
|
. |-----> z
(z=0) |(z=1000)
|
plane{ -z, 1000 }
|
|
-z <-----| .
(z=-1000)| (z=0)
|
Therefore, by just changing the orientation of your plane, without
changing the distance, you are sending the plane 994 units behind the
camera, so the grey you are seeing in your picture is probably other
objects.
What you need is:
plane{ -z, -1000 }
|
|
. -z <-----|
(z=0) (z=1000)|
|
If you don't do CSG or media, plane{ z, 1000} or plane{ -z, -1000} will
be equivalent (apart from the "Camera is inside non-hollow object"
warning), but doing it right is sound practice if you ever want to
improve on your scene a few months down the road.
--
/*Francois Labreque*/#local a=x+y;#local b=x+a;#local c=a+b;#macro P(F//
/* flabreque */L)polygon{5,F,F+z,L+z,L,F pigment{rgb 9}}#end union
/* @ */{P(0,a)P(a,b)P(b,c)P(2*a,2*b)P(2*b,b+c)P(b+c,<2,3>)
/* videotron.ca */}camera{location<6,1.25,-6>look_at a orthographic}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
hi francois,
thank you VERY much for the excellent explanation. i had not
grasped the idea that the second number was in the direction
of the normal, so my plane was off behind the camera, and a
default background grey that i have in my code was kicking in.
thanks again, miker
"Francois Labreque" <fla### [at] videotronca> wrote in message
news:3BF### [at] videotronca...
>
>
> MR wrote:
>
> > hello,
> >
> > i've got my camera sitting a little ways off in the -z area, and
> > looking towards z positive infinity. i've put a plane out there
> > for a sky, plain black right now. i would expect the normal to
> > be coming out of the surface i'm viewing, which, in my mind,
> > would make the normal -z. but i notice that i only get the sky
> > color as black with a normal of z. its grey with a -z normal.
> > here's the sky code:
> >
> > plane
> > { z, 1000
> > pigment
> > { color Black
> > }
> > }
> >
> > the camera:
> >
> > camera
> > { location <1, 1.5, -6>
> > look_at <0, 1.3, 0>
> > angle 45
> > }
> >
> > could you straighten out my thinking here, please? why isn't
> > the normal -z?
>
>
> Your thinking is straight. Almost
>
> For the purposes of CSG (and other stuff), planes have an "inside" and
> an "outside". a plane would be represented like this:
>
> |
> |
> (inside) |-----> normal (outside)
> |
> |
>
>
> The location of the plane is measured by sliding the plane along the
> normal by so many units IN THE DIRECTION of the normal. therefore:
>
> plane{ z, 1000 }
>
> |
> |
> . |-----> z
> (z=0) |(z=1000)
> |
>
> plane{ -z, 1000 }
>
> |
> |
> -z <-----| .
> (z=-1000)| (z=0)
> |
>
> Therefore, by just changing the orientation of your plane, without
> changing the distance, you are sending the plane 994 units behind the
> camera, so the grey you are seeing in your picture is probably other
> objects.
>
> What you need is:
>
> plane{ -z, -1000 }
> |
> |
> . -z <-----|
> (z=0) (z=1000)|
> |
>
> If you don't do CSG or media, plane{ z, 1000} or plane{ -z, -1000} will
> be equivalent (apart from the "Camera is inside non-hollow object"
> warning), but doing it right is sound practice if you ever want to
> improve on your scene a few months down the road.
>
>
> --
> /*Francois Labreque*/#local a=x+y;#local b=x+a;#local c=a+b;#macro P(F//
> /* flabreque */L)polygon{5,F,F+z,L+z,L,F pigment{rgb 9}}#end union
> /* @ */{P(0,a)P(a,b)P(b,c)P(2*a,2*b)P(2*b,b+c)P(b+c,<2,3>)
> /* videotron.ca */}camera{location<6,1.25,-6>look_at a orthographic}
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|