|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |